/AWS1/IF_TAD=>LISTRECSFORRESOURCE()¶
About ListRecommendationsForResource¶
List all Trusted Advisor recommendations for a given AWS resource ARN.
Method Signature¶
METHODS /AWS1/IF_TAD~LISTRECSFORRESOURCE
IMPORTING
!IV_NEXTTOKEN TYPE /AWS1/TADSTRING OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/TADINTEGER OPTIONAL
!IV_AWSRESOURCEARN TYPE /AWS1/TADAWSRESOURCEARN OPTIONAL
!IV_PILLAR TYPE /AWS1/TADRECOMMENDATIONPILLAR OPTIONAL
!IV_STATUS TYPE /AWS1/TADRESOURCESTATUS OPTIONAL
!IV_CHECKARN TYPE /AWS1/TADCHECKARN OPTIONAL
!IV_LANGUAGE TYPE /AWS1/TADRECOMMENDATIONLANGU00 OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_tadlistrecsforresrsp
RAISING
/AWS1/CX_TADACCESSDENIEDEX
/AWS1/CX_TADINTERNALSERVEREX
/AWS1/CX_TADTHROTTLINGEX
/AWS1/CX_TADVALIDATIONEX
/AWS1/CX_TADCLIENTEXC
/AWS1/CX_TADSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_awsresourcearn TYPE /AWS1/TADAWSRESOURCEARN /AWS1/TADAWSRESOURCEARN¶
The ARN of the AWS resource to query recommendations for
Optional arguments:¶
iv_nexttoken TYPE /AWS1/TADSTRING /AWS1/TADSTRING¶
The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
iv_maxresults TYPE /AWS1/TADINTEGER /AWS1/TADINTEGER¶
The maximum number of results to return per page
iv_pillar TYPE /AWS1/TADRECOMMENDATIONPILLAR /AWS1/TADRECOMMENDATIONPILLAR¶
The pillar that the recommendation belongs to
iv_status TYPE /AWS1/TADRESOURCESTATUS /AWS1/TADRESOURCESTATUS¶
The current status of the Recommendation Resource
iv_checkarn TYPE /AWS1/TADCHECKARN /AWS1/TADCHECKARN¶
The AWS Trusted Advisor Check ARN that relates to the Recommendation
iv_language TYPE /AWS1/TADRECOMMENDATIONLANGU00 /AWS1/TADRECOMMENDATIONLANGU00¶
The ISO 639-1 code for the language that you want your recommendations to appear in.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_tadlistrecsforresrsp /AWS1/CL_TADLISTRECSFORRESRSP¶
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->listrecsforresource(
iv_awsresourcearn = |string|
iv_checkarn = |string|
iv_language = |string|
iv_maxresults = 123
iv_nexttoken = |string|
iv_pillar = |string|
iv_status = |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_nexttoken( ).
LOOP AT lo_result->get_recforresourcesummaries( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_checkarn = lo_row_1->get_checkarn( ).
lv_accountrecommendationar = lo_row_1->get_recommendationarn( ).
lv_awsresourcearn = lo_row_1->get_awsresourcearn( ).
lv_resourcestatus = lo_row_1->get_status( ).
lv_timestamp = lo_row_1->get_lastupdatedat( ).
lv_exclusionstatus = lo_row_1->get_exclusionstatus( ).
LOOP AT lo_row_1->get_metadata( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value = ls_row_2-value.
IF lo_value IS NOT INITIAL.
lv_string = lo_value->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_row_1->get_pillars( ) into lo_row_3.
lo_row_4 = lo_row_3.
IF lo_row_4 IS NOT INITIAL.
lv_recommendationpillar = lo_row_4->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
List all Trusted Advisor Recommendations for an AWS Resource¶
List all Trusted Advisor Recommendations for an AWS Resource
DATA(lo_result) = lo_client->listrecsforresource( iv_awsresourcearn = |arn:aws:ec2:us-east-1:000000000000:instance/i-0abcd1234efgh5678| ) .