public class AddTagsToResourceRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
AddTagsToResource operation
.
The AddTagsToResource action adds up to 10 cost allocation tags to the named resource. A cost allocation tag is a key-value pair where the key and value are case-sensitive. Cost allocation tags can be used to categorize and track your AWS costs.
When you apply tags to your ElastiCache resources, AWS 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 .
NOOP
Constructor and Description |
---|
AddTagsToResourceRequest() |
Modifier and Type | Method and Description |
---|---|
AddTagsToResourceRequest |
clone()
Creates a shallow clone of this request.
|
boolean |
equals(Object obj) |
String |
getResourceName()
The name of the resource to which the tags are to be added, for
example
arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster . |
List<Tag> |
getTags()
A list of cost allocation tags to be added to this resource.
|
int |
hashCode() |
void |
setResourceName(String resourceName)
The name of the resource to which the tags are to be added, for
example
arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster . |
void |
setTags(Collection<Tag> tags)
A list of cost allocation tags to be added to this resource.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
AddTagsToResourceRequest |
withResourceName(String resourceName)
The name of the resource to which the tags are to be added, for
example
arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster . |
AddTagsToResourceRequest |
withTags(Collection<Tag> tags)
A list of cost allocation tags to be added to this resource.
|
AddTagsToResourceRequest |
withTags(Tag... tags)
A list of cost allocation tags to be added to this resource.
|
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public String getResourceName()
arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster
.arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster
.public void setResourceName(String resourceName)
arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster
.resourceName
- The name of the resource to which the tags are to be added, for
example
arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster
.public AddTagsToResourceRequest withResourceName(String resourceName)
arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster
.
Returns a reference to this object so that method calls can be chained together.
resourceName
- The name of the resource to which the tags are to be added, for
example
arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster
.public List<Tag> getTags()
public void setTags(Collection<Tag> tags)
tags
- A list of cost allocation tags to be added to this resource. A tag is
a key-value pair. A tag key must be accompanied by a tag value.public AddTagsToResourceRequest withTags(Tag... tags)
NOTE: This method appends the values to the existing list (if
any). Use setTags(java.util.Collection)
or withTags(java.util.Collection)
if you want to override the existing
values.
Returns a reference to this object so that method calls can be chained together.
tags
- A list of cost allocation tags to be added to this resource. A tag is
a key-value pair. A tag key must be accompanied by a tag value.public AddTagsToResourceRequest withTags(Collection<Tag> tags)
Returns a reference to this object so that method calls can be chained together.
tags
- A list of cost allocation tags to be added to this resource. A tag is
a key-value pair. A tag key must be accompanied by a tag value.public String toString()
toString
in class Object
Object.toString()
public AddTagsToResourceRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()
Copyright © 2015. All rights reserved.