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

Consists of a primary cluster that accepts writes and an associated secondary * cluster that resides in a different Amazon region. The secondary cluster accepts * only reads. The primary cluster automatically replicates updates to the * secondary cluster.

  • The GlobalReplicationGroupIdSuffix * represents the name of the Global datastore, which is what you use to associate * a secondary cluster.

See Also:

AWS * API Reference

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

The name of the Global datastore

*/ inline const Aws::String& GetGlobalReplicationGroupId() const{ return m_globalReplicationGroupId; } /** *

The name of the Global datastore

*/ inline bool GlobalReplicationGroupIdHasBeenSet() const { return m_globalReplicationGroupIdHasBeenSet; } /** *

The name of the Global datastore

*/ inline void SetGlobalReplicationGroupId(const Aws::String& value) { m_globalReplicationGroupIdHasBeenSet = true; m_globalReplicationGroupId = value; } /** *

The name of the Global datastore

*/ inline void SetGlobalReplicationGroupId(Aws::String&& value) { m_globalReplicationGroupIdHasBeenSet = true; m_globalReplicationGroupId = std::move(value); } /** *

The name of the Global datastore

*/ inline void SetGlobalReplicationGroupId(const char* value) { m_globalReplicationGroupIdHasBeenSet = true; m_globalReplicationGroupId.assign(value); } /** *

The name of the Global datastore

*/ inline GlobalReplicationGroup& WithGlobalReplicationGroupId(const Aws::String& value) { SetGlobalReplicationGroupId(value); return *this;} /** *

The name of the Global datastore

*/ inline GlobalReplicationGroup& WithGlobalReplicationGroupId(Aws::String&& value) { SetGlobalReplicationGroupId(std::move(value)); return *this;} /** *

The name of the Global datastore

*/ inline GlobalReplicationGroup& WithGlobalReplicationGroupId(const char* value) { SetGlobalReplicationGroupId(value); return *this;} /** *

The optional description of the Global datastore

*/ inline const Aws::String& GetGlobalReplicationGroupDescription() const{ return m_globalReplicationGroupDescription; } /** *

The optional description of the Global datastore

*/ inline bool GlobalReplicationGroupDescriptionHasBeenSet() const { return m_globalReplicationGroupDescriptionHasBeenSet; } /** *

The optional description of the Global datastore

*/ inline void SetGlobalReplicationGroupDescription(const Aws::String& value) { m_globalReplicationGroupDescriptionHasBeenSet = true; m_globalReplicationGroupDescription = value; } /** *

The optional description of the Global datastore

*/ inline void SetGlobalReplicationGroupDescription(Aws::String&& value) { m_globalReplicationGroupDescriptionHasBeenSet = true; m_globalReplicationGroupDescription = std::move(value); } /** *

The optional description of the Global datastore

*/ inline void SetGlobalReplicationGroupDescription(const char* value) { m_globalReplicationGroupDescriptionHasBeenSet = true; m_globalReplicationGroupDescription.assign(value); } /** *

The optional description of the Global datastore

*/ inline GlobalReplicationGroup& WithGlobalReplicationGroupDescription(const Aws::String& value) { SetGlobalReplicationGroupDescription(value); return *this;} /** *

The optional description of the Global datastore

*/ inline GlobalReplicationGroup& WithGlobalReplicationGroupDescription(Aws::String&& value) { SetGlobalReplicationGroupDescription(std::move(value)); return *this;} /** *

The optional description of the Global datastore

*/ inline GlobalReplicationGroup& WithGlobalReplicationGroupDescription(const char* value) { SetGlobalReplicationGroupDescription(value); return *this;} /** *

The status of the Global datastore

*/ inline const Aws::String& GetStatus() const{ return m_status; } /** *

The status of the Global datastore

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The status of the Global datastore

*/ inline void SetStatus(const Aws::String& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The status of the Global datastore

*/ inline void SetStatus(Aws::String&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The status of the Global datastore

*/ inline void SetStatus(const char* value) { m_statusHasBeenSet = true; m_status.assign(value); } /** *

The status of the Global datastore

*/ inline GlobalReplicationGroup& WithStatus(const Aws::String& value) { SetStatus(value); return *this;} /** *

The status of the Global datastore

*/ inline GlobalReplicationGroup& WithStatus(Aws::String&& value) { SetStatus(std::move(value)); return *this;} /** *

The status of the Global datastore

*/ inline GlobalReplicationGroup& WithStatus(const char* value) { SetStatus(value); return *this;} /** *

The cache node type of the Global datastore

*/ inline const Aws::String& GetCacheNodeType() const{ return m_cacheNodeType; } /** *

The cache node type of the Global datastore

*/ inline bool CacheNodeTypeHasBeenSet() const { return m_cacheNodeTypeHasBeenSet; } /** *

The cache node type of the Global datastore

*/ inline void SetCacheNodeType(const Aws::String& value) { m_cacheNodeTypeHasBeenSet = true; m_cacheNodeType = value; } /** *

The cache node type of the Global datastore

*/ inline void SetCacheNodeType(Aws::String&& value) { m_cacheNodeTypeHasBeenSet = true; m_cacheNodeType = std::move(value); } /** *

The cache node type of the Global datastore

*/ inline void SetCacheNodeType(const char* value) { m_cacheNodeTypeHasBeenSet = true; m_cacheNodeType.assign(value); } /** *

The cache node type of the Global datastore

*/ inline GlobalReplicationGroup& WithCacheNodeType(const Aws::String& value) { SetCacheNodeType(value); return *this;} /** *

The cache node type of the Global datastore

*/ inline GlobalReplicationGroup& WithCacheNodeType(Aws::String&& value) { SetCacheNodeType(std::move(value)); return *this;} /** *

The cache node type of the Global datastore

*/ inline GlobalReplicationGroup& WithCacheNodeType(const char* value) { SetCacheNodeType(value); return *this;} /** *

The Elasticache engine. For Redis only.

*/ inline const Aws::String& GetEngine() const{ return m_engine; } /** *

The Elasticache engine. For Redis only.

*/ inline bool EngineHasBeenSet() const { return m_engineHasBeenSet; } /** *

The Elasticache engine. For Redis only.

*/ inline void SetEngine(const Aws::String& value) { m_engineHasBeenSet = true; m_engine = value; } /** *

The Elasticache engine. For Redis only.

*/ inline void SetEngine(Aws::String&& value) { m_engineHasBeenSet = true; m_engine = std::move(value); } /** *

The Elasticache engine. For Redis only.

*/ inline void SetEngine(const char* value) { m_engineHasBeenSet = true; m_engine.assign(value); } /** *

The Elasticache engine. For Redis only.

*/ inline GlobalReplicationGroup& WithEngine(const Aws::String& value) { SetEngine(value); return *this;} /** *

The Elasticache engine. For Redis only.

*/ inline GlobalReplicationGroup& WithEngine(Aws::String&& value) { SetEngine(std::move(value)); return *this;} /** *

The Elasticache engine. For Redis only.

*/ inline GlobalReplicationGroup& WithEngine(const char* value) { SetEngine(value); return *this;} /** *

The Elasticache Redis engine version.

*/ inline const Aws::String& GetEngineVersion() const{ return m_engineVersion; } /** *

The Elasticache Redis engine version.

*/ inline bool EngineVersionHasBeenSet() const { return m_engineVersionHasBeenSet; } /** *

The Elasticache Redis engine version.

*/ inline void SetEngineVersion(const Aws::String& value) { m_engineVersionHasBeenSet = true; m_engineVersion = value; } /** *

The Elasticache Redis engine version.

*/ inline void SetEngineVersion(Aws::String&& value) { m_engineVersionHasBeenSet = true; m_engineVersion = std::move(value); } /** *

The Elasticache Redis engine version.

*/ inline void SetEngineVersion(const char* value) { m_engineVersionHasBeenSet = true; m_engineVersion.assign(value); } /** *

The Elasticache Redis engine version.

*/ inline GlobalReplicationGroup& WithEngineVersion(const Aws::String& value) { SetEngineVersion(value); return *this;} /** *

The Elasticache Redis engine version.

*/ inline GlobalReplicationGroup& WithEngineVersion(Aws::String&& value) { SetEngineVersion(std::move(value)); return *this;} /** *

The Elasticache Redis engine version.

*/ inline GlobalReplicationGroup& WithEngineVersion(const char* value) { SetEngineVersion(value); return *this;} /** *

The replication groups that comprise the Global datastore.

*/ inline const Aws::Vector& GetMembers() const{ return m_members; } /** *

The replication groups that comprise the Global datastore.

*/ inline bool MembersHasBeenSet() const { return m_membersHasBeenSet; } /** *

The replication groups that comprise the Global datastore.

*/ inline void SetMembers(const Aws::Vector& value) { m_membersHasBeenSet = true; m_members = value; } /** *

The replication groups that comprise the Global datastore.

*/ inline void SetMembers(Aws::Vector&& value) { m_membersHasBeenSet = true; m_members = std::move(value); } /** *

The replication groups that comprise the Global datastore.

*/ inline GlobalReplicationGroup& WithMembers(const Aws::Vector& value) { SetMembers(value); return *this;} /** *

The replication groups that comprise the Global datastore.

*/ inline GlobalReplicationGroup& WithMembers(Aws::Vector&& value) { SetMembers(std::move(value)); return *this;} /** *

The replication groups that comprise the Global datastore.

*/ inline GlobalReplicationGroup& AddMembers(const GlobalReplicationGroupMember& value) { m_membersHasBeenSet = true; m_members.push_back(value); return *this; } /** *

The replication groups that comprise the Global datastore.

*/ inline GlobalReplicationGroup& AddMembers(GlobalReplicationGroupMember&& value) { m_membersHasBeenSet = true; m_members.push_back(std::move(value)); return *this; } /** *

A flag that indicates whether the Global datastore is cluster enabled.

*/ inline bool GetClusterEnabled() const{ return m_clusterEnabled; } /** *

A flag that indicates whether the Global datastore is cluster enabled.

*/ inline bool ClusterEnabledHasBeenSet() const { return m_clusterEnabledHasBeenSet; } /** *

A flag that indicates whether the Global datastore is cluster enabled.

*/ inline void SetClusterEnabled(bool value) { m_clusterEnabledHasBeenSet = true; m_clusterEnabled = value; } /** *

A flag that indicates whether the Global datastore is cluster enabled.

*/ inline GlobalReplicationGroup& WithClusterEnabled(bool value) { SetClusterEnabled(value); return *this;} /** *

Indicates the slot configuration and global identifier for each slice * group.

*/ inline const Aws::Vector& GetGlobalNodeGroups() const{ return m_globalNodeGroups; } /** *

Indicates the slot configuration and global identifier for each slice * group.

*/ inline bool GlobalNodeGroupsHasBeenSet() const { return m_globalNodeGroupsHasBeenSet; } /** *

Indicates the slot configuration and global identifier for each slice * group.

*/ inline void SetGlobalNodeGroups(const Aws::Vector& value) { m_globalNodeGroupsHasBeenSet = true; m_globalNodeGroups = value; } /** *

Indicates the slot configuration and global identifier for each slice * group.

*/ inline void SetGlobalNodeGroups(Aws::Vector&& value) { m_globalNodeGroupsHasBeenSet = true; m_globalNodeGroups = std::move(value); } /** *

Indicates the slot configuration and global identifier for each slice * group.

*/ inline GlobalReplicationGroup& WithGlobalNodeGroups(const Aws::Vector& value) { SetGlobalNodeGroups(value); return *this;} /** *

Indicates the slot configuration and global identifier for each slice * group.

*/ inline GlobalReplicationGroup& WithGlobalNodeGroups(Aws::Vector&& value) { SetGlobalNodeGroups(std::move(value)); return *this;} /** *

Indicates the slot configuration and global identifier for each slice * group.

*/ inline GlobalReplicationGroup& AddGlobalNodeGroups(const GlobalNodeGroup& value) { m_globalNodeGroupsHasBeenSet = true; m_globalNodeGroups.push_back(value); return *this; } /** *

Indicates the slot configuration and global identifier for each slice * group.

*/ inline GlobalReplicationGroup& AddGlobalNodeGroups(GlobalNodeGroup&& value) { m_globalNodeGroupsHasBeenSet = true; m_globalNodeGroups.push_back(std::move(value)); return *this; } /** *

A flag that enables using an AuthToken (password) when issuing * Redis commands.

Default: false

*/ inline bool GetAuthTokenEnabled() const{ return m_authTokenEnabled; } /** *

A flag that enables using an AuthToken (password) when issuing * Redis commands.

Default: false

*/ inline bool AuthTokenEnabledHasBeenSet() const { return m_authTokenEnabledHasBeenSet; } /** *

A flag that enables using an AuthToken (password) when issuing * Redis commands.

Default: false

*/ inline void SetAuthTokenEnabled(bool value) { m_authTokenEnabledHasBeenSet = true; m_authTokenEnabled = value; } /** *

A flag that enables using an AuthToken (password) when issuing * Redis commands.

Default: false

*/ inline GlobalReplicationGroup& WithAuthTokenEnabled(bool value) { SetAuthTokenEnabled(value); return *this;} /** *

A flag that enables in-transit encryption when set to true.

* Required: Only available when creating a replication group in an Amazon * VPC using redis version 3.2.6, 4.x or later.

*/ inline bool GetTransitEncryptionEnabled() const{ return m_transitEncryptionEnabled; } /** *

A flag that enables in-transit encryption when set to true.

* Required: Only available when creating a replication group in an Amazon * VPC using redis version 3.2.6, 4.x or later.

*/ inline bool TransitEncryptionEnabledHasBeenSet() const { return m_transitEncryptionEnabledHasBeenSet; } /** *

A flag that enables in-transit encryption when set to true.

* Required: Only available when creating a replication group in an Amazon * VPC using redis version 3.2.6, 4.x or later.

*/ inline void SetTransitEncryptionEnabled(bool value) { m_transitEncryptionEnabledHasBeenSet = true; m_transitEncryptionEnabled = value; } /** *

A flag that enables in-transit encryption when set to true.

* Required: Only available when creating a replication group in an Amazon * VPC using redis version 3.2.6, 4.x or later.

*/ inline GlobalReplicationGroup& WithTransitEncryptionEnabled(bool value) { SetTransitEncryptionEnabled(value); return *this;} /** *

A flag that enables encryption at rest when set to true.

*

You cannot modify the value of AtRestEncryptionEnabled after the * replication group is created. To enable encryption at rest on a replication * group you must set AtRestEncryptionEnabled to true * when you create the replication group.

Required: Only available * when creating a replication group in an Amazon VPC using redis version * 3.2.6, 4.x or later.

*/ inline bool GetAtRestEncryptionEnabled() const{ return m_atRestEncryptionEnabled; } /** *

A flag that enables encryption at rest when set to true.

*

You cannot modify the value of AtRestEncryptionEnabled after the * replication group is created. To enable encryption at rest on a replication * group you must set AtRestEncryptionEnabled to true * when you create the replication group.

Required: Only available * when creating a replication group in an Amazon VPC using redis version * 3.2.6, 4.x or later.

*/ inline bool AtRestEncryptionEnabledHasBeenSet() const { return m_atRestEncryptionEnabledHasBeenSet; } /** *

A flag that enables encryption at rest when set to true.

*

You cannot modify the value of AtRestEncryptionEnabled after the * replication group is created. To enable encryption at rest on a replication * group you must set AtRestEncryptionEnabled to true * when you create the replication group.

Required: Only available * when creating a replication group in an Amazon VPC using redis version * 3.2.6, 4.x or later.

*/ inline void SetAtRestEncryptionEnabled(bool value) { m_atRestEncryptionEnabledHasBeenSet = true; m_atRestEncryptionEnabled = value; } /** *

A flag that enables encryption at rest when set to true.

*

You cannot modify the value of AtRestEncryptionEnabled after the * replication group is created. To enable encryption at rest on a replication * group you must set AtRestEncryptionEnabled to true * when you create the replication group.

Required: Only available * when creating a replication group in an Amazon VPC using redis version * 3.2.6, 4.x or later.

*/ inline GlobalReplicationGroup& WithAtRestEncryptionEnabled(bool value) { SetAtRestEncryptionEnabled(value); return *this;} /** *

The ARN (Amazon Resource Name) of the global replication group.

*/ inline const Aws::String& GetARN() const{ return m_aRN; } /** *

The ARN (Amazon Resource Name) of the global replication group.

*/ inline bool ARNHasBeenSet() const { return m_aRNHasBeenSet; } /** *

The ARN (Amazon Resource Name) of the global replication group.

*/ inline void SetARN(const Aws::String& value) { m_aRNHasBeenSet = true; m_aRN = value; } /** *

The ARN (Amazon Resource Name) of the global replication group.

*/ inline void SetARN(Aws::String&& value) { m_aRNHasBeenSet = true; m_aRN = std::move(value); } /** *

The ARN (Amazon Resource Name) of the global replication group.

*/ inline void SetARN(const char* value) { m_aRNHasBeenSet = true; m_aRN.assign(value); } /** *

The ARN (Amazon Resource Name) of the global replication group.

*/ inline GlobalReplicationGroup& WithARN(const Aws::String& value) { SetARN(value); return *this;} /** *

The ARN (Amazon Resource Name) of the global replication group.

*/ inline GlobalReplicationGroup& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;} /** *

The ARN (Amazon Resource Name) of the global replication group.

*/ inline GlobalReplicationGroup& WithARN(const char* value) { SetARN(value); return *this;} private: Aws::String m_globalReplicationGroupId; bool m_globalReplicationGroupIdHasBeenSet = false; Aws::String m_globalReplicationGroupDescription; bool m_globalReplicationGroupDescriptionHasBeenSet = false; Aws::String m_status; bool m_statusHasBeenSet = false; Aws::String m_cacheNodeType; bool m_cacheNodeTypeHasBeenSet = false; Aws::String m_engine; bool m_engineHasBeenSet = false; Aws::String m_engineVersion; bool m_engineVersionHasBeenSet = false; Aws::Vector m_members; bool m_membersHasBeenSet = false; bool m_clusterEnabled; bool m_clusterEnabledHasBeenSet = false; Aws::Vector m_globalNodeGroups; bool m_globalNodeGroupsHasBeenSet = false; bool m_authTokenEnabled; bool m_authTokenEnabledHasBeenSet = false; bool m_transitEncryptionEnabled; bool m_transitEncryptionEnabledHasBeenSet = false; bool m_atRestEncryptionEnabled; bool m_atRestEncryptionEnabledHasBeenSet = false; Aws::String m_aRN; bool m_aRNHasBeenSet = false; }; } // namespace Model } // namespace ElastiCache } // namespace Aws