Working with tags using the Amazon CLI and the Amazon EMR Serverless API - Amazon EMR
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Working with tags using the Amazon CLI and the Amazon EMR Serverless API

Use the following Amazon CLI commands or Amazon EMR Serverless API operations to add, update, list, and delete the tags for your resources.

Resource Supports tags Supports tag propagation
Add or overwrite one or more tags tag-resource TagResource
List tags for a resource list-tags-for-resource ListTagsForResource
Delete one or more tags untag-resource UntagResource

The following examples show how to tag or untag resources using the Amazon CLI.

Tag an existing application

The following command tags an existing application.

aws emr-serverless tag-resource --resource-arn resource_ARN --tags team=devs

Untag an existing application

The following command deletes a tag from an existing application.

aws emr-serverless untag-resource --resource-arn resource_ARN --tag-keys tag_key

List tags for a resource

The following command lists the tags associated with an existing resource.

aws emr-serverless list-tags-for-resource --resource-arn resource_ARN