Struct aws_sdk_ec2::client::fluent_builders::ImportSnapshot
source · pub struct ImportSnapshot { /* private fields */ }
Expand description
Fluent builder constructing a request to ImportSnapshot
.
Imports a disk into an EBS snapshot.
For more information, see Importing a disk as a snapshot using VM Import/Export in the VM Import/Export User Guide.
Implementations§
source§impl ImportSnapshot
impl ImportSnapshot
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<ImportSnapshot, AwsResponseRetryClassifier>, SdkError<ImportSnapshotError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<ImportSnapshot, AwsResponseRetryClassifier>, SdkError<ImportSnapshotError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<ImportSnapshotOutput, SdkError<ImportSnapshotError>>
pub async fn send(
self
) -> Result<ImportSnapshotOutput, SdkError<ImportSnapshotError>>
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, which can be set when configuring the client.
sourcepub fn client_data(self, input: ClientData) -> Self
pub fn client_data(self, input: ClientData) -> Self
The client-specific data.
sourcepub fn set_client_data(self, input: Option<ClientData>) -> Self
pub fn set_client_data(self, input: Option<ClientData>) -> Self
The client-specific data.
sourcepub fn client_token(self, input: impl Into<String>) -> Self
pub fn client_token(self, input: impl Into<String>) -> Self
Token to enable idempotency for VM import requests.
sourcepub fn set_client_token(self, input: Option<String>) -> Self
pub fn set_client_token(self, input: Option<String>) -> Self
Token to enable idempotency for VM import requests.
sourcepub fn description(self, input: impl Into<String>) -> Self
pub fn description(self, input: impl Into<String>) -> Self
The description string for the import snapshot task.
sourcepub fn set_description(self, input: Option<String>) -> Self
pub fn set_description(self, input: Option<String>) -> Self
The description string for the import snapshot task.
sourcepub fn disk_container(self, input: SnapshotDiskContainer) -> Self
pub fn disk_container(self, input: SnapshotDiskContainer) -> Self
Information about the disk container.
sourcepub fn set_disk_container(self, input: Option<SnapshotDiskContainer>) -> Self
pub fn set_disk_container(self, input: Option<SnapshotDiskContainer>) -> Self
Information about the disk container.
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 encrypted(self, input: bool) -> Self
pub fn encrypted(self, input: bool) -> Self
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 KmsKeyId
. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.
sourcepub fn set_encrypted(self, input: Option<bool>) -> Self
pub fn set_encrypted(self, input: Option<bool>) -> Self
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 KmsKeyId
. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.
sourcepub fn kms_key_id(self, input: impl Into<String>) -> Self
pub fn kms_key_id(self, input: impl Into<String>) -> Self
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 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, thealias
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, thekey
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, thealias
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 snapshot is being copied to.
Amazon EBS does not support asymmetric KMS keys.
sourcepub fn set_kms_key_id(self, input: Option<String>) -> Self
pub fn set_kms_key_id(self, input: Option<String>) -> Self
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 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, thealias
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, thekey
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, thealias
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 snapshot is being copied to.
Amazon EBS does not support asymmetric KMS keys.
sourcepub fn role_name(self, input: impl Into<String>) -> Self
pub fn role_name(self, input: impl Into<String>) -> Self
The name of the role to use when not using the default role, 'vmimport'.
sourcepub fn set_role_name(self, input: Option<String>) -> Self
pub fn set_role_name(self, input: Option<String>) -> Self
The name of the role to use when not using the default role, 'vmimport'.
sourcepub fn tag_specifications(self, input: TagSpecification) -> Self
pub fn tag_specifications(self, input: TagSpecification) -> Self
Appends an item to TagSpecifications
.
To override the contents of this collection use set_tag_specifications
.
The tags to apply to the import snapshot task during creation.
sourcepub fn set_tag_specifications(self, input: Option<Vec<TagSpecification>>) -> Self
pub fn set_tag_specifications(self, input: Option<Vec<TagSpecification>>) -> Self
The tags to apply to the import snapshot task during creation.
Trait Implementations§
source§impl Clone for ImportSnapshot
impl Clone for ImportSnapshot
source§fn clone(&self) -> ImportSnapshot
fn clone(&self) -> ImportSnapshot
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more