aws_sdk_ec2/client/
import_snapshot.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`ImportSnapshot`](crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`client_data(ClientData)`](crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder::client_data) / [`set_client_data(Option<ClientData>)`](crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder::set_client_data):<br>required: **false**<br><p>The client-specific data.</p><br>
7    ///   - [`client_token(impl Into<String>)`](crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder::set_client_token):<br>required: **false**<br><p>Token to enable idempotency for VM import requests.</p><br>
8    ///   - [`description(impl Into<String>)`](crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder::set_description):<br>required: **false**<br><p>The description string for the import snapshot task.</p><br>
9    ///   - [`disk_container(SnapshotDiskContainer)`](crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder::disk_container) / [`set_disk_container(Option<SnapshotDiskContainer>)`](crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder::set_disk_container):<br>required: **false**<br><p>Information about the disk container.</p><br>
10    ///   - [`dry_run(bool)`](crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder::set_dry_run):<br>required: **false**<br><p>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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p><br>
11    ///   - [`encrypted(bool)`](crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder::encrypted) / [`set_encrypted(Option<bool>)`](crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder::set_encrypted):<br>required: **false**<br><p>Specifies whether the destination snapshot of the imported image should be encrypted. The default KMS key for EBS is used unless you specify a non-default KMS key using <code>KmsKeyId</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p><br>
12    ///   - [`kms_key_id(impl Into<String>)`](crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder::kms_key_id) / [`set_kms_key_id(Option<String>)`](crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder::set_kms_key_id):<br>required: **false**<br><p>An identifier for the symmetric KMS key to use when creating the encrypted snapshot. 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 <code>KmsKeyId</code> is specified, the <code>Encrypted</code> flag must also be set.</p> <p>The KMS key identifier may be provided in any of the following formats:</p> <ul>  <li>   <p>Key ID</p></li>  <li>   <p>Key alias</p></li>  <li>   <p>ARN using key ID. The ID ARN contains the <code>arn:aws:kms</code> namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the <code>key</code> namespace, and then the key ID. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:key/<i>abcd1234-a123-456a-a12b-a123b4cd56ef</i>.</p></li>  <li>   <p>ARN using key alias. The alias ARN contains the <code>arn:aws:kms</code> namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the <code>alias</code> namespace, and then the key alias. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:alias/<i>ExampleAlias</i>.</p></li> </ul> <p>Amazon Web Services parses <code>KmsKeyId</code> asynchronously, meaning that the action you call may appear to complete even though you provided an invalid identifier. This action will eventually report failure.</p> <p>The specified KMS key must exist in the Region that the snapshot is being copied to.</p> <p>Amazon EBS does not support asymmetric KMS keys.</p><br>
13    ///   - [`role_name(impl Into<String>)`](crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder::role_name) / [`set_role_name(Option<String>)`](crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder::set_role_name):<br>required: **false**<br><p>The name of the role to use when not using the default role, 'vmimport'.</p><br>
14    ///   - [`tag_specifications(TagSpecification)`](crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder::tag_specifications) / [`set_tag_specifications(Option<Vec::<TagSpecification>>)`](crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder::set_tag_specifications):<br>required: **false**<br><p>The tags to apply to the import snapshot task during creation.</p><br>
15    /// - On success, responds with [`ImportSnapshotOutput`](crate::operation::import_snapshot::ImportSnapshotOutput) with field(s):
16    ///   - [`description(Option<String>)`](crate::operation::import_snapshot::ImportSnapshotOutput::description): <p>A description of the import snapshot task.</p>
17    ///   - [`import_task_id(Option<String>)`](crate::operation::import_snapshot::ImportSnapshotOutput::import_task_id): <p>The ID of the import snapshot task.</p>
18    ///   - [`snapshot_task_detail(Option<SnapshotTaskDetail>)`](crate::operation::import_snapshot::ImportSnapshotOutput::snapshot_task_detail): <p>Information about the import snapshot task.</p>
19    ///   - [`tags(Option<Vec::<Tag>>)`](crate::operation::import_snapshot::ImportSnapshotOutput::tags): <p>Any tags assigned to the import snapshot task.</p>
20    /// - On failure, responds with [`SdkError<ImportSnapshotError>`](crate::operation::import_snapshot::ImportSnapshotError)
21    pub fn import_snapshot(&self) -> crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder {
22        crate::operation::import_snapshot::builders::ImportSnapshotFluentBuilder::new(self.handle.clone())
23    }
24}