Struct aws_sdk_ec2::input::import_instance_input::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ImportInstanceInput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn description(self, input: impl Into<String>) -> Self
pub fn description(self, input: impl Into<String>) -> Self
A description for the instance being imported.
sourcepub fn set_description(self, input: Option<String>) -> Self
pub fn set_description(self, input: Option<String>) -> Self
A description for the instance being imported.
sourcepub fn disk_images(self, input: DiskImage) -> Self
pub fn disk_images(self, input: DiskImage) -> Self
Appends an item to disk_images
.
To override the contents of this collection use set_disk_images
.
The disk image.
sourcepub fn set_disk_images(self, input: Option<Vec<DiskImage>>) -> Self
pub fn set_disk_images(self, input: Option<Vec<DiskImage>>) -> Self
The disk image.
sourcepub fn dry_run(self, input: bool) -> Self
pub fn dry_run(self, input: bool) -> Self
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation
. Otherwise, it is UnauthorizedOperation
.
sourcepub fn set_dry_run(self, input: Option<bool>) -> Self
pub fn set_dry_run(self, input: Option<bool>) -> Self
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation
. Otherwise, it is UnauthorizedOperation
.
sourcepub fn launch_specification(
self,
input: ImportInstanceLaunchSpecification
) -> Self
pub fn launch_specification(
self,
input: ImportInstanceLaunchSpecification
) -> Self
The launch specification.
sourcepub fn set_launch_specification(
self,
input: Option<ImportInstanceLaunchSpecification>
) -> Self
pub fn set_launch_specification(
self,
input: Option<ImportInstanceLaunchSpecification>
) -> Self
The launch specification.
sourcepub fn platform(self, input: PlatformValues) -> Self
pub fn platform(self, input: PlatformValues) -> Self
The instance operating system.
sourcepub fn set_platform(self, input: Option<PlatformValues>) -> Self
pub fn set_platform(self, input: Option<PlatformValues>) -> Self
The instance operating system.
sourcepub fn build(self) -> Result<ImportInstanceInput, BuildError>
pub fn build(self) -> Result<ImportInstanceInput, BuildError>
Consumes the builder and constructs a ImportInstanceInput
.
Examples found in repository?
61981 61982 61983 61984 61985 61986 61987 61988 61989 61990 61991 61992 61993 61994 61995 61996 61997 61998 61999 62000 62001 62002 62003 62004 62005 62006 62007 62008 62009 62010 62011 62012 62013 62014 62015 62016 62017 62018 62019 62020 62021 62022 62023
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::ImportInstance,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::ImportInstanceError>,
> {
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::ImportInstanceOutput,
aws_smithy_http::result::SdkError<crate::error::ImportInstanceError>,
> {
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
}