/AWS1/CL_EC2=>DELETETAGS()
¶
About DeleteTags¶
Deletes the specified set of tags from the specified set of resources.
To list the current tags, use DescribeTags. For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide.
Method Signature¶
IMPORTING¶
Required arguments:¶
it_resources
TYPE /AWS1/CL_EC2RESOURCEIDLIST_W=>TT_RESOURCEIDLIST
TT_RESOURCEIDLIST
¶
The IDs of the resources, separated by spaces.
Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches.
Optional arguments:¶
iv_dryrun
TYPE /AWS1/EC2BOOLEAN
/AWS1/EC2BOOLEAN
¶
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.
it_tags
TYPE /AWS1/CL_EC2TAG=>TT_TAGLIST
TT_TAGLIST
¶
The tags to delete. Specify a tag key and an optional tag value to delete specific tags. If you specify a tag key without a tag value, we delete any tag with this key regardless of its value. If you specify a tag key with an empty string as the tag value, we delete the tag only if its value is an empty string.
If you omit this parameter, we delete all user-defined tags for the specified resources. We do not delete Amazon Web Services-generated tags (tags that have the
aws:
prefix).Constraints: Up to 1000 tags.
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.
lo_client->/aws1/if_ec2~deletetags(
it_resources = VALUE /aws1/cl_ec2resourceidlist_w=>tt_resourceidlist(
( new /aws1/cl_ec2resourceidlist_w( |string| ) )
)
it_tags = VALUE /aws1/cl_ec2tag=>tt_taglist(
(
new /aws1/cl_ec2tag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_dryrun = ABAP_TRUE
).
To delete a tag from a resource¶
This example deletes the tag Stack=test from the specified image.
lo_client->/aws1/if_ec2~deletetags(
it_resources = VALUE /aws1/cl_ec2resourceidlist_w=>tt_resourceidlist(
( new /aws1/cl_ec2resourceidlist_w( |ami-78a54011| ) )
)
it_tags = VALUE /aws1/cl_ec2tag=>tt_taglist(
(
new /aws1/cl_ec2tag(
iv_key = |Stack|
iv_value = |test|
)
)
)
).