/AWS1/IF_FRM=>LISTRESOURCESCANRESOURCES()¶
About ListResourceScanResources¶
Lists the resources from a resource scan. The results can be filtered by resource identifier, resource type prefix, tag key, and tag value. Only resources that match all specified filters are returned. The response indicates whether each returned resource is already managed by CloudFormation.
Method Signature¶
METHODS /AWS1/IF_FRM~LISTRESOURCESCANRESOURCES
IMPORTING
!IV_RESOURCESCANID TYPE /AWS1/FRMRESOURCESCANID OPTIONAL
!IV_RESOURCEIDENTIFIER TYPE /AWS1/FRMRESOURCEIDENTIFIER OPTIONAL
!IV_RESOURCETYPEPREFIX TYPE /AWS1/FRMRESOURCETYPEPREFIX OPTIONAL
!IV_TAGKEY TYPE /AWS1/FRMTAGKEY OPTIONAL
!IV_TAGVALUE TYPE /AWS1/FRMTAGVALUE OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/FRMNEXTTOKEN OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/FRMRESRCSCANNERMAXRSLTS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_frmlstresrcscanresr01
RAISING
/AWS1/CX_FRMRESRCSCANINPRGSSEX
/AWS1/CX_FRMRESRCSCANNOTFNDEX
/AWS1/CX_FRMCLIENTEXC
/AWS1/CX_FRMSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_resourcescanid TYPE /AWS1/FRMRESOURCESCANID /AWS1/FRMRESOURCESCANID¶
The Amazon Resource Name (ARN) of the resource scan.
Optional arguments:¶
iv_resourceidentifier TYPE /AWS1/FRMRESOURCEIDENTIFIER /AWS1/FRMRESOURCEIDENTIFIER¶
If specified, the returned resources will have the specified resource identifier (or one of them in the case where the resource has multiple identifiers).
iv_resourcetypeprefix TYPE /AWS1/FRMRESOURCETYPEPREFIX /AWS1/FRMRESOURCETYPEPREFIX¶
If specified, the returned resources will be of any of the resource types with the specified prefix.
iv_tagkey TYPE /AWS1/FRMTAGKEY /AWS1/FRMTAGKEY¶
If specified, the returned resources will have a matching tag key.
iv_tagvalue TYPE /AWS1/FRMTAGVALUE /AWS1/FRMTAGVALUE¶
If specified, the returned resources will have a matching tag value.
iv_nexttoken TYPE /AWS1/FRMNEXTTOKEN /AWS1/FRMNEXTTOKEN¶
The token for the next set of items to return. (You received this token from a previous call.)
iv_maxresults TYPE /AWS1/FRMRESRCSCANNERMAXRSLTS /AWS1/FRMRESRCSCANNERMAXRSLTS¶
If the number of available results exceeds this maximum, the response includes a
NextTokenvalue that you can use for theNextTokenparameter to get the next set of results. By default theListResourceScanResourcesAPI action will return at most 100 results in each response. The maximum value is 100.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_frmlstresrcscanresr01 /AWS1/CL_FRMLSTRESRCSCANRESR01¶
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->listresourcescanresources(
iv_maxresults = 123
iv_nexttoken = |string|
iv_resourceidentifier = |string|
iv_resourcescanid = |string|
iv_resourcetypeprefix = |string|
iv_tagkey = |string|
iv_tagvalue = |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_resources( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_resourcetype = lo_row_1->get_resourcetype( ).
LOOP AT lo_row_1->get_resourceidentifier( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value = ls_row_2-value.
IF lo_value IS NOT INITIAL.
lv_jazzresourceidentifierp = lo_value->get_value( ).
ENDIF.
ENDLOOP.
lv_managedbystack = lo_row_1->get_managedbystack( ).
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.
To list the resources in your resource scan¶
This example lists the resources in your resource scan
DATA(lo_result) = lo_client->listresourcescanresources( iv_resourcescanid = |arn:aws:cloudformation:us-east-1:123456789012:resourceScan/c19304f6-c4f1-4ff8-8e1f-35162e41d7e1| ) .
To list the resources in your resource scan for specific resource type¶
This example lists the resources in your resource scan filtering only the resources that start with the passed in prefix
DATA(lo_result) = lo_client->listresourcescanresources(
iv_resourcescanid = |arn:aws:cloudformation:us-east-1:123456789012:resourceScan/c19304f6-c4f1-4ff8-8e1f-35162e41d7e1|
iv_resourcetypeprefix = |AWS::S3|
).