public class CreateTagsRequest extends AmazonWebServiceRequest implements Serializable, DryRunSupportedRequest<CreateTagsRequest>
CreateTags operation.
Adds or overwrites tags for the specified resources. Each resource can have a maximum of 10 tags. Each tag consists of a key-value pair. Tag keys must be unique per resource.
| Constructor and Description |
|---|
CreateTagsRequest()
Default constructor for a new CreateTagsRequest object.
|
CreateTagsRequest(List<String> resources,
List<Tag> tags)
Constructs a new CreateTagsRequest object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Request<CreateTagsRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
List<String> |
getResources()
One or more IDs of resources to tag.
|
List<Tag> |
getTags()
The tags to add or overwrite for the specified resources.
|
int |
hashCode() |
void |
setResources(Collection<String> resources)
One or more IDs of resources to tag.
|
void |
setTags(Collection<Tag> tags)
The tags to add or overwrite for the specified resources.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateTagsRequest |
withResources(Collection<String> resources)
One or more IDs of resources to tag.
|
CreateTagsRequest |
withResources(String... resources)
One or more IDs of resources to tag.
|
CreateTagsRequest |
withTags(Collection<Tag> tags)
The tags to add or overwrite for the specified resources.
|
CreateTagsRequest |
withTags(Tag... tags)
The tags to add or overwrite for the specified resources.
|
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollectorpublic CreateTagsRequest()
public CreateTagsRequest(List<String> resources, List<Tag> tags)
resources - One or more IDs of resources to tag. This could be
the ID of an AMI, an instance, an EBS volume, or snapshot, etc.tags - The tags to add or overwrite for the specified resources.
Each tag item consists of a key-value pair.public List<String> getResources()
public void setResources(Collection<String> resources)
resources - One or more IDs of resources to tag. This could be the ID of an AMI,
an instance, an EBS volume, or snapshot, etc.public CreateTagsRequest withResources(String... resources)
Returns a reference to this object so that method calls can be chained together.
resources - One or more IDs of resources to tag. This could be the ID of an AMI,
an instance, an EBS volume, or snapshot, etc.public CreateTagsRequest withResources(Collection<String> resources)
Returns a reference to this object so that method calls can be chained together.
resources - One or more IDs of resources to tag. This could be the ID of an AMI,
an instance, an EBS volume, or snapshot, etc.public List<Tag> getTags()
public void setTags(Collection<Tag> tags)
tags - The tags to add or overwrite for the specified resources. Each tag
item consists of a key-value pair.public CreateTagsRequest withTags(Tag... tags)
Returns a reference to this object so that method calls can be chained together.
tags - The tags to add or overwrite for the specified resources. Each tag
item consists of a key-value pair.public CreateTagsRequest withTags(Collection<Tag> tags)
Returns a reference to this object so that method calls can be chained together.
tags - The tags to add or overwrite for the specified resources. Each tag
item consists of a key-value pair.public Request<CreateTagsRequest> getDryRunRequest()
getDryRunRequest in interface DryRunSupportedRequest<CreateTagsRequest>public String toString()
toString in class ObjectObject.toString()Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.