/** * 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 CreateSnapshot * operation.

See Also:

AWS * API Reference

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

The identifier of an existing replication group. The snapshot is created from * this replication group.

*/ inline const Aws::String& GetReplicationGroupId() const{ return m_replicationGroupId; } /** *

The identifier of an existing replication group. The snapshot is created from * this replication group.

*/ inline bool ReplicationGroupIdHasBeenSet() const { return m_replicationGroupIdHasBeenSet; } /** *

The identifier of an existing replication group. The snapshot is created from * this replication group.

*/ inline void SetReplicationGroupId(const Aws::String& value) { m_replicationGroupIdHasBeenSet = true; m_replicationGroupId = value; } /** *

The identifier of an existing replication group. The snapshot is created from * this replication group.

*/ inline void SetReplicationGroupId(Aws::String&& value) { m_replicationGroupIdHasBeenSet = true; m_replicationGroupId = std::move(value); } /** *

The identifier of an existing replication group. The snapshot is created from * this replication group.

*/ inline void SetReplicationGroupId(const char* value) { m_replicationGroupIdHasBeenSet = true; m_replicationGroupId.assign(value); } /** *

The identifier of an existing replication group. The snapshot is created from * this replication group.

*/ inline CreateSnapshotRequest& WithReplicationGroupId(const Aws::String& value) { SetReplicationGroupId(value); return *this;} /** *

The identifier of an existing replication group. The snapshot is created from * this replication group.

*/ inline CreateSnapshotRequest& WithReplicationGroupId(Aws::String&& value) { SetReplicationGroupId(std::move(value)); return *this;} /** *

The identifier of an existing replication group. The snapshot is created from * this replication group.

*/ inline CreateSnapshotRequest& WithReplicationGroupId(const char* value) { SetReplicationGroupId(value); return *this;} /** *

The identifier of an existing cluster. The snapshot is created from this * cluster.

*/ inline const Aws::String& GetCacheClusterId() const{ return m_cacheClusterId; } /** *

The identifier of an existing cluster. The snapshot is created from this * cluster.

*/ inline bool CacheClusterIdHasBeenSet() const { return m_cacheClusterIdHasBeenSet; } /** *

The identifier of an existing cluster. The snapshot is created from this * cluster.

*/ inline void SetCacheClusterId(const Aws::String& value) { m_cacheClusterIdHasBeenSet = true; m_cacheClusterId = value; } /** *

The identifier of an existing cluster. The snapshot is created from this * cluster.

*/ inline void SetCacheClusterId(Aws::String&& value) { m_cacheClusterIdHasBeenSet = true; m_cacheClusterId = std::move(value); } /** *

The identifier of an existing cluster. The snapshot is created from this * cluster.

*/ inline void SetCacheClusterId(const char* value) { m_cacheClusterIdHasBeenSet = true; m_cacheClusterId.assign(value); } /** *

The identifier of an existing cluster. The snapshot is created from this * cluster.

*/ inline CreateSnapshotRequest& WithCacheClusterId(const Aws::String& value) { SetCacheClusterId(value); return *this;} /** *

The identifier of an existing cluster. The snapshot is created from this * cluster.

*/ inline CreateSnapshotRequest& WithCacheClusterId(Aws::String&& value) { SetCacheClusterId(std::move(value)); return *this;} /** *

The identifier of an existing cluster. The snapshot is created from this * cluster.

*/ inline CreateSnapshotRequest& WithCacheClusterId(const char* value) { SetCacheClusterId(value); return *this;} /** *

A name for the snapshot being created.

*/ inline const Aws::String& GetSnapshotName() const{ return m_snapshotName; } /** *

A name for the snapshot being created.

*/ inline bool SnapshotNameHasBeenSet() const { return m_snapshotNameHasBeenSet; } /** *

A name for the snapshot being created.

*/ inline void SetSnapshotName(const Aws::String& value) { m_snapshotNameHasBeenSet = true; m_snapshotName = value; } /** *

A name for the snapshot being created.

*/ inline void SetSnapshotName(Aws::String&& value) { m_snapshotNameHasBeenSet = true; m_snapshotName = std::move(value); } /** *

A name for the snapshot being created.

*/ inline void SetSnapshotName(const char* value) { m_snapshotNameHasBeenSet = true; m_snapshotName.assign(value); } /** *

A name for the snapshot being created.

*/ inline CreateSnapshotRequest& WithSnapshotName(const Aws::String& value) { SetSnapshotName(value); return *this;} /** *

A name for the snapshot being created.

*/ inline CreateSnapshotRequest& WithSnapshotName(Aws::String&& value) { SetSnapshotName(std::move(value)); return *this;} /** *

A name for the snapshot being created.

*/ inline CreateSnapshotRequest& WithSnapshotName(const char* value) { SetSnapshotName(value); return *this;} /** *

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

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

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

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

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

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

The ID of the KMS key used to encrypt the 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 snapshot.

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

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

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

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

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

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

*/ inline CreateSnapshotRequest& 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 CreateSnapshotRequest& 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 CreateSnapshotRequest& 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 CreateSnapshotRequest& 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 CreateSnapshotRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_replicationGroupId; bool m_replicationGroupIdHasBeenSet = false; Aws::String m_cacheClusterId; bool m_cacheClusterIdHasBeenSet = false; Aws::String m_snapshotName; bool m_snapshotNameHasBeenSet = false; Aws::String m_kmsKeyId; bool m_kmsKeyIdHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace ElastiCache } // namespace Aws