amazonka-ec2-2.0: Amazon Elastic Compute Cloud SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.EC2.DeleteSnapshot

Description

Deletes the specified snapshot.

When you make periodic snapshots of a volume, the snapshots are incremental, and only the blocks on the device that have changed since your last snapshot are saved in the new snapshot. When you delete a snapshot, only the data not needed for any other snapshot is removed. So regardless of which prior snapshots have been deleted, all active snapshots will have access to all the information needed to restore the volume.

You cannot delete a snapshot of the root device of an EBS volume used by a registered AMI. You must first de-register the AMI before you can delete the snapshot.

For more information, see Delete an Amazon EBS snapshot in the Amazon Elastic Compute Cloud User Guide.

Synopsis

Creating a Request

data DeleteSnapshot Source #

See: newDeleteSnapshot smart constructor.

Constructors

DeleteSnapshot' 

Fields

  • dryRun :: Maybe Bool

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • snapshotId :: Text

    The ID of the EBS snapshot.

Instances

Instances details
ToHeaders DeleteSnapshot Source # 
Instance details

Defined in Amazonka.EC2.DeleteSnapshot

ToPath DeleteSnapshot Source # 
Instance details

Defined in Amazonka.EC2.DeleteSnapshot

ToQuery DeleteSnapshot Source # 
Instance details

Defined in Amazonka.EC2.DeleteSnapshot

AWSRequest DeleteSnapshot Source # 
Instance details

Defined in Amazonka.EC2.DeleteSnapshot

Associated Types

type AWSResponse DeleteSnapshot #

Generic DeleteSnapshot Source # 
Instance details

Defined in Amazonka.EC2.DeleteSnapshot

Associated Types

type Rep DeleteSnapshot :: Type -> Type #

Read DeleteSnapshot Source # 
Instance details

Defined in Amazonka.EC2.DeleteSnapshot

Show DeleteSnapshot Source # 
Instance details

Defined in Amazonka.EC2.DeleteSnapshot

NFData DeleteSnapshot Source # 
Instance details

Defined in Amazonka.EC2.DeleteSnapshot

Methods

rnf :: DeleteSnapshot -> () #

Eq DeleteSnapshot Source # 
Instance details

Defined in Amazonka.EC2.DeleteSnapshot

Hashable DeleteSnapshot Source # 
Instance details

Defined in Amazonka.EC2.DeleteSnapshot

type AWSResponse DeleteSnapshot Source # 
Instance details

Defined in Amazonka.EC2.DeleteSnapshot

type Rep DeleteSnapshot Source # 
Instance details

Defined in Amazonka.EC2.DeleteSnapshot

type Rep DeleteSnapshot = D1 ('MetaData "DeleteSnapshot" "Amazonka.EC2.DeleteSnapshot" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "DeleteSnapshot'" 'PrefixI 'True) (S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "snapshotId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newDeleteSnapshot Source #

Create a value of DeleteSnapshot with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:dryRun:DeleteSnapshot', deleteSnapshot_dryRun - Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

DeleteSnapshot, deleteSnapshot_snapshotId - The ID of the EBS snapshot.

Request Lenses

deleteSnapshot_dryRun :: Lens' DeleteSnapshot (Maybe Bool) Source #

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Destructuring the Response

data DeleteSnapshotResponse Source #

See: newDeleteSnapshotResponse smart constructor.

Instances

Instances details
Generic DeleteSnapshotResponse Source # 
Instance details

Defined in Amazonka.EC2.DeleteSnapshot

Associated Types

type Rep DeleteSnapshotResponse :: Type -> Type #

Read DeleteSnapshotResponse Source # 
Instance details

Defined in Amazonka.EC2.DeleteSnapshot

Show DeleteSnapshotResponse Source # 
Instance details

Defined in Amazonka.EC2.DeleteSnapshot

NFData DeleteSnapshotResponse Source # 
Instance details

Defined in Amazonka.EC2.DeleteSnapshot

Methods

rnf :: DeleteSnapshotResponse -> () #

Eq DeleteSnapshotResponse Source # 
Instance details

Defined in Amazonka.EC2.DeleteSnapshot

type Rep DeleteSnapshotResponse Source # 
Instance details

Defined in Amazonka.EC2.DeleteSnapshot

type Rep DeleteSnapshotResponse = D1 ('MetaData "DeleteSnapshotResponse" "Amazonka.EC2.DeleteSnapshot" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "DeleteSnapshotResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newDeleteSnapshotResponse :: DeleteSnapshotResponse Source #

Create a value of DeleteSnapshotResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.