|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.ec2.model.CreateSnapshotRequest
public class CreateSnapshotRequest
Container for the parameters to the 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 .
AmazonEC2.createSnapshot(CreateSnapshotRequest)
,
Serialized FormConstructor Summary | |
---|---|
CreateSnapshotRequest()
Default constructor for a new CreateSnapshotRequest object. |
|
CreateSnapshotRequest(java.lang.String volumeId,
java.lang.String description)
Constructs a new CreateSnapshotRequest object. |
Method Summary | |
---|---|
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 Amazon 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 Amazon 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 Amazon EBS volume. |
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 |
---|
public CreateSnapshotRequest()
public CreateSnapshotRequest(java.lang.String volumeId, java.lang.String description)
volumeId
- The ID of the Amazon EBS volume.description
- A description for the snapshot.Method Detail |
---|
public java.lang.String getVolumeId()
public void setVolumeId(java.lang.String volumeId)
volumeId
- The ID of the Amazon 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 Amazon 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
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |