/AWS1/IF_SHB=>LISTCONFPOLICYASSOCIATIONS()¶
About ListConfigurationPolicyAssociations¶
Provides information about the associations for your configuration policies and self-managed behavior. Only the Security Hub CSPM delegated administrator can invoke this operation from the home Region.
Method Signature¶
METHODS /AWS1/IF_SHB~LISTCONFPOLICYASSOCIATIONS
IMPORTING
!IV_NEXTTOKEN TYPE /AWS1/SHBNEXTTOKEN OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/SHBMAXRESULTS OPTIONAL
!IO_FILTERS TYPE REF TO /AWS1/CL_SHBASSOCIATIONFILTERS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_shblstconfplyassoci01
RAISING
/AWS1/CX_SHBACCESSDENIEDEX
/AWS1/CX_SHBINTERNALEXCEPTION
/AWS1/CX_SHBINVALIDACCESSEX
/AWS1/CX_SHBINVALIDINPUTEX
/AWS1/CX_SHBLIMITEXCEEDEDEX
/AWS1/CX_SHBCLIENTEXC
/AWS1/CX_SHBSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_nexttoken TYPE /AWS1/SHBNEXTTOKEN /AWS1/SHBNEXTTOKEN¶
The
NextTokenvalue that's returned from a previous paginatedListConfigurationPolicyAssociationsrequest whereMaxResultswas used but the results exceeded the value of that parameter. Pagination continues from the end of the previous response that returned theNextTokenvalue. This value isnullwhen there are no more results to return.
iv_maxresults TYPE /AWS1/SHBMAXRESULTS /AWS1/SHBMAXRESULTS¶
The maximum number of results that's returned by
ListConfigurationPoliciesin each page of the response. When this parameter is used,ListConfigurationPolicyAssociationsreturns the specified number of results in a single page and aNextTokenresponse element. You can see the remaining results of the initial request by sending anotherListConfigurationPolicyAssociationsrequest with the returnedNextTokenvalue. A valid range forMaxResultsis between 1 and 100.
io_filters TYPE REF TO /AWS1/CL_SHBASSOCIATIONFILTERS /AWS1/CL_SHBASSOCIATIONFILTERS¶
Options for filtering the
ListConfigurationPolicyAssociationsresponse. You can filter by the Amazon Resource Name (ARN) or universally unique identifier (UUID) of a configuration,AssociationType, orAssociationStatus.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_shblstconfplyassoci01 /AWS1/CL_SHBLSTCONFPLYASSOCI01¶
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->listconfpolicyassociations(
io_filters = new /aws1/cl_shbassociationfilters(
iv_associationstatus = |string|
iv_associationtype = |string|
iv_configurationpolicyid = |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_confplyassociationsums( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_nonemptystring = lo_row_1->get_configurationpolicyid( ).
lv_nonemptystring = lo_row_1->get_targetid( ).
lv_targettype = lo_row_1->get_targettype( ).
lv_associationtype = lo_row_1->get_associationtype( ).
lv_timestamp = lo_row_1->get_updatedat( ).
lv_configurationpolicyasso = lo_row_1->get_associationstatus( ).
lv_nonemptystring = lo_row_1->get_associationstatusmessage( ).
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.
To list configuration associations¶
This operation lists all of the associations between targets and configuration policies or self-managed behavior. Targets can include accounts, organizational units, or the root.
DATA(lo_result) = lo_client->listconfpolicyassociations(
io_filters = new /aws1/cl_shbassociationfilters( iv_associationtype = |APPLIED| )
iv_maxresults = 1
iv_nexttoken = |U1FsdGVkX19nBV2zoh+Gou9NgnulLJHWpn9xnG4hqSOhvw3o2JqjI86QDxdf|
).