Skip to content

/AWS1/CL_MBC=>TAGRESOURCE()

About TagResource

Adds or overwrites the specified tags for the specified Amazon Managed Blockchain resource. Each tag consists of a key and optional value.

When you specify a tag key that already exists, the tag value is overwritten with the new value. Use UntagResource to remove tag keys.

A resource can have up to 50 tags. If you try to create more than 50 tags for a resource, your request fails and returns an error.

For more information about tags, see Tagging Resources in the Amazon Managed Blockchain Ethereum Developer Guide, or Tagging Resources in the Amazon Managed Blockchain Hyperledger Fabric Developer Guide.

Method Signature

IMPORTING

Required arguments:

iv_resourcearn TYPE /AWS1/MBCARNSTRING /AWS1/MBCARNSTRING

The Amazon Resource Name (ARN) of the resource. For more information about ARNs and their format, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.

it_tags TYPE /AWS1/CL_MBCINPUTTAGMAP_W=>TT_INPUTTAGMAP TT_INPUTTAGMAP

The tags to assign to the specified resource. Tag values can be empty, for example, "MyTagKey" : "". You can specify multiple key-value pairs in a single request, with an overall maximum of 50 tags added to each resource.

RETURNING

oo_output TYPE REF TO /aws1/cl_mbctagresourcersp /AWS1/CL_MBCTAGRESOURCERSP

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_mbc~tagresource(
  it_tags = VALUE /aws1/cl_mbcinputtagmap_w=>tt_inputtagmap(
    (
      VALUE /aws1/cl_mbcinputtagmap_w=>ts_inputtagmap_maprow(
        key = |string|
        value = new /aws1/cl_mbcinputtagmap_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.