amazonka-fsx-2.0: Amazon FSx 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.FSx.CreateSnapshot

Description

Creates a snapshot of an existing Amazon FSx for OpenZFS volume. With snapshots, you can easily undo file changes and compare file versions by restoring the volume to a previous version.

If a snapshot with the specified client request token exists, and the parameters match, this operation returns the description of the existing snapshot. If a snapshot with the specified client request token exists, and the parameters don't match, this operation returns IncompatibleParameterError. If a snapshot with the specified client request token doesn't exist, CreateSnapshot does the following:

  • Creates a new OpenZFS snapshot with an assigned ID, and an initial lifecycle state of CREATING.
  • Returns the description of the snapshot.

By using the idempotent operation, you can retry a CreateSnapshot operation without the risk of creating an extra snapshot. This approach can be useful when an initial call fails in a way that makes it unclear whether a snapshot was created. If you use the same client request token and the initial call created a snapshot, the operation returns a successful result because all the parameters are the same.

The CreateSnapshot operation returns while the snapshot's lifecycle state is still CREATING. You can check the snapshot creation status by calling the DescribeSnapshots operation, which returns the snapshot state along with other information.

Synopsis

Creating a Request

data CreateSnapshot Source #

See: newCreateSnapshot smart constructor.

Constructors

CreateSnapshot' 

Fields

Instances

Instances details
ToJSON CreateSnapshot Source # 
Instance details

Defined in Amazonka.FSx.CreateSnapshot

ToHeaders CreateSnapshot Source # 
Instance details

Defined in Amazonka.FSx.CreateSnapshot

ToPath CreateSnapshot Source # 
Instance details

Defined in Amazonka.FSx.CreateSnapshot

ToQuery CreateSnapshot Source # 
Instance details

Defined in Amazonka.FSx.CreateSnapshot

AWSRequest CreateSnapshot Source # 
Instance details

Defined in Amazonka.FSx.CreateSnapshot

Associated Types

type AWSResponse CreateSnapshot #

Generic CreateSnapshot Source # 
Instance details

Defined in Amazonka.FSx.CreateSnapshot

Associated Types

type Rep CreateSnapshot :: Type -> Type #

Read CreateSnapshot Source # 
Instance details

Defined in Amazonka.FSx.CreateSnapshot

Show CreateSnapshot Source # 
Instance details

Defined in Amazonka.FSx.CreateSnapshot

NFData CreateSnapshot Source # 
Instance details

Defined in Amazonka.FSx.CreateSnapshot

Methods

rnf :: CreateSnapshot -> () #

Eq CreateSnapshot Source # 
Instance details

Defined in Amazonka.FSx.CreateSnapshot

Hashable CreateSnapshot Source # 
Instance details

Defined in Amazonka.FSx.CreateSnapshot

type AWSResponse CreateSnapshot Source # 
Instance details

Defined in Amazonka.FSx.CreateSnapshot

type Rep CreateSnapshot Source # 
Instance details

Defined in Amazonka.FSx.CreateSnapshot

type Rep CreateSnapshot = D1 ('MetaData "CreateSnapshot" "Amazonka.FSx.CreateSnapshot" "amazonka-fsx-2.0-6W1DYEEbHPkD4DJvTvpQG4" 'False) (C1 ('MetaCons "CreateSnapshot'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "clientRequestToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (NonEmpty Tag)))) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "volumeId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newCreateSnapshot Source #

Create a value of CreateSnapshot 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:clientRequestToken:CreateSnapshot', createSnapshot_clientRequestToken - Undocumented member.

CreateSnapshot, createSnapshot_tags - Undocumented member.

CreateSnapshot, createSnapshot_name - The name of the snapshot.

CreateSnapshot, createSnapshot_volumeId - The ID of the volume that you are taking a snapshot of.

Request Lenses

createSnapshot_name :: Lens' CreateSnapshot Text Source #

The name of the snapshot.

createSnapshot_volumeId :: Lens' CreateSnapshot Text Source #

The ID of the volume that you are taking a snapshot of.

Destructuring the Response

data CreateSnapshotResponse Source #

See: newCreateSnapshotResponse smart constructor.

Constructors

CreateSnapshotResponse' 

Fields

Instances

Instances details
Generic CreateSnapshotResponse Source # 
Instance details

Defined in Amazonka.FSx.CreateSnapshot

Associated Types

type Rep CreateSnapshotResponse :: Type -> Type #

Read CreateSnapshotResponse Source # 
Instance details

Defined in Amazonka.FSx.CreateSnapshot

Show CreateSnapshotResponse Source # 
Instance details

Defined in Amazonka.FSx.CreateSnapshot

NFData CreateSnapshotResponse Source # 
Instance details

Defined in Amazonka.FSx.CreateSnapshot

Methods

rnf :: CreateSnapshotResponse -> () #

Eq CreateSnapshotResponse Source # 
Instance details

Defined in Amazonka.FSx.CreateSnapshot

type Rep CreateSnapshotResponse Source # 
Instance details

Defined in Amazonka.FSx.CreateSnapshot

type Rep CreateSnapshotResponse = D1 ('MetaData "CreateSnapshotResponse" "Amazonka.FSx.CreateSnapshot" "amazonka-fsx-2.0-6W1DYEEbHPkD4DJvTvpQG4" 'False) (C1 ('MetaCons "CreateSnapshotResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "snapshot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Snapshot)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCreateSnapshotResponse Source #

Create a value of CreateSnapshotResponse 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:snapshot:CreateSnapshotResponse', createSnapshotResponse_snapshot - A description of the snapshot.

$sel:httpStatus:CreateSnapshotResponse', createSnapshotResponse_httpStatus - The response's http status code.

Response Lenses