public class CreateTagsRequest extends AmazonWebServiceRequest implements Serializable, DryRunSupportedRequest<CreateTagsRequest>
CreateTags operation.
Adds or overwrites one or more tags for the specified EC2 resource or resources. Each resource can have a maximum of 10 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.
For more information about tags, see Tagging Your Resources in the Amazon Elastic Compute Cloud User Guide .
| 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()
The IDs of one or more resources to tag.
|
List<Tag> |
getTags()
One or more tags.
|
int |
hashCode() |
void |
setResources(Collection<String> resources)
The IDs of one or more resources to tag.
|
void |
setTags(Collection<Tag> tags)
One or more tags.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateTagsRequest |
withResources(Collection<String> resources)
The IDs of one or more resources to tag.
|
CreateTagsRequest |
withResources(String... resources)
The IDs of one or more resources to tag.
|
CreateTagsRequest |
withTags(Collection<Tag> tags)
One or more tags.
|
CreateTagsRequest |
withTags(Tag... tags)
One or more tags.
|
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setDelegationToken, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollectorpublic CreateTagsRequest()
public CreateTagsRequest(List<String> resources, List<Tag> tags)
resources - The IDs of one or more resources to tag. For example,
ami-1a2b3c4d.tags - One or more tags. The value parameter is
required, but if you don't want the tag to have a value, specify the
parameter with no value, and we set the value to an empty string.public List<String> getResources()
public void setResources(Collection<String> resources)
resources - The IDs of one or more resources to tag. For example, ami-1a2b3c4d.public CreateTagsRequest withResources(String... resources)
Returns a reference to this object so that method calls can be chained together.
resources - The IDs of one or more resources to tag. For example, ami-1a2b3c4d.public CreateTagsRequest withResources(Collection<String> resources)
Returns a reference to this object so that method calls can be chained together.
resources - The IDs of one or more resources to tag. For example, ami-1a2b3c4d.public List<Tag> getTags()
value parameter is required, but if
you don't want the tag to have a value, specify the parameter with no
value, and we set the value to an empty string.value parameter is required, but if
you don't want the tag to have a value, specify the parameter with no
value, and we set the value to an empty string.public void setTags(Collection<Tag> tags)
value parameter is required, but if
you don't want the tag to have a value, specify the parameter with no
value, and we set the value to an empty string.tags - One or more tags. The value parameter is required, but if
you don't want the tag to have a value, specify the parameter with no
value, and we set the value to an empty string.public CreateTagsRequest withTags(Tag... tags)
value parameter is required, but if
you don't want the tag to have a value, specify the parameter with no
value, and we set the value to an empty string.
Returns a reference to this object so that method calls can be chained together.
tags - One or more tags. The value parameter is required, but if
you don't want the tag to have a value, specify the parameter with no
value, and we set the value to an empty string.public CreateTagsRequest withTags(Collection<Tag> tags)
value parameter is required, but if
you don't want the tag to have a value, specify the parameter with no
value, and we set the value to an empty string.
Returns a reference to this object so that method calls can be chained together.
tags - One or more tags. The value parameter is required, but if
you don't want the tag to have a value, specify the parameter with no
value, and we set the value to an empty string.public Request<CreateTagsRequest> getDryRunRequest()
getDryRunRequest in interface DryRunSupportedRequest<CreateTagsRequest>public String toString()
toString in class ObjectObject.toString()Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.