/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace ElastiCache { namespace Model { /** *

Represents the input of a CopySnapshotMessage * operation.

See Also:

AWS * API Reference

*/ class CopySnapshotRequest : public ElastiCacheRequest { public: AWS_ELASTICACHE_API CopySnapshotRequest(); // 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 "CopySnapshot"; } AWS_ELASTICACHE_API Aws::String SerializePayload() const override; protected: AWS_ELASTICACHE_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The name of an existing snapshot from which to make a copy.

*/ inline const Aws::String& GetSourceSnapshotName() const{ return m_sourceSnapshotName; } /** *

The name of an existing snapshot from which to make a copy.

*/ inline bool SourceSnapshotNameHasBeenSet() const { return m_sourceSnapshotNameHasBeenSet; } /** *

The name of an existing snapshot from which to make a copy.

*/ inline void SetSourceSnapshotName(const Aws::String& value) { m_sourceSnapshotNameHasBeenSet = true; m_sourceSnapshotName = value; } /** *

The name of an existing snapshot from which to make a copy.

*/ inline void SetSourceSnapshotName(Aws::String&& value) { m_sourceSnapshotNameHasBeenSet = true; m_sourceSnapshotName = std::move(value); } /** *

The name of an existing snapshot from which to make a copy.

*/ inline void SetSourceSnapshotName(const char* value) { m_sourceSnapshotNameHasBeenSet = true; m_sourceSnapshotName.assign(value); } /** *

The name of an existing snapshot from which to make a copy.

*/ inline CopySnapshotRequest& WithSourceSnapshotName(const Aws::String& value) { SetSourceSnapshotName(value); return *this;} /** *

The name of an existing snapshot from which to make a copy.

*/ inline CopySnapshotRequest& WithSourceSnapshotName(Aws::String&& value) { SetSourceSnapshotName(std::move(value)); return *this;} /** *

The name of an existing snapshot from which to make a copy.

*/ inline CopySnapshotRequest& WithSourceSnapshotName(const char* value) { SetSourceSnapshotName(value); return *this;} /** *

A name for the snapshot copy. ElastiCache does not permit overwriting a * snapshot, therefore this name must be unique within its context - ElastiCache or * an Amazon S3 bucket if exporting.

*/ inline const Aws::String& GetTargetSnapshotName() const{ return m_targetSnapshotName; } /** *

A name for the snapshot copy. ElastiCache does not permit overwriting a * snapshot, therefore this name must be unique within its context - ElastiCache or * an Amazon S3 bucket if exporting.

*/ inline bool TargetSnapshotNameHasBeenSet() const { return m_targetSnapshotNameHasBeenSet; } /** *

A name for the snapshot copy. ElastiCache does not permit overwriting a * snapshot, therefore this name must be unique within its context - ElastiCache or * an Amazon S3 bucket if exporting.

*/ inline void SetTargetSnapshotName(const Aws::String& value) { m_targetSnapshotNameHasBeenSet = true; m_targetSnapshotName = value; } /** *

A name for the snapshot copy. ElastiCache does not permit overwriting a * snapshot, therefore this name must be unique within its context - ElastiCache or * an Amazon S3 bucket if exporting.

*/ inline void SetTargetSnapshotName(Aws::String&& value) { m_targetSnapshotNameHasBeenSet = true; m_targetSnapshotName = std::move(value); } /** *

A name for the snapshot copy. ElastiCache does not permit overwriting a * snapshot, therefore this name must be unique within its context - ElastiCache or * an Amazon S3 bucket if exporting.

*/ inline void SetTargetSnapshotName(const char* value) { m_targetSnapshotNameHasBeenSet = true; m_targetSnapshotName.assign(value); } /** *

A name for the snapshot copy. ElastiCache does not permit overwriting a * snapshot, therefore this name must be unique within its context - ElastiCache or * an Amazon S3 bucket if exporting.

*/ inline CopySnapshotRequest& WithTargetSnapshotName(const Aws::String& value) { SetTargetSnapshotName(value); return *this;} /** *

A name for the snapshot copy. ElastiCache does not permit overwriting a * snapshot, therefore this name must be unique within its context - ElastiCache or * an Amazon S3 bucket if exporting.

*/ inline CopySnapshotRequest& WithTargetSnapshotName(Aws::String&& value) { SetTargetSnapshotName(std::move(value)); return *this;} /** *

A name for the snapshot copy. ElastiCache does not permit overwriting a * snapshot, therefore this name must be unique within its context - ElastiCache or * an Amazon S3 bucket if exporting.

*/ inline CopySnapshotRequest& WithTargetSnapshotName(const char* value) { SetTargetSnapshotName(value); return *this;} /** *

The Amazon S3 bucket to which the snapshot is exported. This parameter is * used only when exporting a snapshot for external access.

When using this * parameter to export a snapshot, be sure Amazon ElastiCache has the needed * permissions to this S3 bucket. For more information, see Step * 2: Grant ElastiCache Access to Your Amazon S3 Bucket in the Amazon * ElastiCache User Guide.

For more information, see Exporting * a Snapshot in the Amazon ElastiCache User Guide.

*/ inline const Aws::String& GetTargetBucket() const{ return m_targetBucket; } /** *

The Amazon S3 bucket to which the snapshot is exported. This parameter is * used only when exporting a snapshot for external access.

When using this * parameter to export a snapshot, be sure Amazon ElastiCache has the needed * permissions to this S3 bucket. For more information, see Step * 2: Grant ElastiCache Access to Your Amazon S3 Bucket in the Amazon * ElastiCache User Guide.

For more information, see Exporting * a Snapshot in the Amazon ElastiCache User Guide.

*/ inline bool TargetBucketHasBeenSet() const { return m_targetBucketHasBeenSet; } /** *

The Amazon S3 bucket to which the snapshot is exported. This parameter is * used only when exporting a snapshot for external access.

When using this * parameter to export a snapshot, be sure Amazon ElastiCache has the needed * permissions to this S3 bucket. For more information, see Step * 2: Grant ElastiCache Access to Your Amazon S3 Bucket in the Amazon * ElastiCache User Guide.

For more information, see Exporting * a Snapshot in the Amazon ElastiCache User Guide.

*/ inline void SetTargetBucket(const Aws::String& value) { m_targetBucketHasBeenSet = true; m_targetBucket = value; } /** *

The Amazon S3 bucket to which the snapshot is exported. This parameter is * used only when exporting a snapshot for external access.

When using this * parameter to export a snapshot, be sure Amazon ElastiCache has the needed * permissions to this S3 bucket. For more information, see Step * 2: Grant ElastiCache Access to Your Amazon S3 Bucket in the Amazon * ElastiCache User Guide.

For more information, see Exporting * a Snapshot in the Amazon ElastiCache User Guide.

*/ inline void SetTargetBucket(Aws::String&& value) { m_targetBucketHasBeenSet = true; m_targetBucket = std::move(value); } /** *

The Amazon S3 bucket to which the snapshot is exported. This parameter is * used only when exporting a snapshot for external access.

When using this * parameter to export a snapshot, be sure Amazon ElastiCache has the needed * permissions to this S3 bucket. For more information, see Step * 2: Grant ElastiCache Access to Your Amazon S3 Bucket in the Amazon * ElastiCache User Guide.

For more information, see Exporting * a Snapshot in the Amazon ElastiCache User Guide.

*/ inline void SetTargetBucket(const char* value) { m_targetBucketHasBeenSet = true; m_targetBucket.assign(value); } /** *

The Amazon S3 bucket to which the snapshot is exported. This parameter is * used only when exporting a snapshot for external access.

When using this * parameter to export a snapshot, be sure Amazon ElastiCache has the needed * permissions to this S3 bucket. For more information, see Step * 2: Grant ElastiCache Access to Your Amazon S3 Bucket in the Amazon * ElastiCache User Guide.

For more information, see Exporting * a Snapshot in the Amazon ElastiCache User Guide.

*/ inline CopySnapshotRequest& WithTargetBucket(const Aws::String& value) { SetTargetBucket(value); return *this;} /** *

The Amazon S3 bucket to which the snapshot is exported. This parameter is * used only when exporting a snapshot for external access.

When using this * parameter to export a snapshot, be sure Amazon ElastiCache has the needed * permissions to this S3 bucket. For more information, see Step * 2: Grant ElastiCache Access to Your Amazon S3 Bucket in the Amazon * ElastiCache User Guide.

For more information, see Exporting * a Snapshot in the Amazon ElastiCache User Guide.

*/ inline CopySnapshotRequest& WithTargetBucket(Aws::String&& value) { SetTargetBucket(std::move(value)); return *this;} /** *

The Amazon S3 bucket to which the snapshot is exported. This parameter is * used only when exporting a snapshot for external access.

When using this * parameter to export a snapshot, be sure Amazon ElastiCache has the needed * permissions to this S3 bucket. For more information, see Step * 2: Grant ElastiCache Access to Your Amazon S3 Bucket in the Amazon * ElastiCache User Guide.

For more information, see Exporting * a Snapshot in the Amazon ElastiCache User Guide.

*/ inline CopySnapshotRequest& WithTargetBucket(const char* value) { SetTargetBucket(value); return *this;} /** *

The ID of the KMS key used to encrypt the target snapshot.

*/ inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; } /** *

The ID of the KMS key used to encrypt the target snapshot.

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

The ID of the KMS key used to encrypt the target snapshot.

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

The ID of the KMS key used to encrypt the target snapshot.

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

The ID of the KMS key used to encrypt the target snapshot.

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

The ID of the KMS key used to encrypt the target snapshot.

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

The ID of the KMS key used to encrypt the target snapshot.

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

The ID of the KMS key used to encrypt the target snapshot.

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

A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.

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

A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.

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

A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.

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

A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.

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

A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.

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

A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.

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

A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.

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

A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.

*/ inline CopySnapshotRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_sourceSnapshotName; bool m_sourceSnapshotNameHasBeenSet = false; Aws::String m_targetSnapshotName; bool m_targetSnapshotNameHasBeenSet = false; Aws::String m_targetBucket; bool m_targetBucketHasBeenSet = false; Aws::String m_kmsKeyId; bool m_kmsKeyIdHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace ElastiCache } // namespace Aws