Struct aws_sdk_ec2::input::cancel_export_task_input::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for CancelExportTaskInput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn export_task_id(self, input: impl Into<String>) -> Self
pub fn export_task_id(self, input: impl Into<String>) -> Self
The ID of the export task. This is the ID returned by CreateInstanceExportTask
.
sourcepub fn set_export_task_id(self, input: Option<String>) -> Self
pub fn set_export_task_id(self, input: Option<String>) -> Self
The ID of the export task. This is the ID returned by CreateInstanceExportTask
.
sourcepub fn build(self) -> Result<CancelExportTaskInput, BuildError>
pub fn build(self) -> Result<CancelExportTaskInput, BuildError>
Consumes the builder and constructs a CancelExportTaskInput
.
Examples found in repository?
src/client.rs (line 13028)
13016 13017 13018 13019 13020 13021 13022 13023 13024 13025 13026 13027 13028 13029 13030 13031 13032 13033 13034 13035 13036 13037 13038 13039 13040 13041 13042 13043 13044 13045 13046 13047 13048 13049 13050 13051 13052 13053 13054 13055 13056 13057 13058
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::CancelExportTask,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::CancelExportTaskError>,
> {
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::CancelExportTaskOutput,
aws_smithy_http::result::SdkError<crate::error::CancelExportTaskError>,
> {
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
}