com.amazonaws.services.ec2.model
Class ModifyImageAttributeRequest

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

public class ModifyImageAttributeRequest
extends AmazonWebServiceRequest
implements java.io.Serializable, DryRunSupportedRequest<ModifyImageAttributeRequest>

Container for the parameters to the ModifyImageAttribute operation.

Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time.

NOTE: AWS Marketplace product codes cannot be modified. Images with an AWS Marketplace product code cannot be made public.

See Also:
AmazonEC2.modifyImageAttribute(ModifyImageAttributeRequest), Serialized Form

Constructor Summary
ModifyImageAttributeRequest()
          Default constructor for a new ModifyImageAttributeRequest object.
ModifyImageAttributeRequest(java.lang.String imageId, java.lang.String attribute)
          Constructs a new ModifyImageAttributeRequest object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAttribute()
          The name of the attribute to modify.
 java.lang.String getDescription()
          A description for the AMI.
 Request<ModifyImageAttributeRequest> getDryRunRequest()
          This method is intended for internal use only.
 java.lang.String getImageId()
          The ID of the AMI.
 LaunchPermissionModifications getLaunchPermission()
          

 java.lang.String getOperationType()
          The operation type.
 java.util.List<java.lang.String> getProductCodes()
          One or more product codes.
 java.util.List<java.lang.String> getUserGroups()
          One or more user groups.
 java.util.List<java.lang.String> getUserIds()
          One or more AWS account IDs.
 java.lang.String getValue()
          The value of the attribute being modified.
 int hashCode()
           
 void setAttribute(java.lang.String attribute)
          The name of the attribute to modify.
 void setDescription(java.lang.String description)
          A description for the AMI.
 void setImageId(java.lang.String imageId)
          The ID of the AMI.
 void setLaunchPermission(LaunchPermissionModifications launchPermission)
          

 void setOperationType(java.lang.String operationType)
          The operation type.
 void setProductCodes(java.util.Collection<java.lang.String> productCodes)
          One or more product codes.
 void setUserGroups(java.util.Collection<java.lang.String> userGroups)
          One or more user groups.
 void setUserIds(java.util.Collection<java.lang.String> userIds)
          One or more AWS account IDs.
 void setValue(java.lang.String value)
          The value of the attribute being modified.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 ModifyImageAttributeRequest withAttribute(java.lang.String attribute)
          The name of the attribute to modify.
 ModifyImageAttributeRequest withDescription(java.lang.String description)
          A description for the AMI.
 ModifyImageAttributeRequest withImageId(java.lang.String imageId)
          The ID of the AMI.
 ModifyImageAttributeRequest withLaunchPermission(LaunchPermissionModifications launchPermission)
          

 ModifyImageAttributeRequest withOperationType(java.lang.String operationType)
          The operation type.
 ModifyImageAttributeRequest withProductCodes(java.util.Collection<java.lang.String> productCodes)
          One or more product codes.
 ModifyImageAttributeRequest withProductCodes(java.lang.String... productCodes)
          One or more product codes.
 ModifyImageAttributeRequest withUserGroups(java.util.Collection<java.lang.String> userGroups)
          One or more user groups.
 ModifyImageAttributeRequest withUserGroups(java.lang.String... userGroups)
          One or more user groups.
 ModifyImageAttributeRequest withUserIds(java.util.Collection<java.lang.String> userIds)
          One or more AWS account IDs.
 ModifyImageAttributeRequest withUserIds(java.lang.String... userIds)
          One or more AWS account IDs.
 ModifyImageAttributeRequest withValue(java.lang.String value)
          The value of the attribute being modified.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setDelegationToken, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
 
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(java.lang.String imageId,
                                   java.lang.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 Detail

getImageId

public java.lang.String getImageId()
The ID of the AMI.

Returns:
The ID of the AMI.

setImageId

public void setImageId(java.lang.String imageId)
The ID of the AMI.

Parameters:
imageId - The ID of the AMI.

withImageId

public ModifyImageAttributeRequest withImageId(java.lang.String imageId)
The ID of the AMI.

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

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

getAttribute

public java.lang.String getAttribute()
The name of the attribute to modify.

Returns:
The name of the attribute to modify.

setAttribute

public void setAttribute(java.lang.String attribute)
The name of the attribute to modify.

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

withAttribute

public ModifyImageAttributeRequest withAttribute(java.lang.String attribute)
The name of the attribute to modify.

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

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

getOperationType

public java.lang.String getOperationType()
The operation type.

Returns:
The operation type.

setOperationType

public void setOperationType(java.lang.String operationType)
The operation type.

Parameters:
operationType - The operation type.

withOperationType

public ModifyImageAttributeRequest withOperationType(java.lang.String operationType)
The operation type.

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

Parameters:
operationType - The operation type.
Returns:
A reference to this updated object so that method calls can be chained together.

getUserIds

public java.util.List<java.lang.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(java.util.Collection<java.lang.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(java.lang.String... userIds)
One or more AWS account IDs. This is only valid when modifying the launchPermission attribute.

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

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

withUserIds

public ModifyImageAttributeRequest withUserIds(java.util.Collection<java.lang.String> userIds)
One or more AWS account IDs. This is only valid when modifying the launchPermission attribute.

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

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

getUserGroups

public java.util.List<java.lang.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(java.util.Collection<java.lang.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(java.lang.String... userGroups)
One or more user groups. This is only valid when modifying the launchPermission attribute.

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

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

withUserGroups

public ModifyImageAttributeRequest withUserGroups(java.util.Collection<java.lang.String> userGroups)
One or more user groups. This is only valid when modifying the launchPermission attribute.

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

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

getProductCodes

public java.util.List<java.lang.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(java.util.Collection<java.lang.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(java.lang.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.

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

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:
A reference to this updated object so that method calls can be chained together.

withProductCodes

public ModifyImageAttributeRequest withProductCodes(java.util.Collection<java.lang.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.

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

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:
A reference to this updated object so that method calls can be chained together.

getValue

public java.lang.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.

setValue

public void setValue(java.lang.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.

withValue

public ModifyImageAttributeRequest withValue(java.lang.String value)
The value of the attribute being modified. This is only valid when modifying the description attribute.

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

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

getLaunchPermission

public LaunchPermissionModifications getLaunchPermission()

Returns:


setLaunchPermission

public void setLaunchPermission(LaunchPermissionModifications launchPermission)

Parameters:
launchPermission -


withLaunchPermission

public ModifyImageAttributeRequest withLaunchPermission(LaunchPermissionModifications launchPermission)

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

Parameters:
launchPermission -

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

getDescription

public java.lang.String getDescription()
A description for the AMI.

Returns:
A description for the AMI.

setDescription

public void setDescription(java.lang.String description)
A description for the AMI.

Parameters:
description - A description for the AMI.

withDescription

public ModifyImageAttributeRequest withDescription(java.lang.String description)
A description for the AMI.

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

Parameters:
description - A description for the AMI.
Returns:
A reference to this updated 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 java.lang.String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


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