Skip to content

List Tags For Resource

elasticache_list_tags_for_resource R Documentation

Lists all tags currently on a named resource

Description

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, list_tags_for_resource returns an error.

Usage

elasticache_list_tags_for_resource(ResourceName)

Arguments

ResourceName

[required] 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 Amazon Web Services Service Namespaces.

Value

A list with the following syntax:

list(
  TagList = list(
    list(
      Key = "string",
      Value = "string"
    )
  )
)

Request syntax

svc$list_tags_for_resource(
  ResourceName = "string"
)

Examples

## Not run: 
# 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.
svc$list_tags_for_resource(
  ResourceName = "arn:aws:elasticache:us-west-2:<my-account-id>:cluster:mycluster"
)

## End(Not run)