public class CreateSnapshotRequest extends AmazonWebServiceRequest implements Serializable, DryRunSupportedRequest<CreateSnapshotRequest>
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.
| Constructor and Description |
|---|
CreateSnapshotRequest()
Default constructor for a new CreateSnapshotRequest object.
|
CreateSnapshotRequest(String volumeId,
String description)
Constructs a new CreateSnapshotRequest object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getDescription()
The description for the new snapshot.
|
Request<CreateSnapshotRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
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.
|
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollectorpublic CreateSnapshotRequest()
public CreateSnapshotRequest(String volumeId, String description)
volumeId - The ID of the volume from which to create the
snapshot.description - The description for the new snapshot.public String getVolumeId()
public void setVolumeId(String volumeId)
volumeId - The ID of the volume from which to create the snapshot.public CreateSnapshotRequest withVolumeId(String volumeId)
Returns a reference to this object so that method calls can be chained together.
volumeId - The ID of the volume from which to create the snapshot.public String getDescription()
public void setDescription(String description)
description - The description for the new snapshot.public CreateSnapshotRequest withDescription(String description)
Returns a reference to this object so that method calls can be chained together.
description - The description for the new snapshot.public Request<CreateSnapshotRequest> getDryRunRequest()
getDryRunRequest in interface DryRunSupportedRequest<CreateSnapshotRequest>public String toString()
toString in class ObjectObject.toString()Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.