ListTagsForResource - Amazon CloudWatch Application Insights

ListTagsForResource

Retrieve a list of the tags (keys and values) that are associated with a specified application. A tag is a label that you optionally define and associate with an application. Each tag consists of a required tag key and an optional associated tag value. A tag key is a general label that acts as a category for more specific tag values. A tag value acts as a descriptor within a tag key.

Request Syntax

{ "ResourceARN": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

ResourceARN

The Amazon Resource Name (ARN) of the application that you want to retrieve tag information for.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1011.

Pattern: ^arn:aws(-\w+)*:[\w\d-]+:([\w\d-]*)?:[\w\d_-]*([:/].+)*$

Required: Yes

Response Syntax

{ "Tags": [ { "Key": "string", "Value": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Tags

An array that lists all the tags that are associated with the application. Each tag consists of a required tag key (Key) and an associated tag value (Value).

Type: Array of Tag objects

Array Members: Minimum number of 0 items. Maximum number of 200 items.

Errors

For information about the errors that are common to all actions, see Common Errors.

ResourceNotFoundException

The resource does not exist in the customer account.

HTTP Status Code: 400

ValidationException

The parameter is not valid.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: