/** * 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 namespace Aws { namespace EBS { namespace Model { /** */ class AWS_EBS_API StartSnapshotRequest : public EBSRequest { public: StartSnapshotRequest(); // 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 "StartSnapshot"; } Aws::String SerializePayload() const override; /** *

The size of the volume, in GiB. The maximum size is 16384 GiB * (16 TiB).

*/ inline long long GetVolumeSize() const{ return m_volumeSize; } /** *

The size of the volume, in GiB. The maximum size is 16384 GiB * (16 TiB).

*/ inline bool VolumeSizeHasBeenSet() const { return m_volumeSizeHasBeenSet; } /** *

The size of the volume, in GiB. The maximum size is 16384 GiB * (16 TiB).

*/ inline void SetVolumeSize(long long value) { m_volumeSizeHasBeenSet = true; m_volumeSize = value; } /** *

The size of the volume, in GiB. The maximum size is 16384 GiB * (16 TiB).

*/ inline StartSnapshotRequest& WithVolumeSize(long long value) { SetVolumeSize(value); return *this;} /** *

The ID of the parent snapshot. If there is no parent snapshot, or if you are * creating the first snapshot for an on-premises volume, omit this parameter.

*

If your account is enabled for encryption by default, you cannot use an * unencrypted snapshot as a parent snapshot. You must first create an encrypted * copy of the parent snapshot using CopySnapshot.

*/ inline const Aws::String& GetParentSnapshotId() const{ return m_parentSnapshotId; } /** *

The ID of the parent snapshot. If there is no parent snapshot, or if you are * creating the first snapshot for an on-premises volume, omit this parameter.

*

If your account is enabled for encryption by default, you cannot use an * unencrypted snapshot as a parent snapshot. You must first create an encrypted * copy of the parent snapshot using CopySnapshot.

*/ inline bool ParentSnapshotIdHasBeenSet() const { return m_parentSnapshotIdHasBeenSet; } /** *

The ID of the parent snapshot. If there is no parent snapshot, or if you are * creating the first snapshot for an on-premises volume, omit this parameter.

*

If your account is enabled for encryption by default, you cannot use an * unencrypted snapshot as a parent snapshot. You must first create an encrypted * copy of the parent snapshot using CopySnapshot.

*/ inline void SetParentSnapshotId(const Aws::String& value) { m_parentSnapshotIdHasBeenSet = true; m_parentSnapshotId = value; } /** *

The ID of the parent snapshot. If there is no parent snapshot, or if you are * creating the first snapshot for an on-premises volume, omit this parameter.

*

If your account is enabled for encryption by default, you cannot use an * unencrypted snapshot as a parent snapshot. You must first create an encrypted * copy of the parent snapshot using CopySnapshot.

*/ inline void SetParentSnapshotId(Aws::String&& value) { m_parentSnapshotIdHasBeenSet = true; m_parentSnapshotId = std::move(value); } /** *

The ID of the parent snapshot. If there is no parent snapshot, or if you are * creating the first snapshot for an on-premises volume, omit this parameter.

*

If your account is enabled for encryption by default, you cannot use an * unencrypted snapshot as a parent snapshot. You must first create an encrypted * copy of the parent snapshot using CopySnapshot.

*/ inline void SetParentSnapshotId(const char* value) { m_parentSnapshotIdHasBeenSet = true; m_parentSnapshotId.assign(value); } /** *

The ID of the parent snapshot. If there is no parent snapshot, or if you are * creating the first snapshot for an on-premises volume, omit this parameter.

*

If your account is enabled for encryption by default, you cannot use an * unencrypted snapshot as a parent snapshot. You must first create an encrypted * copy of the parent snapshot using CopySnapshot.

*/ inline StartSnapshotRequest& WithParentSnapshotId(const Aws::String& value) { SetParentSnapshotId(value); return *this;} /** *

The ID of the parent snapshot. If there is no parent snapshot, or if you are * creating the first snapshot for an on-premises volume, omit this parameter.

*

If your account is enabled for encryption by default, you cannot use an * unencrypted snapshot as a parent snapshot. You must first create an encrypted * copy of the parent snapshot using CopySnapshot.

*/ inline StartSnapshotRequest& WithParentSnapshotId(Aws::String&& value) { SetParentSnapshotId(std::move(value)); return *this;} /** *

The ID of the parent snapshot. If there is no parent snapshot, or if you are * creating the first snapshot for an on-premises volume, omit this parameter.

*

If your account is enabled for encryption by default, you cannot use an * unencrypted snapshot as a parent snapshot. You must first create an encrypted * copy of the parent snapshot using CopySnapshot.

*/ inline StartSnapshotRequest& WithParentSnapshotId(const char* value) { SetParentSnapshotId(value); return *this;} /** *

The tags to apply to the snapshot.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

The tags to apply to the snapshot.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

The tags to apply to the snapshot.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

The tags to apply to the snapshot.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

The tags to apply to the snapshot.

*/ inline StartSnapshotRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

The tags to apply to the snapshot.

*/ inline StartSnapshotRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

The tags to apply to the snapshot.

*/ inline StartSnapshotRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

The tags to apply to the snapshot.

*/ inline StartSnapshotRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

A description for the snapshot.

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

A description for the snapshot.

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

A description for the snapshot.

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

A description for the snapshot.

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

A description for the snapshot.

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

A description for the snapshot.

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

A description for the snapshot.

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

A description for the snapshot.

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

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. Idempotency ensures that an API request completes * only once. With an idempotent request, if the original request completes * successfully. The subsequent retries with the same client token return the * result from the original successful request and they have no additional * effect.

If you do not specify a client token, one is automatically * generated by the AWS SDK.

For more information, see * Idempotency for StartSnapshot API in the Amazon Elastic Compute Cloud * User Guide.

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

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. Idempotency ensures that an API request completes * only once. With an idempotent request, if the original request completes * successfully. The subsequent retries with the same client token return the * result from the original successful request and they have no additional * effect.

If you do not specify a client token, one is automatically * generated by the AWS SDK.

For more information, see * Idempotency for StartSnapshot API in the Amazon Elastic Compute Cloud * User Guide.

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

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. Idempotency ensures that an API request completes * only once. With an idempotent request, if the original request completes * successfully. The subsequent retries with the same client token return the * result from the original successful request and they have no additional * effect.

If you do not specify a client token, one is automatically * generated by the AWS SDK.

For more information, see * Idempotency for StartSnapshot API in the Amazon Elastic Compute Cloud * User Guide.

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

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. Idempotency ensures that an API request completes * only once. With an idempotent request, if the original request completes * successfully. The subsequent retries with the same client token return the * result from the original successful request and they have no additional * effect.

If you do not specify a client token, one is automatically * generated by the AWS SDK.

For more information, see * Idempotency for StartSnapshot API in the Amazon Elastic Compute Cloud * User Guide.

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

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. Idempotency ensures that an API request completes * only once. With an idempotent request, if the original request completes * successfully. The subsequent retries with the same client token return the * result from the original successful request and they have no additional * effect.

If you do not specify a client token, one is automatically * generated by the AWS SDK.

For more information, see * Idempotency for StartSnapshot API in the Amazon Elastic Compute Cloud * User Guide.

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

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. Idempotency ensures that an API request completes * only once. With an idempotent request, if the original request completes * successfully. The subsequent retries with the same client token return the * result from the original successful request and they have no additional * effect.

If you do not specify a client token, one is automatically * generated by the AWS SDK.

For more information, see * Idempotency for StartSnapshot API in the Amazon Elastic Compute Cloud * User Guide.

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

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. Idempotency ensures that an API request completes * only once. With an idempotent request, if the original request completes * successfully. The subsequent retries with the same client token return the * result from the original successful request and they have no additional * effect.

If you do not specify a client token, one is automatically * generated by the AWS SDK.

For more information, see * Idempotency for StartSnapshot API in the Amazon Elastic Compute Cloud * User Guide.

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

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. Idempotency ensures that an API request completes * only once. With an idempotent request, if the original request completes * successfully. The subsequent retries with the same client token return the * result from the original successful request and they have no additional * effect.

If you do not specify a client token, one is automatically * generated by the AWS SDK.

For more information, see * Idempotency for StartSnapshot API in the Amazon Elastic Compute Cloud * User Guide.

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

Indicates whether to encrypt the snapshot. To create an encrypted snapshot, * specify true. To create an unencrypted snapshot, omit this * parameter.

If you specify a value for ParentSnapshotId, omit this * parameter.

If you specify true, the snapshot is encrypted * using the CMK specified using the KmsKeyArn parameter. If no value is * specified for KmsKeyArn, the default CMK for your account is used. If no * default CMK has been specified for your account, the AWS managed CMK is used. To * set a default CMK for your account, use * ModifyEbsDefaultKmsKeyId.

If your account is enabled for encryption * by default, you cannot set this parameter to false. In this case, * you can omit this parameter.

For more information, see * Using encryption in the Amazon Elastic Compute Cloud User Guide.

*/ inline bool GetEncrypted() const{ return m_encrypted; } /** *

Indicates whether to encrypt the snapshot. To create an encrypted snapshot, * specify true. To create an unencrypted snapshot, omit this * parameter.

If you specify a value for ParentSnapshotId, omit this * parameter.

If you specify true, the snapshot is encrypted * using the CMK specified using the KmsKeyArn parameter. If no value is * specified for KmsKeyArn, the default CMK for your account is used. If no * default CMK has been specified for your account, the AWS managed CMK is used. To * set a default CMK for your account, use * ModifyEbsDefaultKmsKeyId.

If your account is enabled for encryption * by default, you cannot set this parameter to false. In this case, * you can omit this parameter.

For more information, see * Using encryption in the Amazon Elastic Compute Cloud User Guide.

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

Indicates whether to encrypt the snapshot. To create an encrypted snapshot, * specify true. To create an unencrypted snapshot, omit this * parameter.

If you specify a value for ParentSnapshotId, omit this * parameter.

If you specify true, the snapshot is encrypted * using the CMK specified using the KmsKeyArn parameter. If no value is * specified for KmsKeyArn, the default CMK for your account is used. If no * default CMK has been specified for your account, the AWS managed CMK is used. To * set a default CMK for your account, use * ModifyEbsDefaultKmsKeyId.

If your account is enabled for encryption * by default, you cannot set this parameter to false. In this case, * you can omit this parameter.

For more information, see * Using encryption in the Amazon Elastic Compute Cloud User Guide.

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

Indicates whether to encrypt the snapshot. To create an encrypted snapshot, * specify true. To create an unencrypted snapshot, omit this * parameter.

If you specify a value for ParentSnapshotId, omit this * parameter.

If you specify true, the snapshot is encrypted * using the CMK specified using the KmsKeyArn parameter. If no value is * specified for KmsKeyArn, the default CMK for your account is used. If no * default CMK has been specified for your account, the AWS managed CMK is used. To * set a default CMK for your account, use * ModifyEbsDefaultKmsKeyId.

If your account is enabled for encryption * by default, you cannot set this parameter to false. In this case, * you can omit this parameter.

For more information, see * Using encryption in the Amazon Elastic Compute Cloud User Guide.

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

The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) * customer master key (CMK) to be used to encrypt the snapshot. If you do not * specify a CMK, the default AWS managed CMK is used.

If you specify a * ParentSnapshotId, omit this parameter; the snapshot will be encrypted * using the same CMK that was used to encrypt the parent snapshot.

If * Encrypted is set to true, you must specify a CMK ARN.

*/ inline const Aws::String& GetKmsKeyArn() const{ return m_kmsKeyArn; } /** *

The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) * customer master key (CMK) to be used to encrypt the snapshot. If you do not * specify a CMK, the default AWS managed CMK is used.

If you specify a * ParentSnapshotId, omit this parameter; the snapshot will be encrypted * using the same CMK that was used to encrypt the parent snapshot.

If * Encrypted is set to true, you must specify a CMK ARN.

*/ inline bool KmsKeyArnHasBeenSet() const { return m_kmsKeyArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) * customer master key (CMK) to be used to encrypt the snapshot. If you do not * specify a CMK, the default AWS managed CMK is used.

If you specify a * ParentSnapshotId, omit this parameter; the snapshot will be encrypted * using the same CMK that was used to encrypt the parent snapshot.

If * Encrypted is set to true, you must specify a CMK ARN.

*/ inline void SetKmsKeyArn(const Aws::String& value) { m_kmsKeyArnHasBeenSet = true; m_kmsKeyArn = value; } /** *

The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) * customer master key (CMK) to be used to encrypt the snapshot. If you do not * specify a CMK, the default AWS managed CMK is used.

If you specify a * ParentSnapshotId, omit this parameter; the snapshot will be encrypted * using the same CMK that was used to encrypt the parent snapshot.

If * Encrypted is set to true, you must specify a CMK ARN.

*/ inline void SetKmsKeyArn(Aws::String&& value) { m_kmsKeyArnHasBeenSet = true; m_kmsKeyArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) * customer master key (CMK) to be used to encrypt the snapshot. If you do not * specify a CMK, the default AWS managed CMK is used.

If you specify a * ParentSnapshotId, omit this parameter; the snapshot will be encrypted * using the same CMK that was used to encrypt the parent snapshot.

If * Encrypted is set to true, you must specify a CMK ARN.

*/ inline void SetKmsKeyArn(const char* value) { m_kmsKeyArnHasBeenSet = true; m_kmsKeyArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) * customer master key (CMK) to be used to encrypt the snapshot. If you do not * specify a CMK, the default AWS managed CMK is used.

If you specify a * ParentSnapshotId, omit this parameter; the snapshot will be encrypted * using the same CMK that was used to encrypt the parent snapshot.

If * Encrypted is set to true, you must specify a CMK ARN.

*/ inline StartSnapshotRequest& WithKmsKeyArn(const Aws::String& value) { SetKmsKeyArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) * customer master key (CMK) to be used to encrypt the snapshot. If you do not * specify a CMK, the default AWS managed CMK is used.

If you specify a * ParentSnapshotId, omit this parameter; the snapshot will be encrypted * using the same CMK that was used to encrypt the parent snapshot.

If * Encrypted is set to true, you must specify a CMK ARN.

*/ inline StartSnapshotRequest& WithKmsKeyArn(Aws::String&& value) { SetKmsKeyArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) * customer master key (CMK) to be used to encrypt the snapshot. If you do not * specify a CMK, the default AWS managed CMK is used.

If you specify a * ParentSnapshotId, omit this parameter; the snapshot will be encrypted * using the same CMK that was used to encrypt the parent snapshot.

If * Encrypted is set to true, you must specify a CMK ARN.

*/ inline StartSnapshotRequest& WithKmsKeyArn(const char* value) { SetKmsKeyArn(value); return *this;} /** *

The amount of time (in minutes) after which the snapshot is automatically * cancelled if:

  • No blocks are written to the snapshot.

  • *
  • The snapshot is not completed after writing the last block of data.

    *

If no value is specified, the timeout defaults to 60 * minutes.

*/ inline int GetTimeout() const{ return m_timeout; } /** *

The amount of time (in minutes) after which the snapshot is automatically * cancelled if:

  • No blocks are written to the snapshot.

  • *
  • The snapshot is not completed after writing the last block of data.

    *

If no value is specified, the timeout defaults to 60 * minutes.

*/ inline bool TimeoutHasBeenSet() const { return m_timeoutHasBeenSet; } /** *

The amount of time (in minutes) after which the snapshot is automatically * cancelled if:

  • No blocks are written to the snapshot.

  • *
  • The snapshot is not completed after writing the last block of data.

    *

If no value is specified, the timeout defaults to 60 * minutes.

*/ inline void SetTimeout(int value) { m_timeoutHasBeenSet = true; m_timeout = value; } /** *

The amount of time (in minutes) after which the snapshot is automatically * cancelled if:

  • No blocks are written to the snapshot.

  • *
  • The snapshot is not completed after writing the last block of data.

    *

If no value is specified, the timeout defaults to 60 * minutes.

*/ inline StartSnapshotRequest& WithTimeout(int value) { SetTimeout(value); return *this;} private: long long m_volumeSize; bool m_volumeSizeHasBeenSet; Aws::String m_parentSnapshotId; bool m_parentSnapshotIdHasBeenSet; Aws::Vector m_tags; bool m_tagsHasBeenSet; Aws::String m_description; bool m_descriptionHasBeenSet; Aws::String m_clientToken; bool m_clientTokenHasBeenSet; bool m_encrypted; bool m_encryptedHasBeenSet; Aws::String m_kmsKeyArn; bool m_kmsKeyArnHasBeenSet; int m_timeout; bool m_timeoutHasBeenSet; }; } // namespace Model } // namespace EBS } // namespace Aws