com.amazonaws.services.ec2.model
Class DeleteSnapshotRequest

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

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

Container for the parameters to the DeleteSnapshot operation.

Deletes the specified snapshot.

When you make periodic snapshots of a volume, the snapshots are incremental, and only the blocks on the device that have changed since your last snapshot are saved in the new snapshot. When you delete a snapshot, only the data not needed for any other snapshot is removed. So regardless of which prior snapshots have been deleted, all active snapshots will have access to all the information needed to restore the volume.

You cannot delete a snapshot of the root device of an Amazon EBS volume used by a registered AMI. You must first de-register the AMI before you can delete the snapshot.

For more information, see Deleting an Amazon EBS Snapshot in the Amazon Elastic Compute Cloud User Guide .

See Also:
AmazonEC2.deleteSnapshot(DeleteSnapshotRequest), Serialized Form

Constructor Summary
DeleteSnapshotRequest()
          Default constructor for a new DeleteSnapshotRequest object.
DeleteSnapshotRequest(java.lang.String snapshotId)
          Constructs a new DeleteSnapshotRequest object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 Request<DeleteSnapshotRequest> getDryRunRequest()
          This method is intended for internal use only.
 java.lang.String getSnapshotId()
          The ID of the Amazon EBS snapshot.
 int hashCode()
           
 void setSnapshotId(java.lang.String snapshotId)
          The ID of the Amazon EBS snapshot.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 DeleteSnapshotRequest withSnapshotId(java.lang.String snapshotId)
          The ID of the Amazon EBS 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

DeleteSnapshotRequest

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


DeleteSnapshotRequest

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

Parameters:
snapshotId - The ID of the Amazon EBS snapshot.
Method Detail

getSnapshotId

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

Returns:
The ID of the Amazon EBS snapshot.

setSnapshotId

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

Parameters:
snapshotId - The ID of the Amazon EBS snapshot.

withSnapshotId

public DeleteSnapshotRequest withSnapshotId(java.lang.String snapshotId)
The ID of the Amazon EBS snapshot.

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

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

getDryRunRequest

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

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.