/AWS1/IF_WAR=>LISTTAGSFORRESOURCE()¶
About ListTagsForResource¶
This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide.
For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.
Retrieves the tags associated with the specified AWS 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 AWS resource, up to 50 tags for a resource.
Tagging is only available through the API, SDKs, and CLI. You can't manage or view tags through the AWS WAF Classic console. You can tag the AWS resources that you manage through AWS WAF Classic: web ACLs, rule groups, and rules.
Method Signature¶
METHODS /AWS1/IF_WAR~LISTTAGSFORRESOURCE
IMPORTING
!IV_NEXTMARKER TYPE /AWS1/WARNEXTMARKER OPTIONAL
!IV_LIMIT TYPE /AWS1/WARPAGINATIONLIMIT OPTIONAL
!IV_RESOURCEARN TYPE /AWS1/WARRESOURCEARN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_warlisttgsforresrcrsp
RAISING
/AWS1/CX_WARWAFBADREQUESTEX
/AWS1/CX_WARWAFINTERNALERROREX
/AWS1/CX_WARWAFINVALIDPARAMEX
/AWS1/CX_WARWAFNONEXENTITEMEX
/AWS1/CX_WARWAFTAGOPERATIONEX
/AWS1/CX_WARWAFTAGOPINTERNAL00
/AWS1/CX_WARCLIENTEXC
/AWS1/CX_WARSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_resourcearn TYPE /AWS1/WARRESOURCEARN /AWS1/WARRESOURCEARN¶
Optional arguments:¶
iv_nextmarker TYPE /AWS1/WARNEXTMARKER /AWS1/WARNEXTMARKER¶
iv_limit TYPE /AWS1/WARPAGINATIONLIMIT /AWS1/WARPAGINATIONLIMIT¶
RETURNING¶
oo_output TYPE REF TO /aws1/cl_warlisttgsforresrcrsp /AWS1/CL_WARLISTTGSFORRESRCRSP¶
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.