Class CreateTagsRequest
- java.lang.Object
-
- com.amazonaws.AmazonWebServiceRequest
-
- com.amazonaws.services.ec2.model.CreateTagsRequest
-
- All Implemented Interfaces:
ReadLimitInfo
,DryRunSupportedRequest<CreateTagsRequest>
,Serializable
,Cloneable
public class CreateTagsRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<CreateTagsRequest>
Contains the parameters for CreateTags.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
-
Constructor Summary
Constructors Constructor Description CreateTagsRequest()
Default constructor for CreateTagsRequest object.CreateTagsRequest(List<String> resources, List<Tag> tags)
Constructs a new CreateTagsRequest object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateTagsRequest
clone()
Creates a shallow clone of this request.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(String... resources)
The IDs of one or more resources to tag.CreateTagsRequest
withResources(Collection<String> resources)
The IDs of one or more resources to tag.CreateTagsRequest
withTags(Tag... tags)
One or more tags.CreateTagsRequest
withTags(Collection<Tag> tags)
One or more tags.-
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
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
-
-
-
-
Constructor Detail
-
CreateTagsRequest
public CreateTagsRequest()
Default constructor for CreateTagsRequest object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
-
CreateTagsRequest
public CreateTagsRequest(List<String> resources, List<Tag> tags)
Constructs a new CreateTagsRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- Parameters:
resources
- The IDs of one or more resources to tag. For example, ami-1a2b3c4d.tags
- One or more tags. Thevalue
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.
-
-
Method Detail
-
getResources
public List<String> getResources()
The IDs of one or more resources to tag. For example, ami-1a2b3c4d.
- Returns:
- The IDs of one or more resources to tag. For example, ami-1a2b3c4d.
-
setResources
public void setResources(Collection<String> resources)
The IDs of one or more resources to tag. For example, ami-1a2b3c4d.
- Parameters:
resources
- The IDs of one or more resources to tag. For example, ami-1a2b3c4d.
-
withResources
public CreateTagsRequest withResources(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)
orwithResources(java.util.Collection)
if you want to override the existing values.- Parameters:
resources
- The IDs of one or more resources to tag. For example, ami-1a2b3c4d.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withResources
public CreateTagsRequest withResources(Collection<String> resources)
The IDs of one or more resources to tag. For example, ami-1a2b3c4d.
- Parameters:
resources
- The IDs of one or more resources to tag. For example, ami-1a2b3c4d.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getTags
public 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.- Returns:
- 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.
-
setTags
public void setTags(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.- Parameters:
tags
- One or more tags. Thevalue
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.
-
withTags
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)
orwithTags(java.util.Collection)
if you want to override the existing values.- Parameters:
tags
- One or more tags. Thevalue
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:
- Returns a reference to this object so that method calls can be chained together.
-
withTags
public CreateTagsRequest withTags(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.- Parameters:
tags
- One or more tags. Thevalue
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:
- Returns a reference to this object so that method calls can be chained together.
-
getDryRunRequest
public Request<CreateTagsRequest> getDryRunRequest()
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.- Specified by:
getDryRunRequest
in interfaceDryRunSupportedRequest<CreateTagsRequest>
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public CreateTagsRequest clone()
Description copied from class:AmazonWebServiceRequest
Creates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.- Overrides:
clone
in classAmazonWebServiceRequest
- See Also:
Object.clone()
-
-