Skip to content

/AWS1/IF_NWS=>LISTRULESNAPSHOTS()

About ListRuleSnapshots

Lists the snapshots of the specified rule.

Method Signature

METHODS /AWS1/IF_NWS~LISTRULESNAPSHOTS
  IMPORTING
    !IV_RULEIDENTIFIER TYPE /AWS1/NWSRULEIDENTIFIER OPTIONAL
    !IV_MAXRESULTS TYPE /AWS1/NWSMAXRESULTS OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/NWSNEXTTOKEN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_nwslistrulesnapsout
  RAISING
    /AWS1/CX_NWSACCESSDENIEDEX
    /AWS1/CX_NWSINTERNALSERVEREX
    /AWS1/CX_NWSRESOURCENOTFOUNDEX
    /AWS1/CX_NWSTHROTTLINGEX
    /AWS1/CX_NWSVLDTNEXCEPTION
    /AWS1/CX_NWSCLIENTEXC
    /AWS1/CX_NWSSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_ruleidentifier TYPE /AWS1/NWSRULEIDENTIFIER /AWS1/NWSRULEIDENTIFIER

The identifier of the rule. This is the rule's Amazon Resource Name (ARN).

Optional arguments:

iv_maxresults TYPE /AWS1/NWSMAXRESULTS /AWS1/NWSMAXRESULTS

The maximum number of results to return in a single call. Valid range: 1-100. To retrieve the remaining results, use the returned nextToken value in a subsequent call.

iv_nexttoken TYPE /AWS1/NWSNEXTTOKEN /AWS1/NWSNEXTTOKEN

The token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.

RETURNING

oo_output TYPE REF TO /aws1/cl_nwslistrulesnapsout /AWS1/CL_NWSLISTRULESNAPSOUT

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->listrulesnapshots(
  iv_maxresults = 123
  iv_nexttoken = |string|
  iv_ruleidentifier = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_nexttoken = lo_result->get_nexttoken( ).
  LOOP AT lo_result->get_snapshots( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_ruleid = lo_row_1->get_ruleid( ).
      lv_rulearn = lo_row_1->get_rulearn( ).
      lv_rulename = lo_row_1->get_rulename( ).
      lv_rulefirewalltype = lo_row_1->get_firewalltype( ).
      lv_ruletype = lo_row_1->get_ruletype( ).
      lv_entitystatus = lo_row_1->get_status( ).
      lv_entityversion = lo_row_1->get_version( ).
      lv_haspublishedversion = lo_row_1->get_haspublishedversion( ).
      lv_datetimestamp = lo_row_1->get_updatedat( ).
    ENDIF.
  ENDLOOP.
ENDIF.

List the snapshots of a rule

Lists the immutable snapshots that have been created for a rule.

DATA(lo_result) = lo_client->listrulesnapshots(
  iv_maxresults = 10
  iv_ruleidentifier = |arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123|
).