pub struct Builder { /* private fields */ }
Expand description

A builder for ImportImageInput.

Implementations§

The architecture of the virtual machine.

Valid values: i386 | x86_64

Examples found in repository?
src/client.rs (line 61736)
61735
61736
61737
61738
        pub fn architecture(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.architecture(input.into());
            self
        }

The architecture of the virtual machine.

Valid values: i386 | x86_64

Examples found in repository?
src/client.rs (line 61742)
61741
61742
61743
61744
        pub fn set_architecture(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_architecture(input);
            self
        }

The client-specific data.

Examples found in repository?
src/client.rs (line 61747)
61746
61747
61748
61749
        pub fn client_data(mut self, input: crate::model::ClientData) -> Self {
            self.inner = self.inner.client_data(input);
            self
        }

The client-specific data.

Examples found in repository?
src/client.rs (line 61755)
61751
61752
61753
61754
61755
61756
61757
        pub fn set_client_data(
            mut self,
            input: std::option::Option<crate::model::ClientData>,
        ) -> Self {
            self.inner = self.inner.set_client_data(input);
            self
        }

The token to enable idempotency for VM import requests.

Examples found in repository?
src/client.rs (line 61760)
61759
61760
61761
61762
        pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.client_token(input.into());
            self
        }

The token to enable idempotency for VM import requests.

Examples found in repository?
src/client.rs (line 61765)
61764
61765
61766
61767
        pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_client_token(input);
            self
        }

A description string for the import image task.

Examples found in repository?
src/client.rs (line 61770)
61769
61770
61771
61772
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.description(input.into());
            self
        }

A description string for the import image task.

Examples found in repository?
src/client.rs (line 61775)
61774
61775
61776
61777
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_description(input);
            self
        }

Appends an item to disk_containers.

To override the contents of this collection use set_disk_containers.

Information about the disk containers.

Examples found in repository?
src/client.rs (line 61784)
61783
61784
61785
61786
        pub fn disk_containers(mut self, input: crate::model::ImageDiskContainer) -> Self {
            self.inner = self.inner.disk_containers(input);
            self
        }

Information about the disk containers.

Examples found in repository?
src/client.rs (line 61792)
61788
61789
61790
61791
61792
61793
61794
        pub fn set_disk_containers(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ImageDiskContainer>>,
        ) -> Self {
            self.inner = self.inner.set_disk_containers(input);
            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.

Examples found in repository?
src/client.rs (line 61797)
61796
61797
61798
61799
        pub fn dry_run(mut self, input: bool) -> Self {
            self.inner = self.inner.dry_run(input);
            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.

Examples found in repository?
src/client.rs (line 61802)
61801
61802
61803
61804
        pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
            self.inner = self.inner.set_dry_run(input);
            self
        }

Specifies whether the destination AMI of the imported image should be encrypted. The default KMS key for EBS is used unless you specify a non-default KMS key using KmsKeyId. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

Examples found in repository?
src/client.rs (line 61807)
61806
61807
61808
61809
        pub fn encrypted(mut self, input: bool) -> Self {
            self.inner = self.inner.encrypted(input);
            self
        }

Specifies whether the destination AMI of the imported image should be encrypted. The default KMS key for EBS is used unless you specify a non-default KMS key using KmsKeyId. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

Examples found in repository?
src/client.rs (line 61812)
61811
61812
61813
61814
        pub fn set_encrypted(mut self, input: std::option::Option<bool>) -> Self {
            self.inner = self.inner.set_encrypted(input);
            self
        }

The target hypervisor platform.

Valid values: xen

Examples found in repository?
src/client.rs (line 61818)
61817
61818
61819
61820
        pub fn hypervisor(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.hypervisor(input.into());
            self
        }

The target hypervisor platform.

Valid values: xen

Examples found in repository?
src/client.rs (line 61824)
61823
61824
61825
61826
        pub fn set_hypervisor(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_hypervisor(input);
            self
        }

An identifier for the symmetric KMS key to use when creating the encrypted AMI. This parameter is only required if you want to use a non-default KMS key; if this parameter is not specified, the default KMS key for EBS is used. If a KmsKeyId is specified, the Encrypted flag must also be set.

The KMS key identifier may be provided in any of the following formats:

  • Key ID

  • Key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the alias namespace, and then the key alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

  • ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the key namespace, and then the key ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.

  • ARN using key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the alias namespace, and then the key alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

Amazon Web Services parses KmsKeyId asynchronously, meaning that the action you call may appear to complete even though you provided an invalid identifier. This action will eventually report failure.

The specified KMS key must exist in the Region that the AMI is being copied to.

Amazon EBS does not support asymmetric KMS keys.

Examples found in repository?
src/client.rs (line 61839)
61838
61839
61840
61841
        pub fn kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.kms_key_id(input.into());
            self
        }

An identifier for the symmetric KMS key to use when creating the encrypted AMI. This parameter is only required if you want to use a non-default KMS key; if this parameter is not specified, the default KMS key for EBS is used. If a KmsKeyId is specified, the Encrypted flag must also be set.

The KMS key identifier may be provided in any of the following formats:

  • Key ID

  • Key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the alias namespace, and then the key alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

  • ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the key namespace, and then the key ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.

  • ARN using key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the alias namespace, and then the key alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

Amazon Web Services parses KmsKeyId asynchronously, meaning that the action you call may appear to complete even though you provided an invalid identifier. This action will eventually report failure.

The specified KMS key must exist in the Region that the AMI is being copied to.

Amazon EBS does not support asymmetric KMS keys.

Examples found in repository?
src/client.rs (line 61854)
61853
61854
61855
61856
        pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_kms_key_id(input);
            self
        }

The license type to be used for the Amazon Machine Image (AMI) after importing.

Specify AWS to replace the source-system license with an Amazon Web Services license or BYOL to retain the source-system license. Leaving this parameter undefined is the same as choosing AWS when importing a Windows Server operating system, and the same as choosing BYOL when importing a Windows client operating system (such as Windows 10) or a Linux operating system.

To use BYOL, you must have existing licenses with rights to use these licenses in a third party cloud, such as Amazon Web Services. For more information, see Prerequisites in the VM Import/Export User Guide.

Examples found in repository?
src/client.rs (line 61861)
61860
61861
61862
61863
        pub fn license_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.license_type(input.into());
            self
        }

The license type to be used for the Amazon Machine Image (AMI) after importing.

Specify AWS to replace the source-system license with an Amazon Web Services license or BYOL to retain the source-system license. Leaving this parameter undefined is the same as choosing AWS when importing a Windows Server operating system, and the same as choosing BYOL when importing a Windows client operating system (such as Windows 10) or a Linux operating system.

To use BYOL, you must have existing licenses with rights to use these licenses in a third party cloud, such as Amazon Web Services. For more information, see Prerequisites in the VM Import/Export User Guide.

Examples found in repository?
src/client.rs (line 61868)
61867
61868
61869
61870
        pub fn set_license_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_license_type(input);
            self
        }

The operating system of the virtual machine.

Valid values: Windows | Linux

Examples found in repository?
src/client.rs (line 61874)
61873
61874
61875
61876
        pub fn platform(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.platform(input.into());
            self
        }

The operating system of the virtual machine.

Valid values: Windows | Linux

Examples found in repository?
src/client.rs (line 61880)
61879
61880
61881
61882
        pub fn set_platform(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_platform(input);
            self
        }

The name of the role to use when not using the default role, 'vmimport'.

Examples found in repository?
src/client.rs (line 61885)
61884
61885
61886
61887
        pub fn role_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.role_name(input.into());
            self
        }

The name of the role to use when not using the default role, 'vmimport'.

Examples found in repository?
src/client.rs (line 61890)
61889
61890
61891
61892
        pub fn set_role_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_role_name(input);
            self
        }

Appends an item to license_specifications.

To override the contents of this collection use set_license_specifications.

The ARNs of the license configurations.

Examples found in repository?
src/client.rs (line 61902)
61898
61899
61900
61901
61902
61903
61904
        pub fn license_specifications(
            mut self,
            input: crate::model::ImportImageLicenseConfigurationRequest,
        ) -> Self {
            self.inner = self.inner.license_specifications(input);
            self
        }

The ARNs of the license configurations.

Examples found in repository?
src/client.rs (line 61912)
61906
61907
61908
61909
61910
61911
61912
61913
61914
        pub fn set_license_specifications(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::ImportImageLicenseConfigurationRequest>,
            >,
        ) -> Self {
            self.inner = self.inner.set_license_specifications(input);
            self
        }

Appends an item to tag_specifications.

To override the contents of this collection use set_tag_specifications.

The tags to apply to the import image task during creation.

Examples found in repository?
src/client.rs (line 61921)
61920
61921
61922
61923
        pub fn tag_specifications(mut self, input: crate::model::TagSpecification) -> Self {
            self.inner = self.inner.tag_specifications(input);
            self
        }

The tags to apply to the import image task during creation.

Examples found in repository?
src/client.rs (line 61929)
61925
61926
61927
61928
61929
61930
61931
        pub fn set_tag_specifications(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
        ) -> Self {
            self.inner = self.inner.set_tag_specifications(input);
            self
        }

The usage operation value. For more information, see Licensing options in the VM Import/Export User Guide.

Examples found in repository?
src/client.rs (line 61934)
61933
61934
61935
61936
        pub fn usage_operation(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.usage_operation(input.into());
            self
        }

The usage operation value. For more information, see Licensing options in the VM Import/Export User Guide.

Examples found in repository?
src/client.rs (line 61942)
61938
61939
61940
61941
61942
61943
61944
        pub fn set_usage_operation(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_usage_operation(input);
            self
        }

The boot mode of the virtual machine.

Examples found in repository?
src/client.rs (line 61947)
61946
61947
61948
61949
        pub fn boot_mode(mut self, input: crate::model::BootModeValues) -> Self {
            self.inner = self.inner.boot_mode(input);
            self
        }

The boot mode of the virtual machine.

Examples found in repository?
src/client.rs (line 61955)
61951
61952
61953
61954
61955
61956
61957
        pub fn set_boot_mode(
            mut self,
            input: std::option::Option<crate::model::BootModeValues>,
        ) -> Self {
            self.inner = self.inner.set_boot_mode(input);
            self
        }

Consumes the builder and constructs a ImportImageInput.

Examples found in repository?
src/client.rs (line 61702)
61690
61691
61692
61693
61694
61695
61696
61697
61698
61699
61700
61701
61702
61703
61704
61705
61706
61707
61708
61709
61710
61711
61712
61713
61714
61715
61716
61717
61718
61719
61720
61721
61722
61723
61724
61725
61726
61727
61728
61729
61730
61731
61732
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::ImportImage,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::ImportImageError>,
        > {
            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::ImportImageOutput,
            aws_smithy_http::result::SdkError<crate::error::ImportImageError>,
        > {
            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
        }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more