Using Tagging - Amazon Kinesis Data Analytics for SQL Applications Developer Guide (original) (raw)

This section describes how to add key-value metadata tags to Kinesis Data Analytics applications. These tags can be used for the following purposes:

Note the following information about tagging:

Adding Tags when an Application is Created

You add tags when creating an application using the tags parameter of the CreateApplication action.

The following example request shows the Tags node for a CreateApplication request:

"Tags": [ 
    { 
        "Key": "Key1",
        "Value": "Value1"
    },
    { 
        "Key": "Key2",
        "Value": "Value2"
    }
]

Adding or Updating Tags for an Existing Application

You add tags to an application using the TagResource action. You cannot add tags to an application using the UpdateApplication action.

To update an existing tag, add a tag with the same key of the existing tag.

The following example request for the TagResource action adds new tags or updates existing tags:

{
   "ResourceARN": "string",
   "Tags": [ 
      { 
         "Key": "NewTagKey",
         "Value": "NewTagValue"
      },
      { 
         "Key": "ExistingKeyOfTagToUpdate",
         "Value": "NewValueForExistingTag"
      }
   ]
}

Listing Tags for an Application

To list existing tags, you use the ListTagsForResource action.

The following example request for the ListTagsForResource action lists tags for an application:

{
   "ResourceARN": "arn:aws:kinesisanalytics:us-west-2:012345678901:application/MyApplication"
}

Removing Tags from an Application

To remove tags from an application, you use the UntagResource action.

The following example request for the UntagResource action removes tags from an application:

{
   "ResourceARN": "arn:aws:kinesisanalytics:us-west-2:012345678901:application/MyApplication",
   "TagKeys": [ "KeyOfFirstTagToRemove", "KeyOfSecondTagToRemove" ]
}