Struct aws_sdk_ec2::input::CreateRestoreImageTaskInput
source · #[non_exhaustive]pub struct CreateRestoreImageTaskInput { /* private fields */ }
Implementations§
source§impl CreateRestoreImageTaskInput
impl CreateRestoreImageTaskInput
sourcepub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<CreateRestoreImageTask, AwsResponseRetryClassifier>, BuildError>
pub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<CreateRestoreImageTask, AwsResponseRetryClassifier>, BuildError>
Consumes the builder and constructs an Operation<CreateRestoreImageTask
>
Examples found in repository?
src/client.rs (line 20430)
20416 20417 20418 20419 20420 20421 20422 20423 20424 20425 20426 20427 20428 20429 20430 20431 20432 20433 20434 20435 20436 20437 20438 20439 20440 20441 20442 20443 20444 20445 20446 20447 20448 20449 20450 20451 20452 20453 20454 20455 20456 20457 20458
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::CreateRestoreImageTask,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::CreateRestoreImageTaskError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// 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](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateRestoreImageTaskOutput,
aws_smithy_http::result::SdkError<crate::error::CreateRestoreImageTaskError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture CreateRestoreImageTaskInput
.
source§impl CreateRestoreImageTaskInput
impl CreateRestoreImageTaskInput
sourcepub fn bucket(&self) -> Option<&str>
pub fn bucket(&self) -> Option<&str>
The name of the Amazon S3 bucket that contains the stored AMI object.
sourcepub fn object_key(&self) -> Option<&str>
pub fn object_key(&self) -> Option<&str>
The name of the stored AMI object in the bucket.
sourcepub fn name(&self) -> Option<&str>
pub fn name(&self) -> Option<&str>
The name for the restored AMI. The name must be unique for AMIs in the Region for this account. If you do not provide a name, the new AMI gets the same name as the original AMI.
sourcepub fn tag_specifications(&self) -> Option<&[TagSpecification]>
pub fn tag_specifications(&self) -> Option<&[TagSpecification]>
The tags to apply to the AMI and snapshots on restoration. You can tag the AMI, the snapshots, or both.
-
To tag the AMI, the value for
ResourceType
must beimage
. -
To tag the snapshots, the value for
ResourceType
must besnapshot
. The same tag is applied to all of the snapshots that are created.
Trait Implementations§
source§impl Clone for CreateRestoreImageTaskInput
impl Clone for CreateRestoreImageTaskInput
source§fn clone(&self) -> CreateRestoreImageTaskInput
fn clone(&self) -> CreateRestoreImageTaskInput
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more