- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ModifyGlobalReplicationGroupCommand
Modifies the settings for a Global datastore.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ElastiCacheClient, ModifyGlobalReplicationGroupCommand } from "@aws-sdk/client-elasticache"; // ES Modules import
// const { ElastiCacheClient, ModifyGlobalReplicationGroupCommand } = require("@aws-sdk/client-elasticache"); // CommonJS import
const client = new ElastiCacheClient(config);
const input = { // ModifyGlobalReplicationGroupMessage
GlobalReplicationGroupId: "STRING_VALUE", // required
ApplyImmediately: true || false, // required
CacheNodeType: "STRING_VALUE",
Engine: "STRING_VALUE",
EngineVersion: "STRING_VALUE",
CacheParameterGroupName: "STRING_VALUE",
GlobalReplicationGroupDescription: "STRING_VALUE",
AutomaticFailoverEnabled: true || false,
};
const command = new ModifyGlobalReplicationGroupCommand(input);
const response = await client.send(command);
// { // ModifyGlobalReplicationGroupResult
// GlobalReplicationGroup: { // GlobalReplicationGroup
// GlobalReplicationGroupId: "STRING_VALUE",
// GlobalReplicationGroupDescription: "STRING_VALUE",
// Status: "STRING_VALUE",
// CacheNodeType: "STRING_VALUE",
// Engine: "STRING_VALUE",
// EngineVersion: "STRING_VALUE",
// Members: [ // GlobalReplicationGroupMemberList
// { // GlobalReplicationGroupMember
// ReplicationGroupId: "STRING_VALUE",
// ReplicationGroupRegion: "STRING_VALUE",
// Role: "STRING_VALUE",
// AutomaticFailover: "enabled" || "disabled" || "enabling" || "disabling",
// Status: "STRING_VALUE",
// },
// ],
// ClusterEnabled: true || false,
// GlobalNodeGroups: [ // GlobalNodeGroupList
// { // GlobalNodeGroup
// GlobalNodeGroupId: "STRING_VALUE",
// Slots: "STRING_VALUE",
// },
// ],
// AuthTokenEnabled: true || false,
// TransitEncryptionEnabled: true || false,
// AtRestEncryptionEnabled: true || false,
// ARN: "STRING_VALUE",
// },
// };
ModifyGlobalReplicationGroupCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ApplyImmediately Required | boolean | undefined | This parameter causes the modifications in this request and any pending modifications to be applied, asynchronously and as soon as possible. Modifications to Global Replication Groups cannot be requested to be applied in PreferredMaintenceWindow. |
GlobalReplicationGroupId Required | string | undefined | The name of the Global datastore |
AutomaticFailoverEnabled | boolean | undefined | Determines whether a read replica is automatically promoted to read/write primary if the existing primary encounters a failure. |
CacheNodeType | string | undefined | A valid cache node type that you want to scale this Global datastore to. |
CacheParameterGroupName | string | undefined | The name of the cache parameter group to use with the Global datastore. It must be compatible with the major engine version used by the Global datastore. |
Engine | string | undefined | Modifies the engine listed in a global replication group message. The options are redis, memcached or valkey. |
EngineVersion | string | undefined | The upgraded version of the cache engine to be run on the clusters in the Global datastore. |
GlobalReplicationGroupDescription | string | undefined | A description of the Global datastore |
ModifyGlobalReplicationGroupCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
GlobalReplicationGroup | GlobalReplicationGroup | undefined | 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.
|
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
GlobalReplicationGroupNotFoundFault | client | The Global datastore does not exist |
InvalidGlobalReplicationGroupStateFault | client | The Global datastore is not available or in primary-only state. |
InvalidParameterValueException | client | The value for a parameter is invalid. |
ElastiCacheServiceException | Base exception class for all service exceptions from ElastiCache service. |