Skip to content

Add Tags To Resource

elasticache_add_tags_to_resource R Documentation

A tag is a key-value pair where the key and value are case-sensitive

Description

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.

For example, you can use cost-allocation tags to your ElastiCache resources, Amazon generates a cost allocation report as a comma-separated value (CSV) file with your usage and costs aggregated by your tags. You can apply tags that represent business categories (such as cost centers, application names, or owners) to organize your costs across multiple services.

For more information, see Using Cost Allocation Tags in Amazon ElastiCache in the ElastiCache User Guide.

Usage

elasticache_add_tags_to_resource(ResourceName, Tags)

Arguments

ResourceName

[required] The Amazon Resource Name (ARN) of the resource to which the tags are to be added, for example arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster or arn:aws:elasticache:us-west-2:0123456789:snapshot:mySnapshot. ElastiCache resources are cluster and snapshot.

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

Tags

[required] A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted.

Value

A list with the following syntax:

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

Request syntax

svc$add_tags_to_resource(
  ResourceName = "string",
  Tags = list(
    list(
      Key = "string",
      Value = "string"
    )
  )
)