amazonka-ec2-0.0.3: Amazon Elastic Compute Cloud SDK.

Safe HaskellNone




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 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 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 EBSEncryption in the Amazon Elastic Compute Cloud User Guide.



Request constructor

createSnapshot Source

CreateSnapshot constructor.

The fields accessible through corresponding lenses are:

Request lenses

cs2Description :: Lens' CreateSnapshot (Maybe Text) Source

A description for the snapshot.

cs2VolumeId :: Lens' CreateSnapshot Text Source

The ID of the Amazon EBS volume.


Response constructor

Response lenses

csr1Description :: Lens' CreateSnapshotResponse (Maybe Text) Source

The description for the snapshot.

csr1Encrypted :: Lens' CreateSnapshotResponse (Maybe Bool) Source

Indicates whether the snapshot is encrypted.

csr1OwnerAlias :: Lens' CreateSnapshotResponse (Maybe Text) Source

The AWS account alias (for example, amazon, self) or AWS account ID that owns the snapshot.

csr1OwnerId :: Lens' CreateSnapshotResponse (Maybe Text) Source

The AWS account ID of the Amazon EBS snapshot owner.

csr1Progress :: Lens' CreateSnapshotResponse (Maybe Text) Source

The progress of the snapshot, as a percentage.

csr1StartTime :: Lens' CreateSnapshotResponse (Maybe UTCTime) Source

The time stamp when the snapshot was initiated.

csr1Tags :: Lens' CreateSnapshotResponse [Tag] Source

Any tags assigned to the snapshot.

csr1VolumeSize :: Lens' CreateSnapshotResponse (Maybe Int) Source

The size of the volume, in GiB.