com.amazonaws.services.ec2.model
Class ModifySnapshotAttributeRequest

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

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

Container for the parameters to the ModifySnapshotAttribute operation.

Adds or removes permission settings for the specified snapshot.

For more information on modifying snapshot permissions, see Sharing Snapshots in the Amazon Elastic Compute Cloud User Guide .

NOTE: Snapshots with AWS Marketplace product codes cannot be made public.

See Also:
AmazonEC2.modifySnapshotAttribute(ModifySnapshotAttributeRequest), Serialized Form

Constructor Summary
ModifySnapshotAttributeRequest()
          Default constructor for a new ModifySnapshotAttributeRequest object.
ModifySnapshotAttributeRequest(java.lang.String snapshotId, SnapshotAttributeName attribute, java.lang.String operationType)
          Constructs a new ModifySnapshotAttributeRequest object.
ModifySnapshotAttributeRequest(java.lang.String snapshotId, java.lang.String attribute, java.lang.String operationType)
          Constructs a new ModifySnapshotAttributeRequest object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAttribute()
          The snapshot attribute to modify.
 CreateVolumePermissionModifications getCreateVolumePermission()
          A JSON representation of the snapshot attribute modification.
 Request<ModifySnapshotAttributeRequest> getDryRunRequest()
          This method is intended for internal use only.
 java.util.List<java.lang.String> getGroupNames()
          The group to modify for the snapshot.
 java.lang.String getOperationType()
          The type of operation to perform to the attribute.
 java.lang.String getSnapshotId()
          The ID of the snapshot.
 java.util.List<java.lang.String> getUserIds()
          The account ID to modify for the snapshot.
 int hashCode()
           
 void setAttribute(SnapshotAttributeName attribute)
          The snapshot attribute to modify.
 void setAttribute(java.lang.String attribute)
          The snapshot attribute to modify.
 void setCreateVolumePermission(CreateVolumePermissionModifications createVolumePermission)
          A JSON representation of the snapshot attribute modification.
 void setGroupNames(java.util.Collection<java.lang.String> groupNames)
          The group to modify for the snapshot.
 void setOperationType(java.lang.String operationType)
          The type of operation to perform to the attribute.
 void setSnapshotId(java.lang.String snapshotId)
          The ID of the snapshot.
 void setUserIds(java.util.Collection<java.lang.String> userIds)
          The account ID to modify for the snapshot.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 ModifySnapshotAttributeRequest withAttribute(SnapshotAttributeName attribute)
          The snapshot attribute to modify.
 ModifySnapshotAttributeRequest withAttribute(java.lang.String attribute)
          The snapshot attribute to modify.
 ModifySnapshotAttributeRequest withCreateVolumePermission(CreateVolumePermissionModifications createVolumePermission)
          A JSON representation of the snapshot attribute modification.
 ModifySnapshotAttributeRequest withGroupNames(java.util.Collection<java.lang.String> groupNames)
          The group to modify for the snapshot.
 ModifySnapshotAttributeRequest withGroupNames(java.lang.String... groupNames)
          The group to modify for the snapshot.
 ModifySnapshotAttributeRequest withOperationType(java.lang.String operationType)
          The type of operation to perform to the attribute.
 ModifySnapshotAttributeRequest withSnapshotId(java.lang.String snapshotId)
          The ID of the snapshot.
 ModifySnapshotAttributeRequest withUserIds(java.util.Collection<java.lang.String> userIds)
          The account ID to modify for the snapshot.
 ModifySnapshotAttributeRequest withUserIds(java.lang.String... userIds)
          The account ID to modify for the snapshot.
 
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

ModifySnapshotAttributeRequest

public ModifySnapshotAttributeRequest()
Default constructor for a new ModifySnapshotAttributeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


ModifySnapshotAttributeRequest

public ModifySnapshotAttributeRequest(java.lang.String snapshotId,
                                      java.lang.String attribute,
                                      java.lang.String operationType)
Constructs a new ModifySnapshotAttributeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
snapshotId - The ID of the snapshot.
attribute - The snapshot attribute to modify.
operationType - The type of operation to perform to the attribute.

ModifySnapshotAttributeRequest

public ModifySnapshotAttributeRequest(java.lang.String snapshotId,
                                      SnapshotAttributeName attribute,
                                      java.lang.String operationType)
Constructs a new ModifySnapshotAttributeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
snapshotId - The ID of the snapshot.
attribute - The snapshot attribute to modify.
operationType - The type of operation to perform to the attribute.
Method Detail

getSnapshotId

public java.lang.String getSnapshotId()
The ID of the snapshot.

Returns:
The ID of the snapshot.

setSnapshotId

public void setSnapshotId(java.lang.String snapshotId)
The ID of the snapshot.

Parameters:
snapshotId - The ID of the snapshot.

withSnapshotId

public ModifySnapshotAttributeRequest withSnapshotId(java.lang.String snapshotId)
The ID of the snapshot.

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

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

getAttribute

public java.lang.String getAttribute()
The snapshot attribute to modify.

Constraints:
Allowed Values: productCodes, createVolumePermission

Returns:
The snapshot attribute to modify.
See Also:
SnapshotAttributeName

setAttribute

public void setAttribute(java.lang.String attribute)
The snapshot attribute to modify.

Constraints:
Allowed Values: productCodes, createVolumePermission

Parameters:
attribute - The snapshot attribute to modify.
See Also:
SnapshotAttributeName

withAttribute

public ModifySnapshotAttributeRequest withAttribute(java.lang.String attribute)
The snapshot attribute to modify.

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

Constraints:
Allowed Values: productCodes, createVolumePermission

Parameters:
attribute - The snapshot attribute to modify.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
SnapshotAttributeName

setAttribute

public void setAttribute(SnapshotAttributeName attribute)
The snapshot attribute to modify.

Constraints:
Allowed Values: productCodes, createVolumePermission

Parameters:
attribute - The snapshot attribute to modify.
See Also:
SnapshotAttributeName

withAttribute

public ModifySnapshotAttributeRequest withAttribute(SnapshotAttributeName attribute)
The snapshot attribute to modify.

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

Constraints:
Allowed Values: productCodes, createVolumePermission

Parameters:
attribute - The snapshot attribute to modify.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
SnapshotAttributeName

getOperationType

public java.lang.String getOperationType()
The type of operation to perform to the attribute.

Returns:
The type of operation to perform to the attribute.

setOperationType

public void setOperationType(java.lang.String operationType)
The type of operation to perform to the attribute.

Parameters:
operationType - The type of operation to perform to the attribute.

withOperationType

public ModifySnapshotAttributeRequest withOperationType(java.lang.String operationType)
The type of operation to perform to the attribute.

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

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

getUserIds

public java.util.List<java.lang.String> getUserIds()
The account ID to modify for the snapshot.

Returns:
The account ID to modify for the snapshot.

setUserIds

public void setUserIds(java.util.Collection<java.lang.String> userIds)
The account ID to modify for the snapshot.

Parameters:
userIds - The account ID to modify for the snapshot.

withUserIds

public ModifySnapshotAttributeRequest withUserIds(java.lang.String... userIds)
The account ID to modify for the snapshot.

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

Parameters:
userIds - The account ID to modify for the snapshot.
Returns:
A reference to this updated object so that method calls can be chained together.

withUserIds

public ModifySnapshotAttributeRequest withUserIds(java.util.Collection<java.lang.String> userIds)
The account ID to modify for the snapshot.

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

Parameters:
userIds - The account ID to modify for the snapshot.
Returns:
A reference to this updated object so that method calls can be chained together.

getGroupNames

public java.util.List<java.lang.String> getGroupNames()
The group to modify for the snapshot.

Returns:
The group to modify for the snapshot.

setGroupNames

public void setGroupNames(java.util.Collection<java.lang.String> groupNames)
The group to modify for the snapshot.

Parameters:
groupNames - The group to modify for the snapshot.

withGroupNames

public ModifySnapshotAttributeRequest withGroupNames(java.lang.String... groupNames)
The group to modify for the snapshot.

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

Parameters:
groupNames - The group to modify for the snapshot.
Returns:
A reference to this updated object so that method calls can be chained together.

withGroupNames

public ModifySnapshotAttributeRequest withGroupNames(java.util.Collection<java.lang.String> groupNames)
The group to modify for the snapshot.

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

Parameters:
groupNames - The group to modify for the snapshot.
Returns:
A reference to this updated object so that method calls can be chained together.

getCreateVolumePermission

public CreateVolumePermissionModifications getCreateVolumePermission()
A JSON representation of the snapshot attribute modification.

Returns:
A JSON representation of the snapshot attribute modification.

setCreateVolumePermission

public void setCreateVolumePermission(CreateVolumePermissionModifications createVolumePermission)
A JSON representation of the snapshot attribute modification.

Parameters:
createVolumePermission - A JSON representation of the snapshot attribute modification.

withCreateVolumePermission

public ModifySnapshotAttributeRequest withCreateVolumePermission(CreateVolumePermissionModifications createVolumePermission)
A JSON representation of the snapshot attribute modification.

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

Parameters:
createVolumePermission - A JSON representation of the snapshot attribute modification.
Returns:
A reference to this updated object so that method calls can be chained together.

getDryRunRequest

public Request<ModifySnapshotAttributeRequest> 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<ModifySnapshotAttributeRequest>

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.