/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace EC2 { namespace Model { /** */ class ImportSnapshotRequest : public EC2Request { public: AWS_EC2_API ImportSnapshotRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "ImportSnapshot"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The client-specific data.

*/ inline const ClientData& GetClientData() const{ return m_clientData; } /** *

The client-specific data.

*/ inline bool ClientDataHasBeenSet() const { return m_clientDataHasBeenSet; } /** *

The client-specific data.

*/ inline void SetClientData(const ClientData& value) { m_clientDataHasBeenSet = true; m_clientData = value; } /** *

The client-specific data.

*/ inline void SetClientData(ClientData&& value) { m_clientDataHasBeenSet = true; m_clientData = std::move(value); } /** *

The client-specific data.

*/ inline ImportSnapshotRequest& WithClientData(const ClientData& value) { SetClientData(value); return *this;} /** *

The client-specific data.

*/ inline ImportSnapshotRequest& WithClientData(ClientData&& value) { SetClientData(std::move(value)); return *this;} /** *

Token to enable idempotency for VM import requests.

*/ inline const Aws::String& GetClientToken() const{ return m_clientToken; } /** *

Token to enable idempotency for VM import requests.

*/ inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } /** *

Token to enable idempotency for VM import requests.

*/ inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } /** *

Token to enable idempotency for VM import requests.

*/ inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } /** *

Token to enable idempotency for VM import requests.

*/ inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } /** *

Token to enable idempotency for VM import requests.

*/ inline ImportSnapshotRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} /** *

Token to enable idempotency for VM import requests.

*/ inline ImportSnapshotRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} /** *

Token to enable idempotency for VM import requests.

*/ inline ImportSnapshotRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} /** *

The description string for the import snapshot task.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

The description string for the import snapshot task.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

The description string for the import snapshot task.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

The description string for the import snapshot task.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

The description string for the import snapshot task.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

The description string for the import snapshot task.

*/ inline ImportSnapshotRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The description string for the import snapshot task.

*/ inline ImportSnapshotRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

The description string for the import snapshot task.

*/ inline ImportSnapshotRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

Information about the disk container.

*/ inline const SnapshotDiskContainer& GetDiskContainer() const{ return m_diskContainer; } /** *

Information about the disk container.

*/ inline bool DiskContainerHasBeenSet() const { return m_diskContainerHasBeenSet; } /** *

Information about the disk container.

*/ inline void SetDiskContainer(const SnapshotDiskContainer& value) { m_diskContainerHasBeenSet = true; m_diskContainer = value; } /** *

Information about the disk container.

*/ inline void SetDiskContainer(SnapshotDiskContainer&& value) { m_diskContainerHasBeenSet = true; m_diskContainer = std::move(value); } /** *

Information about the disk container.

*/ inline ImportSnapshotRequest& WithDiskContainer(const SnapshotDiskContainer& value) { SetDiskContainer(value); return *this;} /** *

Information about the disk container.

*/ inline ImportSnapshotRequest& WithDiskContainer(SnapshotDiskContainer&& value) { SetDiskContainer(std::move(value)); return *this;} /** *

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.

*/ inline bool GetDryRun() const{ return m_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.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

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.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

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.

*/ inline ImportSnapshotRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

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.

*/ inline bool GetEncrypted() const{ return m_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.

*/ inline bool EncryptedHasBeenSet() const { return m_encryptedHasBeenSet; } /** *

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.

*/ inline void SetEncrypted(bool value) { m_encryptedHasBeenSet = true; m_encrypted = value; } /** *

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.

*/ inline ImportSnapshotRequest& WithEncrypted(bool value) { SetEncrypted(value); return *this;} /** *

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

  • *

    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.

*/ inline const Aws::String& GetKmsKeyId() const{ return m_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

  • *

    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.

*/ inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; } /** *

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

  • *

    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.

*/ inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; } /** *

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

  • *

    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.

*/ inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); } /** *

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

  • *

    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.

*/ inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); } /** *

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

  • *

    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.

*/ inline ImportSnapshotRequest& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;} /** *

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

  • *

    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.

*/ inline ImportSnapshotRequest& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;} /** *

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

  • *

    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.

*/ inline ImportSnapshotRequest& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;} /** *

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

*/ inline const Aws::String& GetRoleName() const{ return m_roleName; } /** *

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

*/ inline bool RoleNameHasBeenSet() const { return m_roleNameHasBeenSet; } /** *

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

*/ inline void SetRoleName(const Aws::String& value) { m_roleNameHasBeenSet = true; m_roleName = value; } /** *

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

*/ inline void SetRoleName(Aws::String&& value) { m_roleNameHasBeenSet = true; m_roleName = std::move(value); } /** *

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

*/ inline void SetRoleName(const char* value) { m_roleNameHasBeenSet = true; m_roleName.assign(value); } /** *

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

*/ inline ImportSnapshotRequest& WithRoleName(const Aws::String& value) { SetRoleName(value); return *this;} /** *

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

*/ inline ImportSnapshotRequest& WithRoleName(Aws::String&& value) { SetRoleName(std::move(value)); return *this;} /** *

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

*/ inline ImportSnapshotRequest& WithRoleName(const char* value) { SetRoleName(value); return *this;} /** *

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

*/ inline const Aws::Vector& GetTagSpecifications() const{ return m_tagSpecifications; } /** *

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

*/ inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; } /** *

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

*/ inline void SetTagSpecifications(const Aws::Vector& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; } /** *

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

*/ inline void SetTagSpecifications(Aws::Vector&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); } /** *

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

*/ inline ImportSnapshotRequest& WithTagSpecifications(const Aws::Vector& value) { SetTagSpecifications(value); return *this;} /** *

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

*/ inline ImportSnapshotRequest& WithTagSpecifications(Aws::Vector&& value) { SetTagSpecifications(std::move(value)); return *this;} /** *

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

*/ inline ImportSnapshotRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; } /** *

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

*/ inline ImportSnapshotRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; } private: ClientData m_clientData; bool m_clientDataHasBeenSet = false; Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; SnapshotDiskContainer m_diskContainer; bool m_diskContainerHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; bool m_encrypted; bool m_encryptedHasBeenSet = false; Aws::String m_kmsKeyId; bool m_kmsKeyIdHasBeenSet = false; Aws::String m_roleName; bool m_roleNameHasBeenSet = false; Aws::Vector m_tagSpecifications; bool m_tagSpecificationsHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws