Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data CreateSnapshot = CreateSnapshot' {}
- newCreateSnapshot :: Text -> Text -> CreateSnapshot
- createSnapshot_clientRequestToken :: Lens' CreateSnapshot (Maybe Text)
- createSnapshot_tags :: Lens' CreateSnapshot (Maybe (NonEmpty Tag))
- createSnapshot_name :: Lens' CreateSnapshot Text
- createSnapshot_volumeId :: Lens' CreateSnapshot Text
- data CreateSnapshotResponse = CreateSnapshotResponse' {
- snapshot :: Maybe Snapshot
- httpStatus :: Int
- newCreateSnapshotResponse :: Int -> CreateSnapshotResponse
- createSnapshotResponse_snapshot :: Lens' CreateSnapshotResponse (Maybe Snapshot)
- createSnapshotResponse_httpStatus :: Lens' CreateSnapshotResponse Int
Creating a Request
data CreateSnapshot Source #
See: newCreateSnapshot
smart constructor.
Instances
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_clientRequestToken :: Lens' CreateSnapshot (Maybe Text) Source #
Undocumented member.
createSnapshot_tags :: Lens' CreateSnapshot (Maybe (NonEmpty Tag)) Source #
Undocumented member.
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.
CreateSnapshotResponse' | |
|
Instances
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
createSnapshotResponse_snapshot :: Lens' CreateSnapshotResponse (Maybe Snapshot) Source #
A description of the snapshot.
createSnapshotResponse_httpStatus :: Lens' CreateSnapshotResponse Int Source #
The response's http status code.