/** * 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 for a * ModifyReplicationGroupShardConfiguration operation.

See * Also:

AWS * API Reference

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

The name of the Redis (cluster mode enabled) cluster (replication group) on * which the shards are to be configured.

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

The name of the Redis (cluster mode enabled) cluster (replication group) on * which the shards are to be configured.

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

The name of the Redis (cluster mode enabled) cluster (replication group) on * which the shards are to be configured.

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

The name of the Redis (cluster mode enabled) cluster (replication group) on * which the shards are to be configured.

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

The name of the Redis (cluster mode enabled) cluster (replication group) on * which the shards are to be configured.

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

The name of the Redis (cluster mode enabled) cluster (replication group) on * which the shards are to be configured.

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

The name of the Redis (cluster mode enabled) cluster (replication group) on * which the shards are to be configured.

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

The name of the Redis (cluster mode enabled) cluster (replication group) on * which the shards are to be configured.

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

The number of node groups (shards) that results from the modification of the * shard configuration.

*/ inline int GetNodeGroupCount() const{ return m_nodeGroupCount; } /** *

The number of node groups (shards) that results from the modification of the * shard configuration.

*/ inline bool NodeGroupCountHasBeenSet() const { return m_nodeGroupCountHasBeenSet; } /** *

The number of node groups (shards) that results from the modification of the * shard configuration.

*/ inline void SetNodeGroupCount(int value) { m_nodeGroupCountHasBeenSet = true; m_nodeGroupCount = value; } /** *

The number of node groups (shards) that results from the modification of the * shard configuration.

*/ inline ModifyReplicationGroupShardConfigurationRequest& WithNodeGroupCount(int value) { SetNodeGroupCount(value); return *this;} /** *

Indicates that the shard reconfiguration process begins immediately. At * present, the only permitted value for this parameter is true.

*

Value: true

*/ inline bool GetApplyImmediately() const{ return m_applyImmediately; } /** *

Indicates that the shard reconfiguration process begins immediately. At * present, the only permitted value for this parameter is true.

*

Value: true

*/ inline bool ApplyImmediatelyHasBeenSet() const { return m_applyImmediatelyHasBeenSet; } /** *

Indicates that the shard reconfiguration process begins immediately. At * present, the only permitted value for this parameter is true.

*

Value: true

*/ inline void SetApplyImmediately(bool value) { m_applyImmediatelyHasBeenSet = true; m_applyImmediately = value; } /** *

Indicates that the shard reconfiguration process begins immediately. At * present, the only permitted value for this parameter is true.

*

Value: true

*/ inline ModifyReplicationGroupShardConfigurationRequest& WithApplyImmediately(bool value) { SetApplyImmediately(value); return *this;} /** *

Specifies the preferred availability zones for each node group in the * cluster. If the value of NodeGroupCount is greater than the current * number of node groups (shards), you can use this parameter to specify the * preferred availability zones of the cluster's shards. If you omit this parameter * ElastiCache selects availability zones for you.

You can specify this * parameter only if the value of NodeGroupCount is greater than the * current number of node groups (shards).

*/ inline const Aws::Vector& GetReshardingConfiguration() const{ return m_reshardingConfiguration; } /** *

Specifies the preferred availability zones for each node group in the * cluster. If the value of NodeGroupCount is greater than the current * number of node groups (shards), you can use this parameter to specify the * preferred availability zones of the cluster's shards. If you omit this parameter * ElastiCache selects availability zones for you.

You can specify this * parameter only if the value of NodeGroupCount is greater than the * current number of node groups (shards).

*/ inline bool ReshardingConfigurationHasBeenSet() const { return m_reshardingConfigurationHasBeenSet; } /** *

Specifies the preferred availability zones for each node group in the * cluster. If the value of NodeGroupCount is greater than the current * number of node groups (shards), you can use this parameter to specify the * preferred availability zones of the cluster's shards. If you omit this parameter * ElastiCache selects availability zones for you.

You can specify this * parameter only if the value of NodeGroupCount is greater than the * current number of node groups (shards).

*/ inline void SetReshardingConfiguration(const Aws::Vector& value) { m_reshardingConfigurationHasBeenSet = true; m_reshardingConfiguration = value; } /** *

Specifies the preferred availability zones for each node group in the * cluster. If the value of NodeGroupCount is greater than the current * number of node groups (shards), you can use this parameter to specify the * preferred availability zones of the cluster's shards. If you omit this parameter * ElastiCache selects availability zones for you.

You can specify this * parameter only if the value of NodeGroupCount is greater than the * current number of node groups (shards).

*/ inline void SetReshardingConfiguration(Aws::Vector&& value) { m_reshardingConfigurationHasBeenSet = true; m_reshardingConfiguration = std::move(value); } /** *

Specifies the preferred availability zones for each node group in the * cluster. If the value of NodeGroupCount is greater than the current * number of node groups (shards), you can use this parameter to specify the * preferred availability zones of the cluster's shards. If you omit this parameter * ElastiCache selects availability zones for you.

You can specify this * parameter only if the value of NodeGroupCount is greater than the * current number of node groups (shards).

*/ inline ModifyReplicationGroupShardConfigurationRequest& WithReshardingConfiguration(const Aws::Vector& value) { SetReshardingConfiguration(value); return *this;} /** *

Specifies the preferred availability zones for each node group in the * cluster. If the value of NodeGroupCount is greater than the current * number of node groups (shards), you can use this parameter to specify the * preferred availability zones of the cluster's shards. If you omit this parameter * ElastiCache selects availability zones for you.

You can specify this * parameter only if the value of NodeGroupCount is greater than the * current number of node groups (shards).

*/ inline ModifyReplicationGroupShardConfigurationRequest& WithReshardingConfiguration(Aws::Vector&& value) { SetReshardingConfiguration(std::move(value)); return *this;} /** *

Specifies the preferred availability zones for each node group in the * cluster. If the value of NodeGroupCount is greater than the current * number of node groups (shards), you can use this parameter to specify the * preferred availability zones of the cluster's shards. If you omit this parameter * ElastiCache selects availability zones for you.

You can specify this * parameter only if the value of NodeGroupCount is greater than the * current number of node groups (shards).

*/ inline ModifyReplicationGroupShardConfigurationRequest& AddReshardingConfiguration(const ReshardingConfiguration& value) { m_reshardingConfigurationHasBeenSet = true; m_reshardingConfiguration.push_back(value); return *this; } /** *

Specifies the preferred availability zones for each node group in the * cluster. If the value of NodeGroupCount is greater than the current * number of node groups (shards), you can use this parameter to specify the * preferred availability zones of the cluster's shards. If you omit this parameter * ElastiCache selects availability zones for you.

You can specify this * parameter only if the value of NodeGroupCount is greater than the * current number of node groups (shards).

*/ inline ModifyReplicationGroupShardConfigurationRequest& AddReshardingConfiguration(ReshardingConfiguration&& value) { m_reshardingConfigurationHasBeenSet = true; m_reshardingConfiguration.push_back(std::move(value)); return *this; } /** *

If the value of NodeGroupCount is less than the current number * of node groups (shards), then either NodeGroupsToRemove or * NodeGroupsToRetain is required. NodeGroupsToRemove is * a list of NodeGroupIds to remove from the cluster.

*

ElastiCache for Redis will attempt to remove all node groups listed by * NodeGroupsToRemove from the cluster.

*/ inline const Aws::Vector& GetNodeGroupsToRemove() const{ return m_nodeGroupsToRemove; } /** *

If the value of NodeGroupCount is less than the current number * of node groups (shards), then either NodeGroupsToRemove or * NodeGroupsToRetain is required. NodeGroupsToRemove is * a list of NodeGroupIds to remove from the cluster.

*

ElastiCache for Redis will attempt to remove all node groups listed by * NodeGroupsToRemove from the cluster.

*/ inline bool NodeGroupsToRemoveHasBeenSet() const { return m_nodeGroupsToRemoveHasBeenSet; } /** *

If the value of NodeGroupCount is less than the current number * of node groups (shards), then either NodeGroupsToRemove or * NodeGroupsToRetain is required. NodeGroupsToRemove is * a list of NodeGroupIds to remove from the cluster.

*

ElastiCache for Redis will attempt to remove all node groups listed by * NodeGroupsToRemove from the cluster.

*/ inline void SetNodeGroupsToRemove(const Aws::Vector& value) { m_nodeGroupsToRemoveHasBeenSet = true; m_nodeGroupsToRemove = value; } /** *

If the value of NodeGroupCount is less than the current number * of node groups (shards), then either NodeGroupsToRemove or * NodeGroupsToRetain is required. NodeGroupsToRemove is * a list of NodeGroupIds to remove from the cluster.

*

ElastiCache for Redis will attempt to remove all node groups listed by * NodeGroupsToRemove from the cluster.

*/ inline void SetNodeGroupsToRemove(Aws::Vector&& value) { m_nodeGroupsToRemoveHasBeenSet = true; m_nodeGroupsToRemove = std::move(value); } /** *

If the value of NodeGroupCount is less than the current number * of node groups (shards), then either NodeGroupsToRemove or * NodeGroupsToRetain is required. NodeGroupsToRemove is * a list of NodeGroupIds to remove from the cluster.

*

ElastiCache for Redis will attempt to remove all node groups listed by * NodeGroupsToRemove from the cluster.

*/ inline ModifyReplicationGroupShardConfigurationRequest& WithNodeGroupsToRemove(const Aws::Vector& value) { SetNodeGroupsToRemove(value); return *this;} /** *

If the value of NodeGroupCount is less than the current number * of node groups (shards), then either NodeGroupsToRemove or * NodeGroupsToRetain is required. NodeGroupsToRemove is * a list of NodeGroupIds to remove from the cluster.

*

ElastiCache for Redis will attempt to remove all node groups listed by * NodeGroupsToRemove from the cluster.

*/ inline ModifyReplicationGroupShardConfigurationRequest& WithNodeGroupsToRemove(Aws::Vector&& value) { SetNodeGroupsToRemove(std::move(value)); return *this;} /** *

If the value of NodeGroupCount is less than the current number * of node groups (shards), then either NodeGroupsToRemove or * NodeGroupsToRetain is required. NodeGroupsToRemove is * a list of NodeGroupIds to remove from the cluster.

*

ElastiCache for Redis will attempt to remove all node groups listed by * NodeGroupsToRemove from the cluster.

*/ inline ModifyReplicationGroupShardConfigurationRequest& AddNodeGroupsToRemove(const Aws::String& value) { m_nodeGroupsToRemoveHasBeenSet = true; m_nodeGroupsToRemove.push_back(value); return *this; } /** *

If the value of NodeGroupCount is less than the current number * of node groups (shards), then either NodeGroupsToRemove or * NodeGroupsToRetain is required. NodeGroupsToRemove is * a list of NodeGroupIds to remove from the cluster.

*

ElastiCache for Redis will attempt to remove all node groups listed by * NodeGroupsToRemove from the cluster.

*/ inline ModifyReplicationGroupShardConfigurationRequest& AddNodeGroupsToRemove(Aws::String&& value) { m_nodeGroupsToRemoveHasBeenSet = true; m_nodeGroupsToRemove.push_back(std::move(value)); return *this; } /** *

If the value of NodeGroupCount is less than the current number * of node groups (shards), then either NodeGroupsToRemove or * NodeGroupsToRetain is required. NodeGroupsToRemove is * a list of NodeGroupIds to remove from the cluster.

*

ElastiCache for Redis will attempt to remove all node groups listed by * NodeGroupsToRemove from the cluster.

*/ inline ModifyReplicationGroupShardConfigurationRequest& AddNodeGroupsToRemove(const char* value) { m_nodeGroupsToRemoveHasBeenSet = true; m_nodeGroupsToRemove.push_back(value); return *this; } /** *

If the value of NodeGroupCount is less than the current number * of node groups (shards), then either NodeGroupsToRemove or * NodeGroupsToRetain is required. NodeGroupsToRetain is * a list of NodeGroupIds to retain in the cluster.

ElastiCache * for Redis will attempt to remove all node groups except those listed by * NodeGroupsToRetain from the cluster.

*/ inline const Aws::Vector& GetNodeGroupsToRetain() const{ return m_nodeGroupsToRetain; } /** *

If the value of NodeGroupCount is less than the current number * of node groups (shards), then either NodeGroupsToRemove or * NodeGroupsToRetain is required. NodeGroupsToRetain is * a list of NodeGroupIds to retain in the cluster.

ElastiCache * for Redis will attempt to remove all node groups except those listed by * NodeGroupsToRetain from the cluster.

*/ inline bool NodeGroupsToRetainHasBeenSet() const { return m_nodeGroupsToRetainHasBeenSet; } /** *

If the value of NodeGroupCount is less than the current number * of node groups (shards), then either NodeGroupsToRemove or * NodeGroupsToRetain is required. NodeGroupsToRetain is * a list of NodeGroupIds to retain in the cluster.

ElastiCache * for Redis will attempt to remove all node groups except those listed by * NodeGroupsToRetain from the cluster.

*/ inline void SetNodeGroupsToRetain(const Aws::Vector& value) { m_nodeGroupsToRetainHasBeenSet = true; m_nodeGroupsToRetain = value; } /** *

If the value of NodeGroupCount is less than the current number * of node groups (shards), then either NodeGroupsToRemove or * NodeGroupsToRetain is required. NodeGroupsToRetain is * a list of NodeGroupIds to retain in the cluster.

ElastiCache * for Redis will attempt to remove all node groups except those listed by * NodeGroupsToRetain from the cluster.

*/ inline void SetNodeGroupsToRetain(Aws::Vector&& value) { m_nodeGroupsToRetainHasBeenSet = true; m_nodeGroupsToRetain = std::move(value); } /** *

If the value of NodeGroupCount is less than the current number * of node groups (shards), then either NodeGroupsToRemove or * NodeGroupsToRetain is required. NodeGroupsToRetain is * a list of NodeGroupIds to retain in the cluster.

ElastiCache * for Redis will attempt to remove all node groups except those listed by * NodeGroupsToRetain from the cluster.

*/ inline ModifyReplicationGroupShardConfigurationRequest& WithNodeGroupsToRetain(const Aws::Vector& value) { SetNodeGroupsToRetain(value); return *this;} /** *

If the value of NodeGroupCount is less than the current number * of node groups (shards), then either NodeGroupsToRemove or * NodeGroupsToRetain is required. NodeGroupsToRetain is * a list of NodeGroupIds to retain in the cluster.

ElastiCache * for Redis will attempt to remove all node groups except those listed by * NodeGroupsToRetain from the cluster.

*/ inline ModifyReplicationGroupShardConfigurationRequest& WithNodeGroupsToRetain(Aws::Vector&& value) { SetNodeGroupsToRetain(std::move(value)); return *this;} /** *

If the value of NodeGroupCount is less than the current number * of node groups (shards), then either NodeGroupsToRemove or * NodeGroupsToRetain is required. NodeGroupsToRetain is * a list of NodeGroupIds to retain in the cluster.

ElastiCache * for Redis will attempt to remove all node groups except those listed by * NodeGroupsToRetain from the cluster.

*/ inline ModifyReplicationGroupShardConfigurationRequest& AddNodeGroupsToRetain(const Aws::String& value) { m_nodeGroupsToRetainHasBeenSet = true; m_nodeGroupsToRetain.push_back(value); return *this; } /** *

If the value of NodeGroupCount is less than the current number * of node groups (shards), then either NodeGroupsToRemove or * NodeGroupsToRetain is required. NodeGroupsToRetain is * a list of NodeGroupIds to retain in the cluster.

ElastiCache * for Redis will attempt to remove all node groups except those listed by * NodeGroupsToRetain from the cluster.

*/ inline ModifyReplicationGroupShardConfigurationRequest& AddNodeGroupsToRetain(Aws::String&& value) { m_nodeGroupsToRetainHasBeenSet = true; m_nodeGroupsToRetain.push_back(std::move(value)); return *this; } /** *

If the value of NodeGroupCount is less than the current number * of node groups (shards), then either NodeGroupsToRemove or * NodeGroupsToRetain is required. NodeGroupsToRetain is * a list of NodeGroupIds to retain in the cluster.

ElastiCache * for Redis will attempt to remove all node groups except those listed by * NodeGroupsToRetain from the cluster.

*/ inline ModifyReplicationGroupShardConfigurationRequest& AddNodeGroupsToRetain(const char* value) { m_nodeGroupsToRetainHasBeenSet = true; m_nodeGroupsToRetain.push_back(value); return *this; } private: Aws::String m_replicationGroupId; bool m_replicationGroupIdHasBeenSet = false; int m_nodeGroupCount; bool m_nodeGroupCountHasBeenSet = false; bool m_applyImmediately; bool m_applyImmediatelyHasBeenSet = false; Aws::Vector m_reshardingConfiguration; bool m_reshardingConfigurationHasBeenSet = false; Aws::Vector m_nodeGroupsToRemove; bool m_nodeGroupsToRemoveHasBeenSet = false; Aws::Vector m_nodeGroupsToRetain; bool m_nodeGroupsToRetainHasBeenSet = false; }; } // namespace Model } // namespace ElastiCache } // namespace Aws