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

Node group (shard) configuration options. Each node group (shard) * configuration has the following: Slots, * PrimaryAvailabilityZone, ReplicaAvailabilityZones, * ReplicaCount.

See Also:

AWS * API Reference

*/ class AWS_ELASTICACHE_API NodeGroupConfiguration { public: NodeGroupConfiguration(); NodeGroupConfiguration(const Aws::Utils::Xml::XmlNode& xmlNode); NodeGroupConfiguration& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

Either the ElastiCache for Redis supplied 4-digit id or a user supplied id * for the node group these configuration values apply to.

*/ inline const Aws::String& GetNodeGroupId() const{ return m_nodeGroupId; } /** *

Either the ElastiCache for Redis supplied 4-digit id or a user supplied id * for the node group these configuration values apply to.

*/ inline bool NodeGroupIdHasBeenSet() const { return m_nodeGroupIdHasBeenSet; } /** *

Either the ElastiCache for Redis supplied 4-digit id or a user supplied id * for the node group these configuration values apply to.

*/ inline void SetNodeGroupId(const Aws::String& value) { m_nodeGroupIdHasBeenSet = true; m_nodeGroupId = value; } /** *

Either the ElastiCache for Redis supplied 4-digit id or a user supplied id * for the node group these configuration values apply to.

*/ inline void SetNodeGroupId(Aws::String&& value) { m_nodeGroupIdHasBeenSet = true; m_nodeGroupId = std::move(value); } /** *

Either the ElastiCache for Redis supplied 4-digit id or a user supplied id * for the node group these configuration values apply to.

*/ inline void SetNodeGroupId(const char* value) { m_nodeGroupIdHasBeenSet = true; m_nodeGroupId.assign(value); } /** *

Either the ElastiCache for Redis supplied 4-digit id or a user supplied id * for the node group these configuration values apply to.

*/ inline NodeGroupConfiguration& WithNodeGroupId(const Aws::String& value) { SetNodeGroupId(value); return *this;} /** *

Either the ElastiCache for Redis supplied 4-digit id or a user supplied id * for the node group these configuration values apply to.

*/ inline NodeGroupConfiguration& WithNodeGroupId(Aws::String&& value) { SetNodeGroupId(std::move(value)); return *this;} /** *

Either the ElastiCache for Redis supplied 4-digit id or a user supplied id * for the node group these configuration values apply to.

*/ inline NodeGroupConfiguration& WithNodeGroupId(const char* value) { SetNodeGroupId(value); return *this;} /** *

A string that specifies the keyspace for a particular node group. Keyspaces * range from 0 to 16,383. The string is in the format * startkey-endkey.

Example: "0-3999"

*/ inline const Aws::String& GetSlots() const{ return m_slots; } /** *

A string that specifies the keyspace for a particular node group. Keyspaces * range from 0 to 16,383. The string is in the format * startkey-endkey.

Example: "0-3999"

*/ inline bool SlotsHasBeenSet() const { return m_slotsHasBeenSet; } /** *

A string that specifies the keyspace for a particular node group. Keyspaces * range from 0 to 16,383. The string is in the format * startkey-endkey.

Example: "0-3999"

*/ inline void SetSlots(const Aws::String& value) { m_slotsHasBeenSet = true; m_slots = value; } /** *

A string that specifies the keyspace for a particular node group. Keyspaces * range from 0 to 16,383. The string is in the format * startkey-endkey.

Example: "0-3999"

*/ inline void SetSlots(Aws::String&& value) { m_slotsHasBeenSet = true; m_slots = std::move(value); } /** *

A string that specifies the keyspace for a particular node group. Keyspaces * range from 0 to 16,383. The string is in the format * startkey-endkey.

Example: "0-3999"

*/ inline void SetSlots(const char* value) { m_slotsHasBeenSet = true; m_slots.assign(value); } /** *

A string that specifies the keyspace for a particular node group. Keyspaces * range from 0 to 16,383. The string is in the format * startkey-endkey.

Example: "0-3999"

*/ inline NodeGroupConfiguration& WithSlots(const Aws::String& value) { SetSlots(value); return *this;} /** *

A string that specifies the keyspace for a particular node group. Keyspaces * range from 0 to 16,383. The string is in the format * startkey-endkey.

Example: "0-3999"

*/ inline NodeGroupConfiguration& WithSlots(Aws::String&& value) { SetSlots(std::move(value)); return *this;} /** *

A string that specifies the keyspace for a particular node group. Keyspaces * range from 0 to 16,383. The string is in the format * startkey-endkey.

Example: "0-3999"

*/ inline NodeGroupConfiguration& WithSlots(const char* value) { SetSlots(value); return *this;} /** *

The number of read replica nodes in this node group (shard).

*/ inline int GetReplicaCount() const{ return m_replicaCount; } /** *

The number of read replica nodes in this node group (shard).

*/ inline bool ReplicaCountHasBeenSet() const { return m_replicaCountHasBeenSet; } /** *

The number of read replica nodes in this node group (shard).

*/ inline void SetReplicaCount(int value) { m_replicaCountHasBeenSet = true; m_replicaCount = value; } /** *

The number of read replica nodes in this node group (shard).

*/ inline NodeGroupConfiguration& WithReplicaCount(int value) { SetReplicaCount(value); return *this;} /** *

The Availability Zone where the primary node of this node group (shard) is * launched.

*/ inline const Aws::String& GetPrimaryAvailabilityZone() const{ return m_primaryAvailabilityZone; } /** *

The Availability Zone where the primary node of this node group (shard) is * launched.

*/ inline bool PrimaryAvailabilityZoneHasBeenSet() const { return m_primaryAvailabilityZoneHasBeenSet; } /** *

The Availability Zone where the primary node of this node group (shard) is * launched.

*/ inline void SetPrimaryAvailabilityZone(const Aws::String& value) { m_primaryAvailabilityZoneHasBeenSet = true; m_primaryAvailabilityZone = value; } /** *

The Availability Zone where the primary node of this node group (shard) is * launched.

*/ inline void SetPrimaryAvailabilityZone(Aws::String&& value) { m_primaryAvailabilityZoneHasBeenSet = true; m_primaryAvailabilityZone = std::move(value); } /** *

The Availability Zone where the primary node of this node group (shard) is * launched.

*/ inline void SetPrimaryAvailabilityZone(const char* value) { m_primaryAvailabilityZoneHasBeenSet = true; m_primaryAvailabilityZone.assign(value); } /** *

The Availability Zone where the primary node of this node group (shard) is * launched.

*/ inline NodeGroupConfiguration& WithPrimaryAvailabilityZone(const Aws::String& value) { SetPrimaryAvailabilityZone(value); return *this;} /** *

The Availability Zone where the primary node of this node group (shard) is * launched.

*/ inline NodeGroupConfiguration& WithPrimaryAvailabilityZone(Aws::String&& value) { SetPrimaryAvailabilityZone(std::move(value)); return *this;} /** *

The Availability Zone where the primary node of this node group (shard) is * launched.

*/ inline NodeGroupConfiguration& WithPrimaryAvailabilityZone(const char* value) { SetPrimaryAvailabilityZone(value); return *this;} /** *

A list of Availability Zones to be used for the read replicas. The number of * Availability Zones in this list must match the value of * ReplicaCount or ReplicasPerNodeGroup if not * specified.

*/ inline const Aws::Vector& GetReplicaAvailabilityZones() const{ return m_replicaAvailabilityZones; } /** *

A list of Availability Zones to be used for the read replicas. The number of * Availability Zones in this list must match the value of * ReplicaCount or ReplicasPerNodeGroup if not * specified.

*/ inline bool ReplicaAvailabilityZonesHasBeenSet() const { return m_replicaAvailabilityZonesHasBeenSet; } /** *

A list of Availability Zones to be used for the read replicas. The number of * Availability Zones in this list must match the value of * ReplicaCount or ReplicasPerNodeGroup if not * specified.

*/ inline void SetReplicaAvailabilityZones(const Aws::Vector& value) { m_replicaAvailabilityZonesHasBeenSet = true; m_replicaAvailabilityZones = value; } /** *

A list of Availability Zones to be used for the read replicas. The number of * Availability Zones in this list must match the value of * ReplicaCount or ReplicasPerNodeGroup if not * specified.

*/ inline void SetReplicaAvailabilityZones(Aws::Vector&& value) { m_replicaAvailabilityZonesHasBeenSet = true; m_replicaAvailabilityZones = std::move(value); } /** *

A list of Availability Zones to be used for the read replicas. The number of * Availability Zones in this list must match the value of * ReplicaCount or ReplicasPerNodeGroup if not * specified.

*/ inline NodeGroupConfiguration& WithReplicaAvailabilityZones(const Aws::Vector& value) { SetReplicaAvailabilityZones(value); return *this;} /** *

A list of Availability Zones to be used for the read replicas. The number of * Availability Zones in this list must match the value of * ReplicaCount or ReplicasPerNodeGroup if not * specified.

*/ inline NodeGroupConfiguration& WithReplicaAvailabilityZones(Aws::Vector&& value) { SetReplicaAvailabilityZones(std::move(value)); return *this;} /** *

A list of Availability Zones to be used for the read replicas. The number of * Availability Zones in this list must match the value of * ReplicaCount or ReplicasPerNodeGroup if not * specified.

*/ inline NodeGroupConfiguration& AddReplicaAvailabilityZones(const Aws::String& value) { m_replicaAvailabilityZonesHasBeenSet = true; m_replicaAvailabilityZones.push_back(value); return *this; } /** *

A list of Availability Zones to be used for the read replicas. The number of * Availability Zones in this list must match the value of * ReplicaCount or ReplicasPerNodeGroup if not * specified.

*/ inline NodeGroupConfiguration& AddReplicaAvailabilityZones(Aws::String&& value) { m_replicaAvailabilityZonesHasBeenSet = true; m_replicaAvailabilityZones.push_back(std::move(value)); return *this; } /** *

A list of Availability Zones to be used for the read replicas. The number of * Availability Zones in this list must match the value of * ReplicaCount or ReplicasPerNodeGroup if not * specified.

*/ inline NodeGroupConfiguration& AddReplicaAvailabilityZones(const char* value) { m_replicaAvailabilityZonesHasBeenSet = true; m_replicaAvailabilityZones.push_back(value); return *this; } private: Aws::String m_nodeGroupId; bool m_nodeGroupIdHasBeenSet; Aws::String m_slots; bool m_slotsHasBeenSet; int m_replicaCount; bool m_replicaCountHasBeenSet; Aws::String m_primaryAvailabilityZone; bool m_primaryAvailabilityZoneHasBeenSet; Aws::Vector m_replicaAvailabilityZones; bool m_replicaAvailabilityZonesHasBeenSet; }; } // namespace Model } // namespace ElastiCache } // namespace Aws