- 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.
DecreaseNodeGroupsInGlobalReplicationGroupCommand
Decreases the number of node groups in a Global datastore
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ElastiCacheClient, DecreaseNodeGroupsInGlobalReplicationGroupCommand } from "@aws-sdk/client-elasticache"; // ES Modules import
// const { ElastiCacheClient, DecreaseNodeGroupsInGlobalReplicationGroupCommand } = require("@aws-sdk/client-elasticache"); // CommonJS import
const client = new ElastiCacheClient(config);
const input = { // DecreaseNodeGroupsInGlobalReplicationGroupMessage
GlobalReplicationGroupId: "STRING_VALUE", // required
NodeGroupCount: Number("int"), // required
GlobalNodeGroupsToRemove: [ // GlobalNodeGroupIdList
"STRING_VALUE",
],
GlobalNodeGroupsToRetain: [
"STRING_VALUE",
],
ApplyImmediately: true || false, // required
};
const command = new DecreaseNodeGroupsInGlobalReplicationGroupCommand(input);
const response = await client.send(command);
// { // DecreaseNodeGroupsInGlobalReplicationGroupResult
// 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",
// },
// };
DecreaseNodeGroupsInGlobalReplicationGroupCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ApplyImmediately Required | boolean | undefined | Indicates that the shard reconfiguration process begins immediately. At present, the only permitted value for this parameter is true. |
GlobalReplicationGroupId Required | string | undefined | The name of the Global datastore |
NodeGroupCount Required | number | undefined | The number of node groups (shards) that results from the modification of the shard configuration |
GlobalNodeGroupsToRemove | string[] | undefined | If the value of NodeGroupCount is less than the current number of node groups (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. GlobalNodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. ElastiCache will attempt to remove all node groups listed by GlobalNodeGroupsToRemove from the cluster. |
GlobalNodeGroupsToRetain | string[] | undefined | If the value of NodeGroupCount is less than the current number of node groups (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. GlobalNodeGroupsToRetain is a list of NodeGroupIds to retain from the cluster. ElastiCache will attempt to retain all node groups listed by GlobalNodeGroupsToRetain from the cluster. |
DecreaseNodeGroupsInGlobalReplicationGroupCommand 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. |
InvalidParameterCombinationException | client | Two or more incompatible parameters were specified. |
InvalidParameterValueException | client | The value for a parameter is invalid. |
ElastiCacheServiceException | Base exception class for all service exceptions from ElastiCache service. |