Skip to content

/AWS1/IF_WAD=>CREATEWORKLOAD()

About CreateWorkload

Create a new workload.

The owner of a workload can share the workload with other Amazon Web Services accounts, users, an organization, and organizational units (OUs) in the same Amazon Web Services Region. Only the owner of a workload can delete it.

For more information, see Defining a Workload in the Well-Architected Tool User Guide.

Either AwsRegions, NonAwsRegions, or both must be specified when creating a workload.

You also must specify ReviewOwner, even though the parameter is listed as not being required in the following section.

When creating a workload using a review template, you must have the following IAM permissions:

  • wellarchitected:GetReviewTemplate

  • wellarchitected:GetReviewTemplateAnswer

  • wellarchitected:ListReviewTemplateAnswers

  • wellarchitected:GetReviewTemplateLensReview

Method Signature

METHODS /AWS1/IF_WAD~CREATEWORKLOAD
  IMPORTING
    !IV_WORKLOADNAME TYPE /AWS1/WADWORKLOADNAME OPTIONAL
    !IV_DESCRIPTION TYPE /AWS1/WADWORKLOADDESCRIPTION OPTIONAL
    !IV_ENVIRONMENT TYPE /AWS1/WADWORKLOADENVIRONMENT OPTIONAL
    !IT_ACCOUNTIDS TYPE /AWS1/CL_WADWORKLOADACCTIDS_W=>TT_WORKLOADACCOUNTIDS OPTIONAL
    !IT_AWSREGIONS TYPE /AWS1/CL_WADWORKLOADAWSREGIO00=>TT_WORKLOADAWSREGIONS OPTIONAL
    !IT_NONAWSREGIONS TYPE /AWS1/CL_WADWORKLOADNONAWSRE00=>TT_WORKLOADNONAWSREGIONS OPTIONAL
    !IT_PILLARPRIORITIES TYPE /AWS1/CL_WADWORKLOADPILLARPR00=>TT_WORKLOADPILLARPRIORITIES OPTIONAL
    !IV_ARCHITECTURALDESIGN TYPE /AWS1/WADWORKLOADARCHITECTUR00 OPTIONAL
    !IV_REVIEWOWNER TYPE /AWS1/WADWORKLOADREVIEWOWNER OPTIONAL
    !IV_INDUSTRYTYPE TYPE /AWS1/WADWORKLOADINDUSTRYTYPE OPTIONAL
    !IV_INDUSTRY TYPE /AWS1/WADWORKLOADINDUSTRY OPTIONAL
    !IT_LENSES TYPE /AWS1/CL_WADWORKLOADLENSES_W=>TT_WORKLOADLENSES OPTIONAL
    !IV_NOTES TYPE /AWS1/WADNOTES OPTIONAL
    !IV_CLIENTREQUESTTOKEN TYPE /AWS1/WADCLIENTREQUESTTOKEN OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_WADTAGMAP_W=>TT_TAGMAP OPTIONAL
    !IO_DISCOVERYCONFIG TYPE REF TO /AWS1/CL_WADWORKLOADDISCOVER00 OPTIONAL
    !IT_APPLICATIONS TYPE /AWS1/CL_WADWORKLOADAPPLICAT00=>TT_WORKLOADAPPLICATIONS OPTIONAL
    !IT_PROFILEARNS TYPE /AWS1/CL_WADWORKLOADPFLARNS_W=>TT_WORKLOADPROFILEARNS OPTIONAL
    !IT_REVIEWTEMPLATEARNS TYPE /AWS1/CL_WADREVIEWTMPLARNS_W=>TT_REVIEWTEMPLATEARNS OPTIONAL
    !IO_JIRACONFIGURATION TYPE REF TO /AWS1/CL_WADWORKLOADJIRACONF00 OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wadcreateworkloadout
  RAISING
    /AWS1/CX_WADACCESSDENIEDEX
    /AWS1/CX_WADCONFLICTEXCEPTION
    /AWS1/CX_WADINTERNALSERVEREX
    /AWS1/CX_WADRESOURCENOTFOUNDEX
    /AWS1/CX_WADSERVICEQUOTAEXCDEX
    /AWS1/CX_WADTHROTTLINGEX
    /AWS1/CX_WADVALIDATIONEX
    /AWS1/CX_WADCLIENTEXC
    /AWS1/CX_WADSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_workloadname TYPE /AWS1/WADWORKLOADNAME /AWS1/WADWORKLOADNAME

The name of the workload.

The name must be unique within an account within an Amazon Web Services Region. Spaces and capitalization are ignored when checking for uniqueness.

iv_description TYPE /AWS1/WADWORKLOADDESCRIPTION /AWS1/WADWORKLOADDESCRIPTION

The description for the workload.

iv_environment TYPE /AWS1/WADWORKLOADENVIRONMENT /AWS1/WADWORKLOADENVIRONMENT

The environment for the workload.

it_lenses TYPE /AWS1/CL_WADWORKLOADLENSES_W=>TT_WORKLOADLENSES TT_WORKLOADLENSES

The list of lenses associated with the workload. Each lens is identified by its LensSummary$LensAlias.

If a review template that specifies lenses is applied to the workload, those lenses are applied to the workload in addition to these lenses.

iv_clientrequesttoken TYPE /AWS1/WADCLIENTREQUESTTOKEN /AWS1/WADCLIENTREQUESTTOKEN

A unique case-sensitive string used to ensure that this request is idempotent (executes only once).

You should not reuse the same token for other requests. If you retry a request with the same client request token and the same parameters after the original request has completed successfully, the result of the original request is returned.

This token is listed as required, however, if you do not specify it, the Amazon Web Services SDKs automatically generate one for you. If you are not using the Amazon Web Services SDK or the CLI, you must provide this token or the request will fail.

Optional arguments:

it_accountids TYPE /AWS1/CL_WADWORKLOADACCTIDS_W=>TT_WORKLOADACCOUNTIDS TT_WORKLOADACCOUNTIDS

The list of Amazon Web Services account IDs associated with the workload.

it_awsregions TYPE /AWS1/CL_WADWORKLOADAWSREGIO00=>TT_WORKLOADAWSREGIONS TT_WORKLOADAWSREGIONS

The list of Amazon Web Services Regions associated with the workload, for example, us-east-2, or ca-central-1.

it_nonawsregions TYPE /AWS1/CL_WADWORKLOADNONAWSRE00=>TT_WORKLOADNONAWSREGIONS TT_WORKLOADNONAWSREGIONS

The list of non-Amazon Web Services Regions associated with the workload.

it_pillarpriorities TYPE /AWS1/CL_WADWORKLOADPILLARPR00=>TT_WORKLOADPILLARPRIORITIES TT_WORKLOADPILLARPRIORITIES

The priorities of the pillars, which are used to order items in the improvement plan. Each pillar is represented by its PillarReviewSummary$PillarId.

iv_architecturaldesign TYPE /AWS1/WADWORKLOADARCHITECTUR00 /AWS1/WADWORKLOADARCHITECTUR00

The URL of the architectural design for the workload.

iv_reviewowner TYPE /AWS1/WADWORKLOADREVIEWOWNER /AWS1/WADWORKLOADREVIEWOWNER

The review owner of the workload. The name, email address, or identifier for the primary group or individual that owns the workload review process.

iv_industrytype TYPE /AWS1/WADWORKLOADINDUSTRYTYPE /AWS1/WADWORKLOADINDUSTRYTYPE

The industry type for the workload.

If specified, must be one of the following:

  • Agriculture

  • Automobile

  • Defense

  • Design and Engineering

  • Digital Advertising

  • Education

  • Environmental Protection

  • Financial Services

  • Gaming

  • General Public Services

  • Healthcare

  • Hospitality

  • InfoTech

  • Justice and Public Safety

  • Life Sciences

  • Manufacturing

  • Media & Entertainment

  • Mining & Resources

  • Oil & Gas

  • Power & Utilities

  • Professional Services

  • Real Estate & Construction

  • Retail & Wholesale

  • Social Protection

  • Telecommunications

  • Travel, Transportation & Logistics

  • Other

iv_industry TYPE /AWS1/WADWORKLOADINDUSTRY /AWS1/WADWORKLOADINDUSTRY

The industry for the workload.

iv_notes TYPE /AWS1/WADNOTES /AWS1/WADNOTES

The notes associated with the workload.

For a review template, these are the notes that will be associated with the workload when the template is applied.

it_tags TYPE /AWS1/CL_WADTAGMAP_W=>TT_TAGMAP TT_TAGMAP

The tags to be associated with the workload.

io_discoveryconfig TYPE REF TO /AWS1/CL_WADWORKLOADDISCOVER00 /AWS1/CL_WADWORKLOADDISCOVER00

Well-Architected discovery configuration settings associated to the workload.

it_applications TYPE /AWS1/CL_WADWORKLOADAPPLICAT00=>TT_WORKLOADAPPLICATIONS TT_WORKLOADAPPLICATIONS

List of AppRegistry application ARNs associated to the workload.

it_profilearns TYPE /AWS1/CL_WADWORKLOADPFLARNS_W=>TT_WORKLOADPROFILEARNS TT_WORKLOADPROFILEARNS

The list of profile ARNs associated with the workload.

it_reviewtemplatearns TYPE /AWS1/CL_WADREVIEWTMPLARNS_W=>TT_REVIEWTEMPLATEARNS TT_REVIEWTEMPLATEARNS

The list of review template ARNs to associate with the workload.

io_jiraconfiguration TYPE REF TO /AWS1/CL_WADWORKLOADJIRACONF00 /AWS1/CL_WADWORKLOADJIRACONF00

Jira configuration settings when creating a workload.

RETURNING

oo_output TYPE REF TO /aws1/cl_wadcreateworkloadout /AWS1/CL_WADCREATEWORKLOADOUT

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->createworkload(
  io_discoveryconfig = new /aws1/cl_wadworkloaddiscover00(
    it_workloadresourcedefn = VALUE /aws1/cl_wadworkloadresrcdef_w=>tt_workloadresourcedefinition(
      ( new /aws1/cl_wadworkloadresrcdef_w( |string| ) )
    )
    iv_trustedadvisorintegrati00 = |string|
  )
  io_jiraconfiguration = new /aws1/cl_wadworkloadjiraconf00(
    iv_issuemanagementstatus = |string|
    iv_issuemanagementtype = |string|
    iv_jiraprojectkey = |string|
  )
  it_accountids = VALUE /aws1/cl_wadworkloadacctids_w=>tt_workloadaccountids(
    ( new /aws1/cl_wadworkloadacctids_w( |string| ) )
  )
  it_applications = VALUE /aws1/cl_wadworkloadapplicat00=>tt_workloadapplications(
    ( new /aws1/cl_wadworkloadapplicat00( |string| ) )
  )
  it_awsregions = VALUE /aws1/cl_wadworkloadawsregio00=>tt_workloadawsregions(
    ( new /aws1/cl_wadworkloadawsregio00( |string| ) )
  )
  it_lenses = VALUE /aws1/cl_wadworkloadlenses_w=>tt_workloadlenses(
    ( new /aws1/cl_wadworkloadlenses_w( |string| ) )
  )
  it_nonawsregions = VALUE /aws1/cl_wadworkloadnonawsre00=>tt_workloadnonawsregions(
    ( new /aws1/cl_wadworkloadnonawsre00( |string| ) )
  )
  it_pillarpriorities = VALUE /aws1/cl_wadworkloadpillarpr00=>tt_workloadpillarpriorities(
    ( new /aws1/cl_wadworkloadpillarpr00( |string| ) )
  )
  it_profilearns = VALUE /aws1/cl_wadworkloadpflarns_w=>tt_workloadprofilearns(
    ( new /aws1/cl_wadworkloadpflarns_w( |string| ) )
  )
  it_reviewtemplatearns = VALUE /aws1/cl_wadreviewtmplarns_w=>tt_reviewtemplatearns(
    ( new /aws1/cl_wadreviewtmplarns_w( |string| ) )
  )
  it_tags = VALUE /aws1/cl_wadtagmap_w=>tt_tagmap(
    (
      VALUE /aws1/cl_wadtagmap_w=>ts_tagmap_maprow(
        key = |string|
        value = new /aws1/cl_wadtagmap_w( |string| )
      )
    )
  )
  iv_architecturaldesign = |string|
  iv_clientrequesttoken = |string|
  iv_description = |string|
  iv_environment = |string|
  iv_industry = |string|
  iv_industrytype = |string|
  iv_notes = |string|
  iv_reviewowner = |string|
  iv_workloadname = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_workloadid = lo_result->get_workloadid( ).
  lv_workloadarn = lo_result->get_workloadarn( ).
ENDIF.