Class ModifyImageAttributeRequest

java.lang.Object
com.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.ec2.model.ModifyImageAttributeRequest
All Implemented Interfaces:
ReadLimitInfo, DryRunSupportedRequest<ModifyImageAttributeRequest>, Serializable, Cloneable

public class ModifyImageAttributeRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<ModifyImageAttributeRequest>

Contains the parameters for ModifyImageAttribute.

See Also:
  • Constructor Details

    • ModifyImageAttributeRequest

      public ModifyImageAttributeRequest()
      Default constructor for ModifyImageAttributeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
    • ModifyImageAttributeRequest

      public ModifyImageAttributeRequest(String imageId, String attribute)
      Constructs a new ModifyImageAttributeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      Parameters:
      imageId - The ID of the AMI.
      attribute - The name of the attribute to modify.
  • Method Details

    • setImageId

      public void setImageId(String imageId)

      The ID of the AMI.

      Parameters:
      imageId - The ID of the AMI.
    • getImageId

      public String getImageId()

      The ID of the AMI.

      Returns:
      The ID of the AMI.
    • withImageId

      public ModifyImageAttributeRequest withImageId(String imageId)

      The ID of the AMI.

      Parameters:
      imageId - The ID of the AMI.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setAttribute

      public void setAttribute(String attribute)

      The name of the attribute to modify.

      Parameters:
      attribute - The name of the attribute to modify.
    • getAttribute

      public String getAttribute()

      The name of the attribute to modify.

      Returns:
      The name of the attribute to modify.
    • withAttribute

      public ModifyImageAttributeRequest withAttribute(String attribute)

      The name of the attribute to modify.

      Parameters:
      attribute - The name of the attribute to modify.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setOperationType

      public void setOperationType(String operationType)

      The operation type.

      Parameters:
      operationType - The operation type.
      See Also:
    • getOperationType

      public String getOperationType()

      The operation type.

      Returns:
      The operation type.
      See Also:
    • withOperationType

      public ModifyImageAttributeRequest withOperationType(String operationType)

      The operation type.

      Parameters:
      operationType - The operation type.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setOperationType

      public void setOperationType(OperationType operationType)

      The operation type.

      Parameters:
      operationType - The operation type.
      See Also:
    • withOperationType

      public ModifyImageAttributeRequest withOperationType(OperationType operationType)

      The operation type.

      Parameters:
      operationType - The operation type.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • getUserIds

      public List<String> getUserIds()

      One or more AWS account IDs. This is only valid when modifying the launchPermission attribute.

      Returns:
      One or more AWS account IDs. This is only valid when modifying the launchPermission attribute.
    • setUserIds

      public void setUserIds(Collection<String> userIds)

      One or more AWS account IDs. This is only valid when modifying the launchPermission attribute.

      Parameters:
      userIds - One or more AWS account IDs. This is only valid when modifying the launchPermission attribute.
    • withUserIds

      public ModifyImageAttributeRequest withUserIds(String... userIds)

      One or more AWS account IDs. This is only valid when modifying the launchPermission attribute.

      NOTE: This method appends the values to the existing list (if any). Use setUserIds(java.util.Collection) or withUserIds(java.util.Collection) if you want to override the existing values.

      Parameters:
      userIds - One or more AWS account IDs. This is only valid when modifying the launchPermission attribute.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withUserIds

      public ModifyImageAttributeRequest withUserIds(Collection<String> userIds)

      One or more AWS account IDs. This is only valid when modifying the launchPermission attribute.

      Parameters:
      userIds - One or more AWS account IDs. This is only valid when modifying the launchPermission attribute.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getUserGroups

      public List<String> getUserGroups()

      One or more user groups. This is only valid when modifying the launchPermission attribute.

      Returns:
      One or more user groups. This is only valid when modifying the launchPermission attribute.
    • setUserGroups

      public void setUserGroups(Collection<String> userGroups)

      One or more user groups. This is only valid when modifying the launchPermission attribute.

      Parameters:
      userGroups - One or more user groups. This is only valid when modifying the launchPermission attribute.
    • withUserGroups

      public ModifyImageAttributeRequest withUserGroups(String... userGroups)

      One or more user groups. This is only valid when modifying the launchPermission attribute.

      NOTE: This method appends the values to the existing list (if any). Use setUserGroups(java.util.Collection) or withUserGroups(java.util.Collection) if you want to override the existing values.

      Parameters:
      userGroups - One or more user groups. This is only valid when modifying the launchPermission attribute.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withUserGroups

      public ModifyImageAttributeRequest withUserGroups(Collection<String> userGroups)

      One or more user groups. This is only valid when modifying the launchPermission attribute.

      Parameters:
      userGroups - One or more user groups. This is only valid when modifying the launchPermission attribute.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getProductCodes

      public List<String> getProductCodes()

      One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying the productCodes attribute.

      Returns:
      One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying the productCodes attribute.
    • setProductCodes

      public void setProductCodes(Collection<String> productCodes)

      One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying the productCodes attribute.

      Parameters:
      productCodes - One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying the productCodes attribute.
    • withProductCodes

      public ModifyImageAttributeRequest withProductCodes(String... productCodes)

      One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying the productCodes attribute.

      NOTE: This method appends the values to the existing list (if any). Use setProductCodes(java.util.Collection) or withProductCodes(java.util.Collection) if you want to override the existing values.

      Parameters:
      productCodes - One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying the productCodes attribute.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withProductCodes

      public ModifyImageAttributeRequest withProductCodes(Collection<String> productCodes)

      One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying the productCodes attribute.

      Parameters:
      productCodes - One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying the productCodes attribute.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setValue

      public void setValue(String value)

      The value of the attribute being modified. This is only valid when modifying the description attribute.

      Parameters:
      value - The value of the attribute being modified. This is only valid when modifying the description attribute.
    • getValue

      public String getValue()

      The value of the attribute being modified. This is only valid when modifying the description attribute.

      Returns:
      The value of the attribute being modified. This is only valid when modifying the description attribute.
    • withValue

      public ModifyImageAttributeRequest withValue(String value)

      The value of the attribute being modified. This is only valid when modifying the description attribute.

      Parameters:
      value - The value of the attribute being modified. This is only valid when modifying the description attribute.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setLaunchPermission

      public void setLaunchPermission(LaunchPermissionModifications launchPermission)

      A launch permission modification.

      Parameters:
      launchPermission - A launch permission modification.
    • getLaunchPermission

      public LaunchPermissionModifications getLaunchPermission()

      A launch permission modification.

      Returns:
      A launch permission modification.
    • withLaunchPermission

      public ModifyImageAttributeRequest withLaunchPermission(LaunchPermissionModifications launchPermission)

      A launch permission modification.

      Parameters:
      launchPermission - A launch permission modification.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setDescription

      public void setDescription(String description)

      A description for the AMI.

      Parameters:
      description - A description for the AMI.
    • getDescription

      public String getDescription()

      A description for the AMI.

      Returns:
      A description for the AMI.
    • withDescription

      public ModifyImageAttributeRequest withDescription(String description)

      A description for the AMI.

      Parameters:
      description - A description for the AMI.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getDryRunRequest

      public Request<ModifyImageAttributeRequest> 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<ModifyImageAttributeRequest>
    • 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

      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: