pub struct CreateSnapshotFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to CreateSnapshot
.
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.
Implementations§
source§impl CreateSnapshotFluentBuilder
impl CreateSnapshotFluentBuilder
sourcepub fn as_input(&self) -> &CreateSnapshotInputBuilder
pub fn as_input(&self) -> &CreateSnapshotInputBuilder
Access the CreateSnapshot as a reference.
sourcepub async fn send(
self
) -> Result<CreateSnapshotOutput, SdkError<CreateSnapshotError, HttpResponse>>
pub async fn send( self ) -> Result<CreateSnapshotOutput, SdkError<CreateSnapshotError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn customize(
self
) -> CustomizableOperation<CreateSnapshotOutput, CreateSnapshotError, Self>
pub fn customize( self ) -> CustomizableOperation<CreateSnapshotOutput, CreateSnapshotError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn client_request_token(self, input: impl Into<String>) -> Self
pub fn client_request_token(self, input: impl Into<String>) -> Self
(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.
sourcepub fn set_client_request_token(self, input: Option<String>) -> Self
pub fn set_client_request_token(self, input: Option<String>) -> Self
(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.
sourcepub fn get_client_request_token(&self) -> &Option<String>
pub fn get_client_request_token(&self) -> &Option<String>
(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.
sourcepub fn volume_id(self, input: impl Into<String>) -> Self
pub fn volume_id(self, input: impl Into<String>) -> Self
The ID of the volume that you are taking a snapshot of.
sourcepub fn set_volume_id(self, input: Option<String>) -> Self
pub fn set_volume_id(self, input: Option<String>) -> Self
The ID of the volume that you are taking a snapshot of.
sourcepub fn get_volume_id(&self) -> &Option<String>
pub fn get_volume_id(&self) -> &Option<String>
The ID of the volume that you are taking a snapshot of.
Appends an item to Tags
.
To override the contents of this collection use set_tags
.
A list of Tag
values, with a maximum of 50 elements.
A list of Tag
values, with a maximum of 50 elements.
A list of Tag
values, with a maximum of 50 elements.
Trait Implementations§
source§impl Clone for CreateSnapshotFluentBuilder
impl Clone for CreateSnapshotFluentBuilder
source§fn clone(&self) -> CreateSnapshotFluentBuilder
fn clone(&self) -> CreateSnapshotFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for CreateSnapshotFluentBuilder
impl !RefUnwindSafe for CreateSnapshotFluentBuilder
impl Send for CreateSnapshotFluentBuilder
impl Sync for CreateSnapshotFluentBuilder
impl Unpin for CreateSnapshotFluentBuilder
impl !UnwindSafe for CreateSnapshotFluentBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more