public class CreateSnapshotRequest extends AmazonWebServiceRequest implements java.io.Serializable, DryRunSupportedRequest<CreateSnapshotRequest>
CreateSnapshot operation
.
Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use snapshots for backups, to make copies of 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 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 systems on 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 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 .
Constructor and Description |
---|
CreateSnapshotRequest()
Default constructor for a new CreateSnapshotRequest object.
|
CreateSnapshotRequest(java.lang.String volumeId,
java.lang.String description)
Constructs a new CreateSnapshotRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getDescription()
A description for the snapshot.
|
Request<CreateSnapshotRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
java.lang.String |
getVolumeId()
The ID of the EBS volume.
|
int |
hashCode() |
void |
setDescription(java.lang.String description)
A description for the snapshot.
|
void |
setVolumeId(java.lang.String volumeId)
The ID of the EBS volume.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateSnapshotRequest |
withDescription(java.lang.String description)
A description for the snapshot.
|
CreateSnapshotRequest |
withVolumeId(java.lang.String volumeId)
The ID of the EBS volume.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public CreateSnapshotRequest()
public CreateSnapshotRequest(java.lang.String volumeId, java.lang.String description)
volumeId
- The ID of the EBS volume.description
- A description for the snapshot.public java.lang.String getVolumeId()
public void setVolumeId(java.lang.String volumeId)
volumeId
- The ID of the EBS volume.public CreateSnapshotRequest withVolumeId(java.lang.String volumeId)
Returns a reference to this object so that method calls can be chained together.
volumeId
- The ID of the EBS volume.public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- A description for the snapshot.public CreateSnapshotRequest withDescription(java.lang.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 java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.