/AWS1/IF_WA2=>LISTTAGSFORRESOURCE()¶
About ListTagsForResource¶
Retrieves the TagInfoForResource for the specified resource. Tags are key:value pairs that you can use to categorize and manage your resources, for purposes like billing. For example, you might set the tag key to "customer" and the value to the customer name or ID. You can specify one or more tags to add to each Amazon Web Services resource, up to 50 tags for a resource.
You can tag the Amazon Web Services resources that you manage through WAF: web ACLs, rule groups, IP sets, and regex pattern sets. You can't manage or view tags through the WAF console.
Method Signature¶
METHODS /AWS1/IF_WA2~LISTTAGSFORRESOURCE
IMPORTING
!IV_NEXTMARKER TYPE /AWS1/WA2NEXTMARKER OPTIONAL
!IV_LIMIT TYPE /AWS1/WA2PAGINATIONLIMIT OPTIONAL
!IV_RESOURCEARN TYPE /AWS1/WA2RESOURCEARN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wa2listtgsforresrcrsp
RAISING
/AWS1/CX_WA2WAFINTERNALERROREX
/AWS1/CX_WA2WAFINVALIDOPEX
/AWS1/CX_WA2WAFINVALIDPARAMEX
/AWS1/CX_WA2WAFNONEXENTITEMEX
/AWS1/CX_WA2WAFTAGOPERATIONEX
/AWS1/CX_WA2WAFTAGOPINTERNAL00
/AWS1/CX_WA2CLIENTEXC
/AWS1/CX_WA2SERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_resourcearn TYPE /AWS1/WA2RESOURCEARN /AWS1/WA2RESOURCEARN¶
The Amazon Resource Name (ARN) of the resource.
Optional arguments:¶
iv_nextmarker TYPE /AWS1/WA2NEXTMARKER /AWS1/WA2NEXTMARKER¶
When you request a list of objects with a
Limitsetting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarkervalue in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
iv_limit TYPE /AWS1/WA2PAGINATIONLIMIT /AWS1/WA2PAGINATIONLIMIT¶
The maximum number of objects that you want WAF to return for this request. If more objects are available, in the response, WAF provides a
NextMarkervalue that you can use in a subsequent call to get the next batch of objects.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_wa2listtgsforresrcrsp /AWS1/CL_WA2LISTTGSFORRESRCRSP¶
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->listtagsforresource(
iv_limit = 123
iv_nextmarker = |string|
iv_resourcearn = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_nextmarker = lo_result->get_nextmarker( ).
lo_taginfoforresource = lo_result->get_taginfoforresource( ).
IF lo_taginfoforresource IS NOT INITIAL.
lv_resourcearn = lo_taginfoforresource->get_resourcearn( ).
LOOP AT lo_taginfoforresource->get_taglist( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_tagkey = lo_row_1->get_key( ).
lv_tagvalue = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.