amazonka-ec2-2.0: Amazon Elastic Compute Cloud SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.EC2.ImportSnapshot

Description

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.

Synopsis

Creating a Request

data ImportSnapshot Source #

See: newImportSnapshot smart constructor.

Constructors

ImportSnapshot' 

Fields

  • clientData :: Maybe ClientData

    The client-specific data.

  • clientToken :: Maybe Text

    Token to enable idempotency for VM import requests.

  • description :: Maybe Text

    The description string for the import snapshot task.

  • diskContainer :: Maybe SnapshotDiskContainer

    Information about the disk container.

  • dryRun :: Maybe Bool

    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.

  • encrypted :: Maybe Bool

    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.

  • kmsKeyId :: Maybe Text

    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, 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 snapshot is being copied to.

    Amazon EBS does not support asymmetric KMS keys.

  • roleName :: Maybe Text

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

  • tagSpecifications :: Maybe [TagSpecification]

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

Instances

Instances details
ToHeaders ImportSnapshot Source # 
Instance details

Defined in Amazonka.EC2.ImportSnapshot

ToPath ImportSnapshot Source # 
Instance details

Defined in Amazonka.EC2.ImportSnapshot

ToQuery ImportSnapshot Source # 
Instance details

Defined in Amazonka.EC2.ImportSnapshot

AWSRequest ImportSnapshot Source # 
Instance details

Defined in Amazonka.EC2.ImportSnapshot

Associated Types

type AWSResponse ImportSnapshot #

Generic ImportSnapshot Source # 
Instance details

Defined in Amazonka.EC2.ImportSnapshot

Associated Types

type Rep ImportSnapshot :: Type -> Type #

Read ImportSnapshot Source # 
Instance details

Defined in Amazonka.EC2.ImportSnapshot

Show ImportSnapshot Source # 
Instance details

Defined in Amazonka.EC2.ImportSnapshot

NFData ImportSnapshot Source # 
Instance details

Defined in Amazonka.EC2.ImportSnapshot

Methods

rnf :: ImportSnapshot -> () #

Eq ImportSnapshot Source # 
Instance details

Defined in Amazonka.EC2.ImportSnapshot

Hashable ImportSnapshot Source # 
Instance details

Defined in Amazonka.EC2.ImportSnapshot

type AWSResponse ImportSnapshot Source # 
Instance details

Defined in Amazonka.EC2.ImportSnapshot

type Rep ImportSnapshot Source # 
Instance details

Defined in Amazonka.EC2.ImportSnapshot

newImportSnapshot :: ImportSnapshot Source #

Create a value of ImportSnapshot with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:clientData:ImportSnapshot', importSnapshot_clientData - The client-specific data.

ImportSnapshot, importSnapshot_clientToken - Token to enable idempotency for VM import requests.

ImportSnapshot, importSnapshot_description - The description string for the import snapshot task.

$sel:diskContainer:ImportSnapshot', importSnapshot_diskContainer - Information about the disk container.

$sel:dryRun:ImportSnapshot', importSnapshot_dryRun - 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.

ImportSnapshot, importSnapshot_encrypted - 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.

ImportSnapshot, importSnapshot_kmsKeyId - 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, 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 snapshot is being copied to.

Amazon EBS does not support asymmetric KMS keys.

$sel:roleName:ImportSnapshot', importSnapshot_roleName - The name of the role to use when not using the default role, 'vmimport'.

ImportSnapshot, importSnapshot_tagSpecifications - The tags to apply to the import snapshot task during creation.

Request Lenses

importSnapshot_clientToken :: Lens' ImportSnapshot (Maybe Text) Source #

Token to enable idempotency for VM import requests.

importSnapshot_description :: Lens' ImportSnapshot (Maybe Text) Source #

The description string for the import snapshot task.

importSnapshot_dryRun :: Lens' ImportSnapshot (Maybe Bool) Source #

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.

importSnapshot_encrypted :: Lens' ImportSnapshot (Maybe Bool) Source #

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.

importSnapshot_kmsKeyId :: Lens' ImportSnapshot (Maybe Text) Source #

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, 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 snapshot is being copied to.

Amazon EBS does not support asymmetric KMS keys.

importSnapshot_roleName :: Lens' ImportSnapshot (Maybe Text) Source #

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

importSnapshot_tagSpecifications :: Lens' ImportSnapshot (Maybe [TagSpecification]) Source #

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

Destructuring the Response

data ImportSnapshotResponse Source #

See: newImportSnapshotResponse smart constructor.

Constructors

ImportSnapshotResponse' 

Fields

Instances

Instances details
Generic ImportSnapshotResponse Source # 
Instance details

Defined in Amazonka.EC2.ImportSnapshot

Associated Types

type Rep ImportSnapshotResponse :: Type -> Type #

Read ImportSnapshotResponse Source # 
Instance details

Defined in Amazonka.EC2.ImportSnapshot

Show ImportSnapshotResponse Source # 
Instance details

Defined in Amazonka.EC2.ImportSnapshot

NFData ImportSnapshotResponse Source # 
Instance details

Defined in Amazonka.EC2.ImportSnapshot

Methods

rnf :: ImportSnapshotResponse -> () #

Eq ImportSnapshotResponse Source # 
Instance details

Defined in Amazonka.EC2.ImportSnapshot

type Rep ImportSnapshotResponse Source # 
Instance details

Defined in Amazonka.EC2.ImportSnapshot

type Rep ImportSnapshotResponse = D1 ('MetaData "ImportSnapshotResponse" "Amazonka.EC2.ImportSnapshot" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "ImportSnapshotResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "importTaskId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "snapshotTaskDetail") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SnapshotTaskDetail)) :*: (S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))

newImportSnapshotResponse Source #

Create a value of ImportSnapshotResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

ImportSnapshot, importSnapshotResponse_description - A description of the import snapshot task.

ImportSnapshotResponse, importSnapshotResponse_importTaskId - The ID of the import snapshot task.

ImportSnapshotResponse, importSnapshotResponse_snapshotTaskDetail - Information about the import snapshot task.

ImportSnapshotResponse, importSnapshotResponse_tags - Any tags assigned to the import snapshot task.

$sel:httpStatus:ImportSnapshotResponse', importSnapshotResponse_httpStatus - The response's http status code.

Response Lenses

importSnapshotResponse_description :: Lens' ImportSnapshotResponse (Maybe Text) Source #

A description of the import snapshot task.

importSnapshotResponse_tags :: Lens' ImportSnapshotResponse (Maybe [Tag]) Source #

Any tags assigned to the import snapshot task.