Skip to content

/AWS1/CL_SMI=>LISTINCIDENTRECORDS()

About ListIncidentRecords

Lists all incident records in your account. Use this command to retrieve the Amazon Resource Name (ARN) of the incident record you want to update.

Method Signature

IMPORTING

Optional arguments:

it_filters TYPE /AWS1/CL_SMIFILTER=>TT_FILTERLIST TT_FILTERLIST

Filters the list of incident records you want to search through. You can filter on the following keys:

  • creationTime

  • impact

  • status

  • createdBy

Note the following when when you use Filters:

  • If you don't specify a Filter, the response includes all incident records.

  • If you specify more than one filter in a single request, the response returns incident records that match all filters.

  • If you specify a filter with more than one value, the response returns incident records that match any of the values provided.

iv_maxresults TYPE /AWS1/SMIMAXRESULTS /AWS1/SMIMAXRESULTS

The maximum number of results per page.

iv_nexttoken TYPE /AWS1/SMINEXTTOKEN /AWS1/SMINEXTTOKEN

The pagination token for the next set of items to return. (You received this token from a previous call.)

RETURNING

oo_output TYPE REF TO /aws1/cl_smilstincidentrecsout /AWS1/CL_SMILSTINCIDENTRECSOUT

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_smi~listincidentrecords(
  it_filters = VALUE /aws1/cl_smifilter=>tt_filterlist(
    (
      new /aws1/cl_smifilter(
        io_condition = new /aws1/cl_smicondition(
          io_equals = new /aws1/cl_smiattributevaluelist(
            it_integervalues = VALUE /aws1/cl_smiintegerlist_w=>tt_integerlist(
              ( new /aws1/cl_smiintegerlist_w( 123 ) )
            )
            it_stringvalues = VALUE /aws1/cl_smistringlist_w=>tt_stringlist(
              ( new /aws1/cl_smistringlist_w( |string| ) )
            )
          )
          iv_after = '20150101000000.0000000'
          iv_before = '20150101000000.0000000'
        )
        iv_key = |string|
      )
    )
  )
  iv_maxresults = 123
  iv_nexttoken = |string|
).

This is an example of reading all possible response values

LOOP AT lo_result->get_incidentrecordsummaries( ) into lo_row.
  lv_arn = lo_row_1->get_arn( ).
  lv_incidenttitle = lo_row_1->get_title( ).
  lv_incidentrecordstatus = lo_row_1->get_status( ).
  lv_impact = lo_row_1->get_impact( ).
  lv_timestamp = lo_row_1->get_creationtime( ).
  lv_timestamp = lo_row_1->get_resolvedtime( ).
  lv_arn = lo_incidentrecordsource->get_createdby( ).
  lv_serviceprincipal = lo_incidentrecordsource->get_invokedby( ).
  lv_arn = lo_incidentrecordsource->get_resourcearn( ).
  lv_incidentsource = lo_incidentrecordsource->get_source( ).
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).