public class CreateTagsRequest extends AmazonWebServiceRequest implements java.io.Serializable, java.lang.Cloneable, DryRunSupportedRequest<CreateTagsRequest>
Contains the parameters for CreateTags.
Modifier and Type | Field and Description |
---|---|
private SdkInternalList<java.lang.String> |
resources
The IDs of one or more resources to tag.
|
private SdkInternalList<Tag> |
tags
One or more tags.
|
NOOP
Constructor and Description |
---|
CreateTagsRequest()
Default constructor for CreateTagsRequest object.
|
CreateTagsRequest(java.util.List<java.lang.String> resources,
java.util.List<Tag> tags)
Constructs a new CreateTagsRequest object.
|
Modifier and Type | Method and Description |
---|---|
CreateTagsRequest |
clone()
Creates a shallow clone of this request.
|
boolean |
equals(java.lang.Object obj) |
Request<CreateTagsRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
java.util.List<java.lang.String> |
getResources()
The IDs of one or more resources to tag.
|
java.util.List<Tag> |
getTags()
One or more tags.
|
int |
hashCode() |
void |
setResources(java.util.Collection<java.lang.String> resources)
The IDs of one or more resources to tag.
|
void |
setTags(java.util.Collection<Tag> tags)
One or more tags.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateTagsRequest |
withResources(java.util.Collection<java.lang.String> resources)
The IDs of one or more resources to tag.
|
CreateTagsRequest |
withResources(java.lang.String... resources)
The IDs of one or more resources to tag.
|
CreateTagsRequest |
withTags(java.util.Collection<Tag> tags)
One or more tags.
|
CreateTagsRequest |
withTags(Tag... tags)
One or more tags.
|
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
private SdkInternalList<java.lang.String> resources
The IDs of one or more resources to tag. For example, ami-1a2b3c4d.
private SdkInternalList<Tag> 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()
public CreateTagsRequest(java.util.List<java.lang.String> resources, java.util.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 java.util.List<java.lang.String> getResources()
The IDs of one or more resources to tag. For example, ami-1a2b3c4d.
public void setResources(java.util.Collection<java.lang.String> resources)
The IDs of one or more resources to tag. For example, ami-1a2b3c4d.
resources
- The IDs of one or more resources to tag. For example,
ami-1a2b3c4d.public CreateTagsRequest withResources(java.lang.String... resources)
The IDs of one or more resources to tag. For example, ami-1a2b3c4d.
NOTE: This method appends the values to the existing list (if
any). Use setResources(java.util.Collection)
or
withResources(java.util.Collection)
if you want to override the
existing values.
resources
- The IDs of one or more resources to tag. For example,
ami-1a2b3c4d.public CreateTagsRequest withResources(java.util.Collection<java.lang.String> resources)
The IDs of one or more resources to tag. For example, ami-1a2b3c4d.
resources
- The IDs of one or more resources to tag. For example,
ami-1a2b3c4d.public java.util.List<Tag> getTags()
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.
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(java.util.Collection<Tag> 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.
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)
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.
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.
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(java.util.Collection<Tag> 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.
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 java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public CreateTagsRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()