Skip to content

/AWS1/CL_REH=>BATCHUPDRECOMMENDATIONSTATUS()

About BatchUpdateRecommendationStatus

Enables you to include or exclude one or more operational recommendations.

Method Signature

IMPORTING

Required arguments:

iv_apparn TYPE /AWS1/REHARN /AWS1/REHARN

Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.

it_requestentries TYPE /AWS1/CL_REHUPRECOMMENDATION00=>TT_UPRECOMMENDATIONSTATREQEN00 TT_UPRECOMMENDATIONSTATREQEN00

Defines the list of operational recommendations that need to be included or excluded.

RETURNING

oo_output TYPE REF TO /aws1/cl_rehbtcuprecommendat01 /AWS1/CL_REHBTCUPRECOMMENDAT01

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->/aws1/if_reh~batchupdrecommendationstatus(
  it_requestentries = VALUE /aws1/cl_rehuprecommendation00=>tt_uprecommendationstatreqen00(
    (
      new /aws1/cl_rehuprecommendation00(
        io_item = new /aws1/cl_rehuprecommendation01(
          iv_resourceid = |string|
          iv_targetaccountid = |string|
          iv_targetregion = |string|
        )
        iv_appcomponentid = |string|
        iv_entryid = |string|
        iv_excluded = ABAP_TRUE
        iv_excludereason = |string|
        iv_referenceid = |string|
      )
    )
  )
  iv_apparn = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_arn = lo_result->get_apparn( ).
  LOOP AT lo_result->get_successfulentries( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_string255 = lo_row_1->get_entryid( ).
      lv_specreferenceid = lo_row_1->get_referenceid( ).
      lo_updaterecommendationsta = lo_row_1->get_item( ).
      IF lo_updaterecommendationsta IS NOT INITIAL.
        lv_string500 = lo_updaterecommendationsta->get_resourceid( ).
        lv_customerid = lo_updaterecommendationsta->get_targetaccountid( ).
        lv_awsregion = lo_updaterecommendationsta->get_targetregion( ).
      ENDIF.
      lv_booleanoptional = lo_row_1->get_excluded( ).
      lv_entityname255 = lo_row_1->get_appcomponentid( ).
      lv_excluderecommendationre = lo_row_1->get_excludereason( ).
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_failedentries( ) into lo_row_2.
    lo_row_3 = lo_row_2.
    IF lo_row_3 IS NOT INITIAL.
      lv_string255 = lo_row_3->get_entryid( ).
      lv_errormessage = lo_row_3->get_errormessage( ).
    ENDIF.
  ENDLOOP.
ENDIF.