/AWS1/IF_WAD=>CREATEAGENTPROFILE()¶
About CreateAgentProfile¶
Creates an optimization profile that defines the scope and configuration for generating recommendations. A profile specifies the execution role, target pillars, and aggregation settings for analyzing your Amazon Web Services resources.
Method Signature¶
METHODS /AWS1/IF_WAD~CREATEAGENTPROFILE
IMPORTING
!IV_NAME TYPE /AWS1/WADSTRING OPTIONAL
!IV_DISPLAYNAME TYPE /AWS1/WADSENSITIVESTRING OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/WADSENSITIVESTRING OPTIONAL
!IV_BUSINESSOVERVIEW TYPE /AWS1/WADSENSITIVESTRING OPTIONAL
!IT_PILLARS TYPE /AWS1/CL_WADPILLARS_W=>TT_PILLARS OPTIONAL
!IV_DELETIONPROTECTION TYPE /AWS1/WADBOOLEAN OPTIONAL
!IV_EXECUTIONROLEARN TYPE /AWS1/WADROLEARN OPTIONAL
!IT_AGGREGATIONCONFIGURATION TYPE /AWS1/CL_WADAGGREGATIONCONF=>TT_AGGREGATIONCONFIGURATIONS OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/WADSTRING OPTIONAL
!IT_TAGS TYPE /AWS1/CL_WADTAG=>TT_TAGS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wadcreateagentpflrsp
RAISING
/AWS1/CX_WADACCESSDENIEDEX
/AWS1/CX_WADCONFLICTEXCEPTION
/AWS1/CX_WADINTERNALSERVEREX
/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_name TYPE /AWS1/WADSTRING /AWS1/WADSTRING¶
The system name of the profile.
it_pillars TYPE /AWS1/CL_WADPILLARS_W=>TT_PILLARS TT_PILLARS¶
The Well-Architected Tool Framework pillars to associate with this profile.
iv_executionrolearn TYPE /AWS1/WADROLEARN /AWS1/WADROLEARN¶
The ARN of the IAM execution role used for recommendation actions.
it_aggregationconfiguration TYPE /AWS1/CL_WADAGGREGATIONCONF=>TT_AGGREGATIONCONFIGURATIONS TT_AGGREGATIONCONFIGURATIONS¶
The aggregation configuration that defines which Amazon Web Services accounts and Regions to analyze.
Optional arguments:¶
iv_displayname TYPE /AWS1/WADSENSITIVESTRING /AWS1/WADSENSITIVESTRING¶
The display name of the profile shown to users.
iv_description TYPE /AWS1/WADSENSITIVESTRING /AWS1/WADSENSITIVESTRING¶
A description of the profile.
iv_businessoverview TYPE /AWS1/WADSENSITIVESTRING /AWS1/WADSENSITIVESTRING¶
The business overview for this profile.
iv_deletionprotection TYPE /AWS1/WADBOOLEAN /AWS1/WADBOOLEAN¶
Indicates whether deletion protection is enabled for the profile.
iv_clienttoken TYPE /AWS1/WADSTRING /AWS1/WADSTRING¶
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
it_tags TYPE /AWS1/CL_WADTAG=>TT_TAGS TT_TAGS¶
The tags to associate with the profile.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_wadcreateagentpflrsp /AWS1/CL_WADCREATEAGENTPFLRSP¶
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->createagentprofile(
it_aggregationconfiguration = VALUE /aws1/cl_wadaggregationconf=>tt_aggregationconfigurations(
(
new /aws1/cl_wadaggregationconf(
it_regions = VALUE /aws1/cl_wadregions_w=>tt_regions(
( new /aws1/cl_wadregions_w( |string| ) )
)
iv_accessrolearn = |string|
iv_accountid = |string|
)
)
)
it_pillars = VALUE /aws1/cl_wadpillars_w=>tt_pillars(
( new /aws1/cl_wadpillars_w( |string| ) )
)
it_tags = VALUE /aws1/cl_wadtag=>tt_tags(
(
new /aws1/cl_wadtag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_businessoverview = |string|
iv_clienttoken = |string|
iv_deletionprotection = ABAP_TRUE
iv_description = |string|
iv_displayname = |string|
iv_executionrolearn = |string|
iv_name = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_string = lo_result->get_name( ).
lv_sensitivestring = lo_result->get_displayname( ).
lv_sensitivestring = lo_result->get_description( ).
lv_sensitivestring = lo_result->get_businessoverview( ).
LOOP AT lo_result->get_pillars( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_pillar = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lv_boolean = lo_result->get_deletionprotection( ).
lv_rolearn = lo_result->get_executionrolearn( ).
LOOP AT lo_result->get_aggregationconfiguration( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_accountid = lo_row_3->get_accountid( ).
LOOP AT lo_row_3->get_regions( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_region = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
lv_rolearn = lo_row_3->get_accessrolearn( ).
ENDIF.
ENDLOOP.
lv_agentprofilearn = lo_result->get_arn( ).
lv_boolean = lo_result->get_eligibleforschdgener( ).
lv_boolean = lo_result->get_eligibleforarchitgener( ).
LOOP AT lo_result->get_fielderrors( ) into ls_row_6.
lv_key = ls_row_6-key.
lo_value = ls_row_6-value.
IF lo_value IS NOT INITIAL.
lv_fielderrormessage = lo_value->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_result->get_tags( ) into lo_row_7.
lo_row_8 = lo_row_7.
IF lo_row_8 IS NOT INITIAL.
lv_string = lo_row_8->get_key( ).
lv_string = lo_row_8->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_result->get_createdby( ).
lv_timestamp = lo_result->get_createdat( ).
lv_string = lo_result->get_lastmodifiedby( ).
lv_timestamp = lo_result->get_lastmodifiedat( ).
ENDIF.