com.amazonaws.services.ec2.model
Class CreateSnapshotRequest

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

public class CreateSnapshotRequest
extends AmazonWebServiceRequest

Container for the parameters to the CreateSnapshot operation.

Create a snapshot of the volume identified by volume ID. A volume does not have to be detached at the time the snapshot is taken.

NOTE: Snapshot creation requires that the system is in a consistent state. For instance, this means that if taking a snapshot of a database, the tables must be read-only locked to ensure that the snapshot will not contain a corrupted version of the database. Therefore, be careful when using this API to ensure that the system remains in the consistent state until the create snapshot status has returned.

See Also:
AmazonEC2.createSnapshot(CreateSnapshotRequest)

Constructor Summary
CreateSnapshotRequest()
          Default constructor for a new CreateSnapshotRequest object.
CreateSnapshotRequest(String volumeId, String description)
          Constructs a new CreateSnapshotRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 String getDescription()
          The description for the new snapshot.
 String getVolumeId()
          The ID of the volume from which to create the snapshot.
 int hashCode()
           
 void setDescription(String description)
          The description for the new snapshot.
 void setVolumeId(String volumeId)
          The ID of the volume from which to create the snapshot.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 CreateSnapshotRequest withDescription(String description)
          The description for the new snapshot.
 CreateSnapshotRequest withVolumeId(String volumeId)
          The ID of the volume from which to create the snapshot.
 
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

CreateSnapshotRequest

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


CreateSnapshotRequest

public CreateSnapshotRequest(String volumeId,
                             String description)
Constructs a new CreateSnapshotRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
volumeId - The ID of the volume from which to create the snapshot.
description - The description for the new snapshot.
Method Detail

getVolumeId

public String getVolumeId()
The ID of the volume from which to create the snapshot.

Returns:
The ID of the volume from which to create the snapshot.

setVolumeId

public void setVolumeId(String volumeId)
The ID of the volume from which to create the snapshot.

Parameters:
volumeId - The ID of the volume from which to create the snapshot.

withVolumeId

public CreateSnapshotRequest withVolumeId(String volumeId)
The ID of the volume from which to create the snapshot.

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

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

getDescription

public String getDescription()
The description for the new snapshot.

Returns:
The description for the new snapshot.

setDescription

public void setDescription(String description)
The description for the new snapshot.

Parameters:
description - The description for the new snapshot.

withDescription

public CreateSnapshotRequest withDescription(String description)
The description for the new snapshot.

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

Parameters:
description - The description for the new snapshot.
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.