Skip to content

/AWS1/IF_TCE=>TAGRESOURCE()

About TagResource

Adds or overwrites one or more tags for the specified Amazon Web Services Agent Registry resource. Tags are key-value pairs that you can use to categorize and manage Amazon Web Services resources. If a tag with the same key already exists on the resource, the service replaces its value with the value you specify.

Method Signature

METHODS /AWS1/IF_TCE~TAGRESOURCE
  IMPORTING
    !IV_RESOURCEARN TYPE /AWS1/TCERESOURCEARN OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_TCETAGSMAP_W=>TT_TAGSMAP OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_tcetagresresponse
  RAISING
    /AWS1/CX_TCEACCESSDENIEDEX
    /AWS1/CX_TCEINTERNALSERVEREX
    /AWS1/CX_TCERESOURCENOTFOUNDEX
    /AWS1/CX_TCESERVICEQUOTAEXCDEX
    /AWS1/CX_TCETHROTTLINGEX
    /AWS1/CX_TCEVLDTNEXCEPTION
    /AWS1/CX_TCECLIENTEXC
    /AWS1/CX_TCESERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_resourcearn TYPE /AWS1/TCERESOURCEARN /AWS1/TCERESOURCEARN

The Amazon Resource Name (ARN) of the resource to tag. Supported resources include registries and registry records.

it_tags TYPE /AWS1/CL_TCETAGSMAP_W=>TT_TAGSMAP TT_TAGSMAP

The tags to apply to the resource, as a map of tag keys to tag values. Tag keys must be unique within the request.

RETURNING

oo_output TYPE REF TO /aws1/cl_tcetagresresponse /AWS1/CL_TCETAGRESRESPONSE

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->tagresource(
  it_tags = VALUE /aws1/cl_tcetagsmap_w=>tt_tagsmap(
    (
      VALUE /aws1/cl_tcetagsmap_w=>ts_tagsmap_maprow(
        key = |string|
        value = new /aws1/cl_tcetagsmap_w( |string| )
      )
    )
  )
  iv_resourcearn = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
ENDIF.