com.amazonaws.services.ec2.model
Class ModifyImageAttributeRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.ModifyImageAttributeRequest

public class ModifyImageAttributeRequest
extends AmazonWebServiceRequest

Container for the parameters to the ModifyImageAttribute operation.

The ModifyImageAttribute operation modifies an attribute of an AMI.

See Also:
AmazonEC2.modifyImageAttribute(ModifyImageAttributeRequest)

Constructor Summary
ModifyImageAttributeRequest()
          Default constructor for a new ModifyImageAttributeRequest object.
ModifyImageAttributeRequest(String imageId, String attribute)
          Constructs a new ModifyImageAttributeRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 String getAttribute()
          The name of the AMI attribute you want to modify.
 String getDescription()
          String value
 String getImageId()
          The ID of the AMI whose attribute you want to modify.
 LaunchPermissionModifications getLaunchPermission()
          Returns the value of the LaunchPermission property for this object.
 String getOperationType()
          The type of operation being requested.
 List<String> getProductCodes()
          The list of product codes being added to or removed from the specified AMI.
 List<String> getUserGroups()
          The user group being added to or removed from the list of user groups with launch permissions for this AMI.
 List<String> getUserIds()
          The AWS user ID being added to or removed from the list of users with launch permissions for this AMI.
 String getValue()
          The value of the attribute being modified.
 int hashCode()
           
 void setAttribute(String attribute)
          The name of the AMI attribute you want to modify.
 void setDescription(String description)
          String value
 void setImageId(String imageId)
          The ID of the AMI whose attribute you want to modify.
 void setLaunchPermission(LaunchPermissionModifications launchPermission)
          Sets the value of the LaunchPermission property for this object.
 void setOperationType(String operationType)
          The type of operation being requested.
 void setProductCodes(Collection<String> productCodes)
          The list of product codes being added to or removed from the specified AMI.
 void setUserGroups(Collection<String> userGroups)
          The user group being added to or removed from the list of user groups with launch permissions for this AMI.
 void setUserIds(Collection<String> userIds)
          The AWS user ID being added to or removed from the list of users with launch permissions for this AMI.
 void setValue(String value)
          The value of the attribute being modified.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 ModifyImageAttributeRequest withAttribute(String attribute)
          The name of the AMI attribute you want to modify.
 ModifyImageAttributeRequest withDescription(String description)
          String value
 ModifyImageAttributeRequest withImageId(String imageId)
          The ID of the AMI whose attribute you want to modify.
 ModifyImageAttributeRequest withLaunchPermission(LaunchPermissionModifications launchPermission)
          Sets the value of the LaunchPermission property for this object.
 ModifyImageAttributeRequest withOperationType(String operationType)
          The type of operation being requested.
 ModifyImageAttributeRequest withProductCodes(Collection<String> productCodes)
          The list of product codes being added to or removed from the specified AMI.
 ModifyImageAttributeRequest withProductCodes(String... productCodes)
          The list of product codes being added to or removed from the specified AMI.
 ModifyImageAttributeRequest withUserGroups(Collection<String> userGroups)
          The user group being added to or removed from the list of user groups with launch permissions for this AMI.
 ModifyImageAttributeRequest withUserGroups(String... userGroups)
          The user group being added to or removed from the list of user groups with launch permissions for this AMI.
 ModifyImageAttributeRequest withUserIds(Collection<String> userIds)
          The AWS user ID being added to or removed from the list of users with launch permissions for this AMI.
 ModifyImageAttributeRequest withUserIds(String... userIds)
          The AWS user ID being added to or removed from the list of users with launch permissions for this AMI.
 ModifyImageAttributeRequest withValue(String value)
          The value of the attribute being modified.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModifyImageAttributeRequest

public ModifyImageAttributeRequest()
Default constructor for a new ModifyImageAttributeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this 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 whose attribute you want to modify.
attribute - The name of the AMI attribute you want to modify.

Available attributes: launchPermission, productCodes

Method Detail

getImageId

public String getImageId()
The ID of the AMI whose attribute you want to modify.

Returns:
The ID of the AMI whose attribute you want to modify.

setImageId

public void setImageId(String imageId)
The ID of the AMI whose attribute you want to modify.

Parameters:
imageId - The ID of the AMI whose attribute you want to modify.

withImageId

public ModifyImageAttributeRequest withImageId(String imageId)
The ID of the AMI whose attribute you want to modify.

Returns a reference to this object so that method calls can be chained together.

Parameters:
imageId - The ID of the AMI whose attribute you want to modify.
Returns:
A reference to this updated object so that method calls can be chained together.

getAttribute

public String getAttribute()
The name of the AMI attribute you want to modify.

Available attributes: launchPermission, productCodes

Returns:
The name of the AMI attribute you want to modify.

Available attributes: launchPermission, productCodes


setAttribute

public void setAttribute(String attribute)
The name of the AMI attribute you want to modify.

Available attributes: launchPermission, productCodes

Parameters:
attribute - The name of the AMI attribute you want to modify.

Available attributes: launchPermission, productCodes


withAttribute

public ModifyImageAttributeRequest withAttribute(String attribute)
The name of the AMI attribute you want to modify.

Available attributes: launchPermission, productCodes

Returns a reference to this object so that method calls can be chained together.

Parameters:
attribute - The name of the AMI attribute you want to modify.

Available attributes: launchPermission, productCodes

Returns:
A reference to this updated object so that method calls can be chained together.

getOperationType

public String getOperationType()
The type of operation being requested.

Available operation types: add, remove

Returns:
The type of operation being requested.

Available operation types: add, remove


setOperationType

public void setOperationType(String operationType)
The type of operation being requested.

Available operation types: add, remove

Parameters:
operationType - The type of operation being requested.

Available operation types: add, remove


withOperationType

public ModifyImageAttributeRequest withOperationType(String operationType)
The type of operation being requested.

Available operation types: add, remove

Returns a reference to this object so that method calls can be chained together.

Parameters:
operationType - The type of operation being requested.

Available operation types: add, remove

Returns:
A reference to this updated object so that method calls can be chained together.

getUserIds

public List<String> getUserIds()
The AWS user ID being added to or removed from the list of users with launch permissions for this AMI. Only valid when the launchPermission attribute is being modified.

Returns:
The AWS user ID being added to or removed from the list of users with launch permissions for this AMI. Only valid when the launchPermission attribute is being modified.

setUserIds

public void setUserIds(Collection<String> userIds)
The AWS user ID being added to or removed from the list of users with launch permissions for this AMI. Only valid when the launchPermission attribute is being modified.

Parameters:
userIds - The AWS user ID being added to or removed from the list of users with launch permissions for this AMI. Only valid when the launchPermission attribute is being modified.

withUserIds

public ModifyImageAttributeRequest withUserIds(String... userIds)
The AWS user ID being added to or removed from the list of users with launch permissions for this AMI. Only valid when the launchPermission attribute is being modified.

Returns a reference to this object so that method calls can be chained together.

Parameters:
userIds - The AWS user ID being added to or removed from the list of users with launch permissions for this AMI. Only valid when the launchPermission attribute is being modified.
Returns:
A reference to this updated object so that method calls can be chained together.

withUserIds

public ModifyImageAttributeRequest withUserIds(Collection<String> userIds)
The AWS user ID being added to or removed from the list of users with launch permissions for this AMI. Only valid when the launchPermission attribute is being modified.

Returns a reference to this object so that method calls can be chained together.

Parameters:
userIds - The AWS user ID being added to or removed from the list of users with launch permissions for this AMI. Only valid when the launchPermission attribute is being modified.
Returns:
A reference to this updated object so that method calls can be chained together.

getUserGroups

public List<String> getUserGroups()
The user group being added to or removed from the list of user groups with launch permissions for this AMI. Only valid when the launchPermission attribute is being modified.

Available user groups: all

Returns:
The user group being added to or removed from the list of user groups with launch permissions for this AMI. Only valid when the launchPermission attribute is being modified.

Available user groups: all


setUserGroups

public void setUserGroups(Collection<String> userGroups)
The user group being added to or removed from the list of user groups with launch permissions for this AMI. Only valid when the launchPermission attribute is being modified.

Available user groups: all

Parameters:
userGroups - The user group being added to or removed from the list of user groups with launch permissions for this AMI. Only valid when the launchPermission attribute is being modified.

Available user groups: all


withUserGroups

public ModifyImageAttributeRequest withUserGroups(String... userGroups)
The user group being added to or removed from the list of user groups with launch permissions for this AMI. Only valid when the launchPermission attribute is being modified.

Available user groups: all

Returns a reference to this object so that method calls can be chained together.

Parameters:
userGroups - The user group being added to or removed from the list of user groups with launch permissions for this AMI. Only valid when the launchPermission attribute is being modified.

Available user groups: all

Returns:
A reference to this updated object so that method calls can be chained together.

withUserGroups

public ModifyImageAttributeRequest withUserGroups(Collection<String> userGroups)
The user group being added to or removed from the list of user groups with launch permissions for this AMI. Only valid when the launchPermission attribute is being modified.

Available user groups: all

Returns a reference to this object so that method calls can be chained together.

Parameters:
userGroups - The user group being added to or removed from the list of user groups with launch permissions for this AMI. Only valid when the launchPermission attribute is being modified.

Available user groups: all

Returns:
A reference to this updated object so that method calls can be chained together.

getProductCodes

public List<String> getProductCodes()
The list of product codes being added to or removed from the specified AMI. Only valid when the productCodes attribute is being modified.

Returns:
The list of product codes being added to or removed from the specified AMI. Only valid when the productCodes attribute is being modified.

setProductCodes

public void setProductCodes(Collection<String> productCodes)
The list of product codes being added to or removed from the specified AMI. Only valid when the productCodes attribute is being modified.

Parameters:
productCodes - The list of product codes being added to or removed from the specified AMI. Only valid when the productCodes attribute is being modified.

withProductCodes

public ModifyImageAttributeRequest withProductCodes(String... productCodes)
The list of product codes being added to or removed from the specified AMI. Only valid when the productCodes attribute is being modified.

Returns a reference to this object so that method calls can be chained together.

Parameters:
productCodes - The list of product codes being added to or removed from the specified AMI. Only valid when the productCodes attribute is being modified.
Returns:
A reference to this updated object so that method calls can be chained together.

withProductCodes

public ModifyImageAttributeRequest withProductCodes(Collection<String> productCodes)
The list of product codes being added to or removed from the specified AMI. Only valid when the productCodes attribute is being modified.

Returns a reference to this object so that method calls can be chained together.

Parameters:
productCodes - The list of product codes being added to or removed from the specified AMI. Only valid when the productCodes attribute is being modified.
Returns:
A reference to this updated object so that method calls can be chained together.

getValue

public String getValue()
The value of the attribute being modified. Only valid when the description attribute is being modified.

Returns:
The value of the attribute being modified. Only valid when the description attribute is being modified.

setValue

public void setValue(String value)
The value of the attribute being modified. Only valid when the description attribute is being modified.

Parameters:
value - The value of the attribute being modified. Only valid when the description attribute is being modified.

withValue

public ModifyImageAttributeRequest withValue(String value)
The value of the attribute being modified. Only valid when the description attribute is being modified.

Returns a reference to this object so that method calls can be chained together.

Parameters:
value - The value of the attribute being modified. Only valid when the description attribute is being modified.
Returns:
A reference to this updated object so that method calls can be chained together.

getLaunchPermission

public LaunchPermissionModifications getLaunchPermission()
Returns the value of the LaunchPermission property for this object.

Returns:
The value of the LaunchPermission property for this object.

setLaunchPermission

public void setLaunchPermission(LaunchPermissionModifications launchPermission)
Sets the value of the LaunchPermission property for this object.

Parameters:
launchPermission - The new value for the LaunchPermission property for this object.

withLaunchPermission

public ModifyImageAttributeRequest withLaunchPermission(LaunchPermissionModifications launchPermission)
Sets the value of the LaunchPermission property for this object.

Returns a reference to this object so that method calls can be chained together.

Parameters:
launchPermission - The new value for the LaunchPermission property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.

getDescription

public String getDescription()
String value

Returns:
String value

setDescription

public void setDescription(String description)
String value

Parameters:
description - String value

withDescription

public ModifyImageAttributeRequest withDescription(String description)
String value

Returns a reference to this object so that method calls can be chained together.

Parameters:
description - String value
Returns:
A reference to this updated object so that method calls can be chained together.

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:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.