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:
  • Constructor Details

    • 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. 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.
  • Method Details

    • 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) or withResources(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. 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.
    • 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) or withTags(java.util.Collection) if you want to override the existing values.

      Parameters:
      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.
      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. 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:
      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 interface DryRunSupportedRequest<CreateTagsRequest>
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • 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 class AmazonWebServiceRequest
      See Also: