public class CreateSnapshotRequest extends AmazonWebServiceRequest implements Serializable, DryRunSupportedRequest<CreateSnapshotRequest>
CreateSnapshot operation
.
Creates a snapshot of an Amazon EBS volume and stores it in Amazon S3. You can use snapshots for backups, to make copies of Amazon EBS volumes, and to save data before shutting down an instance.
When a snapshot is created, any AWS Marketplace product codes that are associated with the source volume are propagated to the snapshot.
You can take a snapshot of an attached volume that is in use. However,
snapshots only capture data that has been written to your Amazon EBS
volume at the time the snapshot command is issued; this may exclude
any data that has been cached by any applications or the operating
system. If you can pause any file writes to the volume long enough to
take a snapshot, your snapshot should be complete. However, if you
cannot pause all file writes to the volume, you should unmount the
volume from within the instance, issue the snapshot command, and then
remount the volume to ensure a consistent and complete snapshot. You
may remount and use your volume while the snapshot status is
pending
.
To create a snapshot for Amazon EBS volumes that serve as root devices, you should stop the instance before taking the snapshot.
Snapshots that are taken from encrypted volumes are automatically encrypted. Volumes that are created from encrypted snapshots are also automatically encrypted. Your encrypted volumes and any associated snapshots always remain protected.
For more information, see Amazon Elastic Block Store and Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide .
NOOP
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()
A description for the snapshot.
|
Request<CreateSnapshotRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
String |
getVolumeId()
The ID of the Amazon EBS volume.
|
int |
hashCode() |
void |
setDescription(String description)
A description for the snapshot.
|
void |
setVolumeId(String volumeId)
The ID of the Amazon EBS volume.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateSnapshotRequest |
withDescription(String description)
A description for the snapshot.
|
CreateSnapshotRequest |
withVolumeId(String volumeId)
The ID of the Amazon EBS volume.
|
copyPrivateRequestParameters, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public CreateSnapshotRequest()
public CreateSnapshotRequest(String volumeId, String description)
volumeId
- The ID of the Amazon EBS volume.description
- A description for the snapshot.public String getVolumeId()
public void setVolumeId(String volumeId)
volumeId
- The ID of the Amazon EBS volume.public CreateSnapshotRequest withVolumeId(String volumeId)
Returns a reference to this object so that method calls can be chained together.
volumeId
- The ID of the Amazon EBS volume.public String getDescription()
public void setDescription(String description)
description
- A description for the snapshot.public CreateSnapshotRequest withDescription(String description)
Returns a reference to this object so that method calls can be chained together.
description
- A description for the snapshot.public Request<CreateSnapshotRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<CreateSnapshotRequest>
public String toString()
toString
in class Object
Object.toString()
Copyright © 2014. All rights reserved.