Skip to content

/AWS1/IF_NWS=>LISTRESOURCESYNCSTATUSES()

About ListResourceSynchronizationStatuses

Lists the synchronization statuses of the resources covered by the specified deployment. You can filter the results by synchronization status and page through them.

Method Signature

METHODS /AWS1/IF_NWS~LISTRESOURCESYNCSTATUSES
  IMPORTING
    !IV_DEPLOYMENTIDENTIFIER TYPE /AWS1/NWSDEPLOYMENTIDENTIFIER OPTIONAL
    !IV_SYNCHRONIZATIONSTATUS TYPE /AWS1/NWSSYNCHRONIZATIONSTATUS OPTIONAL
    !IV_MAXRESULTS TYPE /AWS1/NWSMAXRESULTS OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/NWSNEXTTOKEN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_nwslistresyncstatsout
  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_deploymentidentifier TYPE /AWS1/NWSDEPLOYMENTIDENTIFIER /AWS1/NWSDEPLOYMENTIDENTIFIER

The identifier of the deployment to list synchronization statuses for. This is the deployment's Amazon Resource Name (ARN).

Optional arguments:

iv_synchronizationstatus TYPE /AWS1/NWSSYNCHRONIZATIONSTATUS /AWS1/NWSSYNCHRONIZATIONSTATUS

Filters the results by synchronization status, such as IN_SYNC or OUT_OF_SYNC.

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_nwslistresyncstatsout /AWS1/CL_NWSLISTRESYNCSTATSOUT

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->listresourcesyncstatuses(
  iv_deploymentidentifier = |string|
  iv_maxresults = 123
  iv_nexttoken = |string|
  iv_synchronizationstatus = |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_resourcesyncstatuses( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_synchronizationstatus = lo_row_1->get_synchronizationstatus( ).
      lv_accountid = lo_row_1->get_accountid( ).
      lv_arn = lo_row_1->get_resourcearn( ).
      lv_deploymentarn = lo_row_1->get_deploymentarn( ).
      lv_resourcetype = lo_row_1->get_resourcetype( ).
      lv_datetimestamp = lo_row_1->get_updatedat( ).
      lo_outofsyncreasonsview = lo_row_1->get_outofsyncreasons( ).
      IF lo_outofsyncreasonsview IS NOT INITIAL.
        LOOP AT lo_outofsyncreasonsview->get_reasons( ) into ls_row_2.
          lv_key = ls_row_2-key.
          lo_value = ls_row_2-value.
          IF lo_value IS NOT INITIAL.
            lv_string = lo_value->get_missingfirewall( ).
            lo_invalidfirewallreasons = lo_value->get_invalidfirewall( ).
            IF lo_invalidfirewallreasons IS NOT INITIAL.
              LOOP AT lo_invalidfirewallreasons->get_incorrsinglevalueconfs( ) into lo_row_3.
                lo_row_4 = lo_row_3.
                IF lo_row_4 IS NOT INITIAL.
                  lv_string = lo_row_4->get_configurationname( ).
                  lv_string = lo_row_4->get_expectedvalue( ).
                  lv_string = lo_row_4->get_actualvalue( ).
                ENDIF.
              ENDLOOP.
              LOOP AT lo_invalidfirewallreasons->get_missingapndconfvalues( ) into lo_row_3.
                lo_row_4 = lo_row_3.
                IF lo_row_4 IS NOT INITIAL.
                  lv_string = lo_row_4->get_configurationname( ).
                  lv_string = lo_row_4->get_expectedvalue( ).
                  lv_string = lo_row_4->get_actualvalue( ).
                ENDIF.
              ENDLOOP.
              LOOP AT lo_invalidfirewallreasons->get_unexpectedapndconfvalues( ) into lo_row_3.
                lo_row_4 = lo_row_3.
                IF lo_row_4 IS NOT INITIAL.
                  lv_string = lo_row_4->get_configurationname( ).
                  lv_string = lo_row_4->get_expectedvalue( ).
                  lv_string = lo_row_4->get_actualvalue( ).
                ENDIF.
              ENDLOOP.
              LOOP AT lo_invalidfirewallreasons->get_incorrectapndconforder( ) into lo_row_3.
                lo_row_4 = lo_row_3.
                IF lo_row_4 IS NOT INITIAL.
                  lv_string = lo_row_4->get_configurationname( ).
                  lv_string = lo_row_4->get_expectedvalue( ).
                  lv_string = lo_row_4->get_actualvalue( ).
                ENDIF.
              ENDLOOP.
              LOOP AT lo_invalidfirewallreasons->get_misgmergeableconfvalues( ) into lo_row_3.
                lo_row_4 = lo_row_3.
                IF lo_row_4 IS NOT INITIAL.
                  lv_string = lo_row_4->get_configurationname( ).
                  lv_string = lo_row_4->get_expectedvalue( ).
                  lv_string = lo_row_4->get_actualvalue( ).
                ENDIF.
              ENDLOOP.
              LOOP AT lo_invalidfirewallreasons->get_unexmergeableconfvalues( ) into lo_row_3.
                lo_row_4 = lo_row_3.
                IF lo_row_4 IS NOT INITIAL.
                  lv_string = lo_row_4->get_configurationname( ).
                  lv_string = lo_row_4->get_expectedvalue( ).
                  lv_string = lo_row_4->get_actualvalue( ).
                ENDIF.
              ENDLOOP.
            ENDIF.
          ENDIF.
        ENDLOOP.
        lo_notvisiblemarker = lo_outofsyncreasonsview->get_notvisible( ).
        IF lo_notvisiblemarker IS NOT INITIAL.
          lv_string = lo_notvisiblemarker->get_reason( ).
        ENDIF.
      ENDIF.
      lo_remediationissuesview = lo_row_1->get_remediationissues( ).
      IF lo_remediationissuesview IS NOT INITIAL.
        LOOP AT lo_remediationissuesview->get_issues( ) into ls_row_5.
          lv_key = ls_row_5-key.
          lo_value_1 = ls_row_5-value.
          IF lo_value_1 IS NOT INITIAL.
            lv_string = lo_value_1->get_issuetype( ).
            lv_string = lo_value_1->get_message( ).
            lv_string = lo_value_1->get_correctiveaction( ).
          ENDIF.
        ENDLOOP.
        lo_notvisiblemarker = lo_remediationissuesview->get_notvisible( ).
        IF lo_notvisiblemarker IS NOT INITIAL.
          lv_string = lo_notvisiblemarker->get_reason( ).
        ENDIF.
      ENDIF.
      lv_datetimestamp = lo_row_1->get_evaluatedat( ).
    ENDIF.
  ENDLOOP.
ENDIF.

List out-of-sync resources for a deployment

Lists the resources tracked by a deployment that are out of sync, including the structured reason. Here a CloudFront distribution has no web ACL where the policy requires one.

DATA(lo_result) = lo_client->listresourcesyncstatuses(
  iv_deploymentidentifier = |arn:aws:network-security-manager:us-east-1:123456789012:deployment:def456|
  iv_maxresults = 10
  iv_synchronizationstatus = |OUT_OF_SYNC|
).