AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the AddTagsToResource operation. 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.
Namespace: Amazon.ElastiCache.Model
Assembly: AWSSDK.ElastiCache.dll
Version: 3.x.y.z
public class AddTagsToResourceRequest : AmazonElastiCacheRequest IAmazonWebServiceRequest
The AddTagsToResourceRequest type exposes the following members
Name | Description | |
---|---|---|
AddTagsToResourceRequest() |
Name | Type | Description | |
---|---|---|---|
ResourceName | System.String |
Gets and sets the property ResourceName.
The Amazon Resource Name (ARN) of the resource to which the tags are to be added,
for example For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Service Namespaces. |
|
Tags | System.Collections.Generic.List<Amazon.ElastiCache.Model.Tag> |
Gets and sets the property Tags. 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. |
Adds up to 10 tags, key/value pairs, to a cluster or snapshot resource.
var client = new AmazonElastiCacheClient(); var response = client.AddTagsToResource(new AddTagsToResourceRequest { ResourceName = "arn:aws:elasticache:us-east-1:1234567890:cluster:my-mem-cluster", Tags = new List<Tag> { new Tag { Key = "APIVersion", Value = "20150202" }, new Tag { Key = "Service", Value = "ElastiCache" } } }); List<Tag> tagList = response.TagList;
.NET Core App:
Supported in: 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5, 4.0, 3.5