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()
Creates a shallow clone of this request.
|
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.
|
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: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()
Key
and the
corresponding value is passed in with the parameter
Value
. The Key
and Value
parameters are separated by a comma (,). Separate multiple tags with a
space. For example, --tags "Key"="owner","Value"="admin"
"Key"="environment","Value"="test"
"Key"="version","Value"="1.0"
.Key
and the
corresponding value is passed in with the parameter
Value
. The Key
and Value
parameters are separated by a comma (,). Separate multiple tags with a
space. For example, --tags "Key"="owner","Value"="admin"
"Key"="environment","Value"="test"
"Key"="version","Value"="1.0"
.public void setTags(Collection<Tag> tags)
Key
and the
corresponding value is passed in with the parameter
Value
. The Key
and Value
parameters are separated by a comma (,). Separate multiple tags with a
space. For example, --tags "Key"="owner","Value"="admin"
"Key"="environment","Value"="test"
"Key"="version","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 Key
and the
corresponding value is passed in with the parameter
Value
. The Key
and Value
parameters are separated by a comma (,). Separate multiple tags with a
space. For example, --tags "Key"="owner","Value"="admin"
"Key"="environment","Value"="test"
"Key"="version","Value"="1.0"
.public CreateTagsRequest withTags(Tag... tags)
Key
and the
corresponding value is passed in with the parameter
Value
. The Key
and Value
parameters are separated by a comma (,). Separate multiple tags with a
space. For example, --tags "Key"="owner","Value"="admin"
"Key"="environment","Value"="test"
"Key"="version","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 Key
and the
corresponding value is passed in with the parameter
Value
. The Key
and Value
parameters are separated by a comma (,). Separate multiple tags with a
space. For example, --tags "Key"="owner","Value"="admin"
"Key"="environment","Value"="test"
"Key"="version","Value"="1.0"
.public CreateTagsRequest withTags(Collection<Tag> tags)
Key
and the
corresponding value is passed in with the parameter
Value
. The Key
and Value
parameters are separated by a comma (,). Separate multiple tags with a
space. For example, --tags "Key"="owner","Value"="admin"
"Key"="environment","Value"="test"
"Key"="version","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 Key
and the
corresponding value is passed in with the parameter
Value
. The Key
and Value
parameters are separated by a comma (,). Separate multiple tags with a
space. For example, --tags "Key"="owner","Value"="admin"
"Key"="environment","Value"="test"
"Key"="version","Value"="1.0"
.public String toString()
toString
in class Object
Object.toString()
public CreateTagsRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.