Menu
Amazon ElastiCache
API Reference (API Version 2015-02-02)

ListTagsForResource

Lists all cost allocation tags currently on the named resource. A cost allocation tag is a key-value pair where the key is case-sensitive and the value is optional. You can use cost allocation tags to categorize and track your AWS costs.

You can have a maximum of 50 cost allocation tags on an ElastiCache resource. For more information, see Using Cost Allocation Tags in Amazon ElastiCache.

Request Parameters

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

ResourceName

The Amazon Resource Name (ARN) of the resource for which you want the list of tags, for example arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster or arn:aws:elasticache:us-west-2:0123456789:snapshot:mySnapshot.

For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces.

Type: String

Required: Yes

Response Elements

The following element is returned by the service.

TagList.Tag.N

A list of cost allocation tags as key-value pairs.

Type: array of Tag objects

Errors

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

CacheClusterNotFound

The requested cache cluster ID does not refer to an existing cache cluster.

HTTP Status Code: 404

InvalidARN

The requested Amazon Resource Name (ARN) does not refer to an existing resource.

HTTP Status Code: 400

SnapshotNotFoundFault

The requested snapshot name does not refer to an existing snapshot.

HTTP Status Code: 404

Example

Sample Request

Copy
https://elasticache.us-east-1.amazonaws.com/ ?Action=ListTagsForResource &ResourceName=arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster &SignatureVersion=4 &SignatureMethod=HmacSHA256 &Version=2015-02-02 &Timestamp=20150202T192317Z &X-Amz-Credential=<credential>

See Also

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