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

The id of the replication group from which you want to remove replica * nodes.

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

The id of the replication group from which you want to remove replica * nodes.

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

The id of the replication group from which you want to remove replica * nodes.

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

The id of the replication group from which you want to remove replica * nodes.

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

The id of the replication group from which you want to remove replica * nodes.

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

The id of the replication group from which you want to remove replica * nodes.

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

The id of the replication group from which you want to remove replica * nodes.

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

The id of the replication group from which you want to remove replica * nodes.

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

The number of read replica nodes you want at the completion of this * operation. For Redis (cluster mode disabled) replication groups, this is the * number of replica nodes in the replication group. For Redis (cluster mode * enabled) replication groups, this is the number of replica nodes in each of the * replication group's node groups.

The minimum number of replicas in a * shard or replication group is:

  • Redis (cluster mode * disabled)

    • If Multi-AZ is enabled: 1

    • If * Multi-AZ is not enabled: 0

  • Redis (cluster mode * enabled): 0 (though you will not be able to failover to a replica if your * primary node fails)

*/ inline int GetNewReplicaCount() const{ return m_newReplicaCount; } /** *

The number of read replica nodes you want at the completion of this * operation. For Redis (cluster mode disabled) replication groups, this is the * number of replica nodes in the replication group. For Redis (cluster mode * enabled) replication groups, this is the number of replica nodes in each of the * replication group's node groups.

The minimum number of replicas in a * shard or replication group is:

  • Redis (cluster mode * disabled)

    • If Multi-AZ is enabled: 1

    • If * Multi-AZ is not enabled: 0

  • Redis (cluster mode * enabled): 0 (though you will not be able to failover to a replica if your * primary node fails)

*/ inline bool NewReplicaCountHasBeenSet() const { return m_newReplicaCountHasBeenSet; } /** *

The number of read replica nodes you want at the completion of this * operation. For Redis (cluster mode disabled) replication groups, this is the * number of replica nodes in the replication group. For Redis (cluster mode * enabled) replication groups, this is the number of replica nodes in each of the * replication group's node groups.

The minimum number of replicas in a * shard or replication group is:

  • Redis (cluster mode * disabled)

    • If Multi-AZ is enabled: 1

    • If * Multi-AZ is not enabled: 0

  • Redis (cluster mode * enabled): 0 (though you will not be able to failover to a replica if your * primary node fails)

*/ inline void SetNewReplicaCount(int value) { m_newReplicaCountHasBeenSet = true; m_newReplicaCount = value; } /** *

The number of read replica nodes you want at the completion of this * operation. For Redis (cluster mode disabled) replication groups, this is the * number of replica nodes in the replication group. For Redis (cluster mode * enabled) replication groups, this is the number of replica nodes in each of the * replication group's node groups.

The minimum number of replicas in a * shard or replication group is:

  • Redis (cluster mode * disabled)

    • If Multi-AZ is enabled: 1

    • If * Multi-AZ is not enabled: 0

  • Redis (cluster mode * enabled): 0 (though you will not be able to failover to a replica if your * primary node fails)

*/ inline DecreaseReplicaCountRequest& WithNewReplicaCount(int value) { SetNewReplicaCount(value); return *this;} /** *

A list of ConfigureShard objects that can be used to configure * each shard in a Redis (cluster mode enabled) replication group. The * ConfigureShard has three members: NewReplicaCount, * NodeGroupId, and PreferredAvailabilityZones.

*/ inline const Aws::Vector& GetReplicaConfiguration() const{ return m_replicaConfiguration; } /** *

A list of ConfigureShard objects that can be used to configure * each shard in a Redis (cluster mode enabled) replication group. The * ConfigureShard has three members: NewReplicaCount, * NodeGroupId, and PreferredAvailabilityZones.

*/ inline bool ReplicaConfigurationHasBeenSet() const { return m_replicaConfigurationHasBeenSet; } /** *

A list of ConfigureShard objects that can be used to configure * each shard in a Redis (cluster mode enabled) replication group. The * ConfigureShard has three members: NewReplicaCount, * NodeGroupId, and PreferredAvailabilityZones.

*/ inline void SetReplicaConfiguration(const Aws::Vector& value) { m_replicaConfigurationHasBeenSet = true; m_replicaConfiguration = value; } /** *

A list of ConfigureShard objects that can be used to configure * each shard in a Redis (cluster mode enabled) replication group. The * ConfigureShard has three members: NewReplicaCount, * NodeGroupId, and PreferredAvailabilityZones.

*/ inline void SetReplicaConfiguration(Aws::Vector&& value) { m_replicaConfigurationHasBeenSet = true; m_replicaConfiguration = std::move(value); } /** *

A list of ConfigureShard objects that can be used to configure * each shard in a Redis (cluster mode enabled) replication group. The * ConfigureShard has three members: NewReplicaCount, * NodeGroupId, and PreferredAvailabilityZones.

*/ inline DecreaseReplicaCountRequest& WithReplicaConfiguration(const Aws::Vector& value) { SetReplicaConfiguration(value); return *this;} /** *

A list of ConfigureShard objects that can be used to configure * each shard in a Redis (cluster mode enabled) replication group. The * ConfigureShard has three members: NewReplicaCount, * NodeGroupId, and PreferredAvailabilityZones.

*/ inline DecreaseReplicaCountRequest& WithReplicaConfiguration(Aws::Vector&& value) { SetReplicaConfiguration(std::move(value)); return *this;} /** *

A list of ConfigureShard objects that can be used to configure * each shard in a Redis (cluster mode enabled) replication group. The * ConfigureShard has three members: NewReplicaCount, * NodeGroupId, and PreferredAvailabilityZones.

*/ inline DecreaseReplicaCountRequest& AddReplicaConfiguration(const ConfigureShard& value) { m_replicaConfigurationHasBeenSet = true; m_replicaConfiguration.push_back(value); return *this; } /** *

A list of ConfigureShard objects that can be used to configure * each shard in a Redis (cluster mode enabled) replication group. The * ConfigureShard has three members: NewReplicaCount, * NodeGroupId, and PreferredAvailabilityZones.

*/ inline DecreaseReplicaCountRequest& AddReplicaConfiguration(ConfigureShard&& value) { m_replicaConfigurationHasBeenSet = true; m_replicaConfiguration.push_back(std::move(value)); return *this; } /** *

A list of the node ids to remove from the replication group or node group * (shard).

*/ inline const Aws::Vector& GetReplicasToRemove() const{ return m_replicasToRemove; } /** *

A list of the node ids to remove from the replication group or node group * (shard).

*/ inline bool ReplicasToRemoveHasBeenSet() const { return m_replicasToRemoveHasBeenSet; } /** *

A list of the node ids to remove from the replication group or node group * (shard).

*/ inline void SetReplicasToRemove(const Aws::Vector& value) { m_replicasToRemoveHasBeenSet = true; m_replicasToRemove = value; } /** *

A list of the node ids to remove from the replication group or node group * (shard).

*/ inline void SetReplicasToRemove(Aws::Vector&& value) { m_replicasToRemoveHasBeenSet = true; m_replicasToRemove = std::move(value); } /** *

A list of the node ids to remove from the replication group or node group * (shard).

*/ inline DecreaseReplicaCountRequest& WithReplicasToRemove(const Aws::Vector& value) { SetReplicasToRemove(value); return *this;} /** *

A list of the node ids to remove from the replication group or node group * (shard).

*/ inline DecreaseReplicaCountRequest& WithReplicasToRemove(Aws::Vector&& value) { SetReplicasToRemove(std::move(value)); return *this;} /** *

A list of the node ids to remove from the replication group or node group * (shard).

*/ inline DecreaseReplicaCountRequest& AddReplicasToRemove(const Aws::String& value) { m_replicasToRemoveHasBeenSet = true; m_replicasToRemove.push_back(value); return *this; } /** *

A list of the node ids to remove from the replication group or node group * (shard).

*/ inline DecreaseReplicaCountRequest& AddReplicasToRemove(Aws::String&& value) { m_replicasToRemoveHasBeenSet = true; m_replicasToRemove.push_back(std::move(value)); return *this; } /** *

A list of the node ids to remove from the replication group or node group * (shard).

*/ inline DecreaseReplicaCountRequest& AddReplicasToRemove(const char* value) { m_replicasToRemoveHasBeenSet = true; m_replicasToRemove.push_back(value); return *this; } /** *

If True, the number of replica nodes is decreased immediately. * ApplyImmediately=False is not currently supported.

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

If True, the number of replica nodes is decreased immediately. * ApplyImmediately=False is not currently supported.

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

If True, the number of replica nodes is decreased immediately. * ApplyImmediately=False is not currently supported.

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

If True, the number of replica nodes is decreased immediately. * ApplyImmediately=False is not currently supported.

*/ inline DecreaseReplicaCountRequest& WithApplyImmediately(bool value) { SetApplyImmediately(value); return *this;} private: Aws::String m_replicationGroupId; bool m_replicationGroupIdHasBeenSet = false; int m_newReplicaCount; bool m_newReplicaCountHasBeenSet = false; Aws::Vector m_replicaConfiguration; bool m_replicaConfigurationHasBeenSet = false; Aws::Vector m_replicasToRemove; bool m_replicasToRemoveHasBeenSet = false; bool m_applyImmediately; bool m_applyImmediatelyHasBeenSet = false; }; } // namespace Model } // namespace ElastiCache } // namespace Aws