public class CreateTagsRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
CreateTags operation.
Adds one or more tags to a specified resource.
A resource can have up to 10 tags. If you try to create more than 10 tags for a resource, you will receive an error and the attempt will fail.
If you specify a key that already exists for the resource, the value for that key will be updated with the new value.
NOOP| Constructor and Description |
|---|
CreateTagsRequest() |
| Modifier and Type | Method and Description |
|---|---|
CreateTagsRequest |
clone() |
boolean |
equals(Object obj) |
String |
getResourceName()
The Amazon Resource Name (ARN) to which you want to add the tag or
tags.
|
List<Tag> |
getTags()
One or more name/value pairs to add as tags to the specified resource.
|
int |
hashCode() |
void |
setResourceName(String resourceName)
The Amazon Resource Name (ARN) to which you want to add the tag or
tags.
|
void |
setTags(Collection<Tag> tags)
One or more name/value pairs to add as tags to the specified resource.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateTagsRequest |
withResourceName(String resourceName)
The Amazon Resource Name (ARN) to which you want to add the tag or
tags.
|
CreateTagsRequest |
withTags(Collection<Tag> tags)
One or more name/value pairs to add as tags to the specified resource.
|
CreateTagsRequest |
withTags(Tag... tags)
One or more name/value pairs to add as tags to the specified resource.
|
copyBaseTo, copyPrivateRequestParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic String getResourceName()
arn:aws:redshift:us-east-1:123456789:cluster:t1.arn:aws:redshift:us-east-1:123456789:cluster:t1.public void setResourceName(String resourceName)
arn:aws:redshift:us-east-1:123456789:cluster:t1.resourceName - The Amazon Resource Name (ARN) to which you want to add the tag or
tags. For example,
arn:aws:redshift:us-east-1:123456789:cluster:t1.public CreateTagsRequest withResourceName(String resourceName)
arn:aws:redshift:us-east-1:123456789:cluster:t1.
Returns a reference to this object so that method calls can be chained together.
resourceName - The Amazon Resource Name (ARN) to which you want to add the tag or
tags. For example,
arn:aws:redshift:us-east-1:123456789:cluster:t1.public List<Tag> getTags()
tag-key and
the corresponding value is passed in with the parameter
tag-value. The tag-key and
tag-value parameters are separated by a colon (:).
Separate multiple tags with a space. For example, --tags
"tag-key"="owner":"tag-value"="admin"
"tag-key"="environment":"tag-value"="test"
"tag-key"="version":"tag-value"="1.0".tag-key and
the corresponding value is passed in with the parameter
tag-value. The tag-key and
tag-value parameters are separated by a colon (:).
Separate multiple tags with a space. For example, --tags
"tag-key"="owner":"tag-value"="admin"
"tag-key"="environment":"tag-value"="test"
"tag-key"="version":"tag-value"="1.0".public void setTags(Collection<Tag> tags)
tag-key and
the corresponding value is passed in with the parameter
tag-value. The tag-key and
tag-value parameters are separated by a colon (:).
Separate multiple tags with a space. For example, --tags
"tag-key"="owner":"tag-value"="admin"
"tag-key"="environment":"tag-value"="test"
"tag-key"="version":"tag-value"="1.0".tags - One or more name/value pairs to add as tags to the specified resource.
Each tag name is passed in with the parameter tag-key and
the corresponding value is passed in with the parameter
tag-value. The tag-key and
tag-value parameters are separated by a colon (:).
Separate multiple tags with a space. For example, --tags
"tag-key"="owner":"tag-value"="admin"
"tag-key"="environment":"tag-value"="test"
"tag-key"="version":"tag-value"="1.0".public CreateTagsRequest withTags(Tag... tags)
tag-key and
the corresponding value is passed in with the parameter
tag-value. The tag-key and
tag-value parameters are separated by a colon (:).
Separate multiple tags with a space. For example, --tags
"tag-key"="owner":"tag-value"="admin"
"tag-key"="environment":"tag-value"="test"
"tag-key"="version":"tag-value"="1.0".
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 - One or more name/value pairs to add as tags to the specified resource.
Each tag name is passed in with the parameter tag-key and
the corresponding value is passed in with the parameter
tag-value. The tag-key and
tag-value parameters are separated by a colon (:).
Separate multiple tags with a space. For example, --tags
"tag-key"="owner":"tag-value"="admin"
"tag-key"="environment":"tag-value"="test"
"tag-key"="version":"tag-value"="1.0".public CreateTagsRequest withTags(Collection<Tag> tags)
tag-key and
the corresponding value is passed in with the parameter
tag-value. The tag-key and
tag-value parameters are separated by a colon (:).
Separate multiple tags with a space. For example, --tags
"tag-key"="owner":"tag-value"="admin"
"tag-key"="environment":"tag-value"="test"
"tag-key"="version":"tag-value"="1.0".
Returns a reference to this object so that method calls can be chained together.
tags - One or more name/value pairs to add as tags to the specified resource.
Each tag name is passed in with the parameter tag-key and
the corresponding value is passed in with the parameter
tag-value. The tag-key and
tag-value parameters are separated by a colon (:).
Separate multiple tags with a space. For example, --tags
"tag-key"="owner":"tag-value"="admin"
"tag-key"="environment":"tag-value"="test"
"tag-key"="version":"tag-value"="1.0".public String toString()
toString in class ObjectObject.toString()public CreateTagsRequest clone()
clone in class AmazonWebServiceRequestCopyright © 2015. All rights reserved.