/AWS1/IF_DOG=>LISTRECOMMENDATIONS()¶
About ListRecommendations¶
Returns a list of a specified insight's recommendations. Each recommendation includes a list of related metrics and a list of related events.
Method Signature¶
METHODS /AWS1/IF_DOG~LISTRECOMMENDATIONS
IMPORTING
!IV_INSIGHTID TYPE /AWS1/DOGINSIGHTID OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/DOGUUIDNEXTTOKEN OPTIONAL
!IV_LOCALE TYPE /AWS1/DOGLOCALE OPTIONAL
!IV_ACCOUNTID TYPE /AWS1/DOGAWSACCOUNTID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_doglstrecommendatio01
RAISING
/AWS1/CX_DOGACCESSDENIEDEX
/AWS1/CX_DOGINTERNALSERVEREX
/AWS1/CX_DOGRESOURCENOTFOUNDEX
/AWS1/CX_DOGTHROTTLINGEX
/AWS1/CX_DOGVALIDATIONEX
/AWS1/CX_DOGCLIENTEXC
/AWS1/CX_DOGSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_insightid TYPE /AWS1/DOGINSIGHTID /AWS1/DOGINSIGHTID¶
The ID of the requested insight.
Optional arguments:¶
iv_nexttoken TYPE /AWS1/DOGUUIDNEXTTOKEN /AWS1/DOGUUIDNEXTTOKEN¶
The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.
iv_locale TYPE /AWS1/DOGLOCALE /AWS1/DOGLOCALE¶
A locale that specifies the language to use for recommendations.
iv_accountid TYPE /AWS1/DOGAWSACCOUNTID /AWS1/DOGAWSACCOUNTID¶
The ID of the Amazon Web Services account.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_doglstrecommendatio01 /AWS1/CL_DOGLSTRECOMMENDATIO01¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
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->listrecommendations(
iv_accountid = |string|
iv_insightid = |string|
iv_locale = |string|
iv_nexttoken = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_recommendations( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_recommendationdescripti = lo_row_1->get_description( ).
lv_recommendationlink = lo_row_1->get_link( ).
lv_recommendationname = lo_row_1->get_name( ).
lv_recommendationreason = lo_row_1->get_reason( ).
LOOP AT lo_row_1->get_relatedevents( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_recommendationrelatedev = lo_row_3->get_name( ).
LOOP AT lo_row_3->get_resources( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_recommendationrelatedev_1 = lo_row_5->get_name( ).
lv_recommendationrelatedev_2 = lo_row_5->get_type( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
LOOP AT lo_row_1->get_relatedanomalies( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
LOOP AT lo_row_7->get_resources( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_recommendationrelatedan = lo_row_9->get_name( ).
lv_recommendationrelatedan_1 = lo_row_9->get_type( ).
ENDIF.
ENDLOOP.
LOOP AT lo_row_7->get_sourcedetails( ) into lo_row_10.
lo_row_11 = lo_row_10.
IF lo_row_11 IS NOT INITIAL.
LOOP AT lo_row_11->get_cloudwatchmetrics( ) into lo_row_12.
lo_row_13 = lo_row_12.
IF lo_row_13 IS NOT INITIAL.
lv_recommendationrelatedcl = lo_row_13->get_metricname( ).
lv_recommendationrelatedcl_1 = lo_row_13->get_namespace( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
lv_anomalyid = lo_row_7->get_anomalyid( ).
ENDIF.
ENDLOOP.
lv_recommendationcategory = lo_row_1->get_category( ).
ENDIF.
ENDLOOP.
lv_uuidnexttoken = lo_result->get_nexttoken( ).
ENDIF.