Smaws_Client_FSx.CreateSnapshotCreates 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:
CREATING.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.
val error_to_string :
[ Smaws_Lib.Protocols.AwsJson.error
| `BadRequest of Types.bad_request
| `InternalServerError of Types.internal_server_error
| `ServiceLimitExceeded of Types.service_limit_exceeded
| `VolumeNotFound of Types.volume_not_found ] ->
stringval request :
'http_type Smaws_Lib.Context.t ->
Types.create_snapshot_request ->
(Types.create_snapshot_response,
[> Smaws_Lib.Protocols.AwsJson.error
| `BadRequest of Types.bad_request
| `InternalServerError of Types.internal_server_error
| `ServiceLimitExceeded of Types.service_limit_exceeded
| `VolumeNotFound of Types.volume_not_found ])
Stdlib.resultval request_with_metadata :
'http_type Smaws_Lib.Context.t ->
Types.create_snapshot_request ->
(Types.create_snapshot_response Smaws_Lib.Response.t,
[> Smaws_Lib.Protocols.AwsJson.error
| `BadRequest of Types.bad_request
| `InternalServerError of Types.internal_server_error
| `ServiceLimitExceeded of Types.service_limit_exceeded
| `VolumeNotFound of Types.volume_not_found ]
* Smaws_Lib.Response.metadata)
Stdlib.result