/AWS1/CL_SHB=>LISTCONFPOLICYASSOCIATIONS()
¶
About ListConfigurationPolicyAssociations¶
Provides information about the associations for your configuration policies and self-managed behavior. Only the Security Hub delegated administrator can invoke this operation from the home Region.
Method Signature¶
IMPORTING¶
Optional arguments:¶
iv_nexttoken
TYPE /AWS1/SHBNEXTTOKEN
/AWS1/SHBNEXTTOKEN
¶
The
NextToken
value that's returned from a previous paginatedListConfigurationPolicyAssociations
request whereMaxResults
was used but the results exceeded the value of that parameter. Pagination continues from the end of the previous response that returned theNextToken
value. This value isnull
when there are no more results to return.
iv_maxresults
TYPE /AWS1/SHBMAXRESULTS
/AWS1/SHBMAXRESULTS
¶
The maximum number of results that's returned by
ListConfigurationPolicies
in each page of the response. When this parameter is used,ListConfigurationPolicyAssociations
returns the specified number of results in a single page and aNextToken
response element. You can see the remaining results of the initial request by sending anotherListConfigurationPolicyAssociations
request with the returnedNextToken
value. A valid range forMaxResults
is between 1 and 100.
io_filters
TYPE REF TO /AWS1/CL_SHBASSOCIATIONFILTERS
/AWS1/CL_SHBASSOCIATIONFILTERS
¶
Options for filtering the
ListConfigurationPolicyAssociations
response. 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
¶
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_shb~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->/aws1/if_shb~listconfpolicyassociations(
io_filters = new /aws1/cl_shbassociationfilters( iv_associationtype = |APPLIED| )
iv_maxresults = 1
iv_nexttoken = |U1FsdGVkX19nBV2zoh+Gou9NgnulLJHWpn9xnG4hqSOhvw3o2JqjI86QDxdf|
).