Skip to content

/AWS1/CL_HLT=>DESCRIBEAFFECTEDENTITIES()

About DescribeAffectedEntities

Returns a list of entities that have been affected by the specified events, based on the specified filter criteria. Entities can refer to individual customer resources, groups of customer resources, or any other construct, depending on the Amazon Web Services service. Events that have impact beyond that of the affected entities, or where the extent of impact is unknown, include at least one entity indicating this.

At least one event ARN is required.

  • This API operation uses pagination. Specify the nextToken parameter in the next request to return more results.

  • This operation supports resource-level permissions. You can use this operation to allow or deny access to specific Health events. For more information, see Resource- and action-based conditions in the Health User Guide.

Method Signature

IMPORTING

Required arguments:

io_filter TYPE REF TO /AWS1/CL_HLTENTITYFILTER /AWS1/CL_HLTENTITYFILTER

Values to narrow the results returned. At least one event ARN is required.

Optional arguments:

iv_locale TYPE /AWS1/HLTLOCALE /AWS1/HLTLOCALE

The locale (language) to return information in. English (en) is the default and the only supported value at this time.

iv_nexttoken TYPE /AWS1/HLTNEXTTOKEN /AWS1/HLTNEXTTOKEN

If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.

iv_maxresults TYPE /AWS1/HLTMAXRESULTS /AWS1/HLTMAXRESULTS

The maximum number of items to return in one batch, between 10 and 100, inclusive.

RETURNING

oo_output TYPE REF TO /aws1/cl_hltdscaffectedentrsp /AWS1/CL_HLTDSCAFFECTEDENTRSP

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_hlt~describeaffectedentities(
  io_filter = new /aws1/cl_hltentityfilter(
    it_entityarns = VALUE /aws1/cl_hltentityarnlist_w=>tt_entityarnlist(
      ( new /aws1/cl_hltentityarnlist_w( |string| ) )
    )
    it_entityvalues = VALUE /aws1/cl_hltentityvaluelist_w=>tt_entityvaluelist(
      ( new /aws1/cl_hltentityvaluelist_w( |string| ) )
    )
    it_eventarns = VALUE /aws1/cl_hlteventarnlist_w=>tt_eventarnlist(
      ( new /aws1/cl_hlteventarnlist_w( |string| ) )
    )
    it_lastupdatedtimes = VALUE /aws1/cl_hltdatetimerange=>tt_datetimerangelist(
      (
        new /aws1/cl_hltdatetimerange(
          iv_from = '20150101000000.0000000'
          iv_to = '20150101000000.0000000'
        )
      )
    )
    it_statuscodes = VALUE /aws1/cl_hltentstatcodelist_w=>tt_entitystatuscodelist(
      ( new /aws1/cl_hltentstatcodelist_w( |string| ) )
    )
    it_tags = VALUE /aws1/cl_hlttagset_w=>tt_tagfilter(
      (
        VALUE /aws1/cl_hlttagset_w=>tt_tagset(
          (
            VALUE /aws1/cl_hlttagset_w=>ts_tagset_maprow(
              value = new /aws1/cl_hlttagset_w( |string| )
              key = |string|
            )
          )
        )
      )
    )
  )
  iv_locale = |string|
  iv_maxresults = 123
  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_entities( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_entityarn = lo_row_1->get_entityarn( ).
      lv_eventarn = lo_row_1->get_eventarn( ).
      lv_entityvalue = lo_row_1->get_entityvalue( ).
      lv_entityurl = lo_row_1->get_entityurl( ).
      lv_accountid = lo_row_1->get_awsaccountid( ).
      lv_timestamp = lo_row_1->get_lastupdatedtime( ).
      lv_entitystatuscode = lo_row_1->get_statuscode( ).
      LOOP AT lo_row_1->get_tags( ) into ls_row_2.
        lv_key = ls_row_2-key.
        lo_value = ls_row_2-value.
        IF lo_value IS NOT INITIAL.
          lv_tagvalue = lo_value->get_value( ).
        ENDIF.
      ENDLOOP.
      LOOP AT lo_row_1->get_entitymetadata( ) into ls_row_3.
        lv_key_1 = ls_row_3-key.
        lo_value_1 = ls_row_3-value.
        IF lo_value_1 IS NOT INITIAL.
          lv_entitymetadatavalue = lo_value_1->get_value( ).
        ENDIF.
      ENDLOOP.
    ENDIF.
  ENDLOOP.
  lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.