listTagsForResource

Lists all tags currently on a named resource.

A tag is a key-value pair where the key and value are case-sensitive. You can use tags to categorize and track all your ElastiCache resources, with the exception of global replication group. When you add or remove tags on replication groups, those actions will be replicated to all nodes in the replication group. For more information, see Resource-level permissions.

If the cluster is not in the available state, ListTagsForResource returns an error.

Samples


fun main() { 
   //sampleStart 
   // 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.
val resp = elastiCacheClient.listTagsForResource {
    resourceName = "arn:aws:elasticache:us-west-2:<my-account-id>:cluster:mycluster"
} 
   //sampleEnd
}