/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Http { class URI; } //namespace Http namespace EBS { namespace Model { /** */ class GetSnapshotBlockRequest : public EBSRequest { public: AWS_EBS_API GetSnapshotBlockRequest(); // 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 "GetSnapshotBlock"; } AWS_EBS_API Aws::String SerializePayload() const override; AWS_EBS_API void AddQueryStringParameters(Aws::Http::URI& uri) const override; /** *

The ID of the snapshot containing the block from which to get data.

*

If the specified snapshot is encrypted, you must have permission * to use the KMS key that was used to encrypt the snapshot. For more information, * see * Using encryption in the Amazon Elastic Compute Cloud User Guide.

* */ inline const Aws::String& GetSnapshotId() const{ return m_snapshotId; } /** *

The ID of the snapshot containing the block from which to get data.

*

If the specified snapshot is encrypted, you must have permission * to use the KMS key that was used to encrypt the snapshot. For more information, * see * Using encryption in the Amazon Elastic Compute Cloud User Guide.

* */ inline bool SnapshotIdHasBeenSet() const { return m_snapshotIdHasBeenSet; } /** *

The ID of the snapshot containing the block from which to get data.

*

If the specified snapshot is encrypted, you must have permission * to use the KMS key that was used to encrypt the snapshot. For more information, * see * Using encryption in the Amazon Elastic Compute Cloud User Guide.

* */ inline void SetSnapshotId(const Aws::String& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = value; } /** *

The ID of the snapshot containing the block from which to get data.

*

If the specified snapshot is encrypted, you must have permission * to use the KMS key that was used to encrypt the snapshot. For more information, * see * Using encryption in the Amazon Elastic Compute Cloud User Guide.

* */ inline void SetSnapshotId(Aws::String&& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = std::move(value); } /** *

The ID of the snapshot containing the block from which to get data.

*

If the specified snapshot is encrypted, you must have permission * to use the KMS key that was used to encrypt the snapshot. For more information, * see * Using encryption in the Amazon Elastic Compute Cloud User Guide.

* */ inline void SetSnapshotId(const char* value) { m_snapshotIdHasBeenSet = true; m_snapshotId.assign(value); } /** *

The ID of the snapshot containing the block from which to get data.

*

If the specified snapshot is encrypted, you must have permission * to use the KMS key that was used to encrypt the snapshot. For more information, * see * Using encryption in the Amazon Elastic Compute Cloud User Guide.

* */ inline GetSnapshotBlockRequest& WithSnapshotId(const Aws::String& value) { SetSnapshotId(value); return *this;} /** *

The ID of the snapshot containing the block from which to get data.

*

If the specified snapshot is encrypted, you must have permission * to use the KMS key that was used to encrypt the snapshot. For more information, * see * Using encryption in the Amazon Elastic Compute Cloud User Guide.

* */ inline GetSnapshotBlockRequest& WithSnapshotId(Aws::String&& value) { SetSnapshotId(std::move(value)); return *this;} /** *

The ID of the snapshot containing the block from which to get data.

*

If the specified snapshot is encrypted, you must have permission * to use the KMS key that was used to encrypt the snapshot. For more information, * see * Using encryption in the Amazon Elastic Compute Cloud User Guide.

* */ inline GetSnapshotBlockRequest& WithSnapshotId(const char* value) { SetSnapshotId(value); return *this;} /** *

The block index of the block in which to read the data. A block index is a * logical index in units of 512 KiB blocks. To identify the block * index, divide the logical offset of the data in the logical volume by the block * size (logical offset of data/524288). The logical offset of the * data must be 512 KiB aligned.

*/ inline int GetBlockIndex() const{ return m_blockIndex; } /** *

The block index of the block in which to read the data. A block index is a * logical index in units of 512 KiB blocks. To identify the block * index, divide the logical offset of the data in the logical volume by the block * size (logical offset of data/524288). The logical offset of the * data must be 512 KiB aligned.

*/ inline bool BlockIndexHasBeenSet() const { return m_blockIndexHasBeenSet; } /** *

The block index of the block in which to read the data. A block index is a * logical index in units of 512 KiB blocks. To identify the block * index, divide the logical offset of the data in the logical volume by the block * size (logical offset of data/524288). The logical offset of the * data must be 512 KiB aligned.

*/ inline void SetBlockIndex(int value) { m_blockIndexHasBeenSet = true; m_blockIndex = value; } /** *

The block index of the block in which to read the data. A block index is a * logical index in units of 512 KiB blocks. To identify the block * index, divide the logical offset of the data in the logical volume by the block * size (logical offset of data/524288). The logical offset of the * data must be 512 KiB aligned.

*/ inline GetSnapshotBlockRequest& WithBlockIndex(int value) { SetBlockIndex(value); return *this;} /** *

The block token of the block from which to get data. You can obtain the * BlockToken by running the ListChangedBlocks or * ListSnapshotBlocks operations.

*/ inline const Aws::String& GetBlockToken() const{ return m_blockToken; } /** *

The block token of the block from which to get data. You can obtain the * BlockToken by running the ListChangedBlocks or * ListSnapshotBlocks operations.

*/ inline bool BlockTokenHasBeenSet() const { return m_blockTokenHasBeenSet; } /** *

The block token of the block from which to get data. You can obtain the * BlockToken by running the ListChangedBlocks or * ListSnapshotBlocks operations.

*/ inline void SetBlockToken(const Aws::String& value) { m_blockTokenHasBeenSet = true; m_blockToken = value; } /** *

The block token of the block from which to get data. You can obtain the * BlockToken by running the ListChangedBlocks or * ListSnapshotBlocks operations.

*/ inline void SetBlockToken(Aws::String&& value) { m_blockTokenHasBeenSet = true; m_blockToken = std::move(value); } /** *

The block token of the block from which to get data. You can obtain the * BlockToken by running the ListChangedBlocks or * ListSnapshotBlocks operations.

*/ inline void SetBlockToken(const char* value) { m_blockTokenHasBeenSet = true; m_blockToken.assign(value); } /** *

The block token of the block from which to get data. You can obtain the * BlockToken by running the ListChangedBlocks or * ListSnapshotBlocks operations.

*/ inline GetSnapshotBlockRequest& WithBlockToken(const Aws::String& value) { SetBlockToken(value); return *this;} /** *

The block token of the block from which to get data. You can obtain the * BlockToken by running the ListChangedBlocks or * ListSnapshotBlocks operations.

*/ inline GetSnapshotBlockRequest& WithBlockToken(Aws::String&& value) { SetBlockToken(std::move(value)); return *this;} /** *

The block token of the block from which to get data. You can obtain the * BlockToken by running the ListChangedBlocks or * ListSnapshotBlocks operations.

*/ inline GetSnapshotBlockRequest& WithBlockToken(const char* value) { SetBlockToken(value); return *this;} private: Aws::String m_snapshotId; bool m_snapshotIdHasBeenSet = false; int m_blockIndex; bool m_blockIndexHasBeenSet = false; Aws::String m_blockToken; bool m_blockTokenHasBeenSet = false; }; } // namespace Model } // namespace EBS } // namespace Aws