- 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.
UpdateClusterCommand
Modifies the settings for a cluster. You can use this operation to change one or more cluster configuration settings by specifying the settings and the new values.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { MemoryDBClient, UpdateClusterCommand } from "@aws-sdk/client-memorydb"; // ES Modules import
// const { MemoryDBClient, UpdateClusterCommand } = require("@aws-sdk/client-memorydb"); // CommonJS import
const client = new MemoryDBClient(config);
const input = { // UpdateClusterRequest
ClusterName: "STRING_VALUE", // required
Description: "STRING_VALUE",
SecurityGroupIds: [ // SecurityGroupIdsList
"STRING_VALUE",
],
MaintenanceWindow: "STRING_VALUE",
SnsTopicArn: "STRING_VALUE",
SnsTopicStatus: "STRING_VALUE",
ParameterGroupName: "STRING_VALUE",
SnapshotWindow: "STRING_VALUE",
SnapshotRetentionLimit: Number("int"),
NodeType: "STRING_VALUE",
Engine: "STRING_VALUE",
EngineVersion: "STRING_VALUE",
ReplicaConfiguration: { // ReplicaConfigurationRequest
ReplicaCount: Number("int"),
},
ShardConfiguration: { // ShardConfigurationRequest
ShardCount: Number("int"),
},
ACLName: "STRING_VALUE",
};
const command = new UpdateClusterCommand(input);
const response = await client.send(command);
// { // UpdateClusterResponse
// Cluster: { // Cluster
// Name: "STRING_VALUE",
// Description: "STRING_VALUE",
// Status: "STRING_VALUE",
// PendingUpdates: { // ClusterPendingUpdates
// Resharding: { // ReshardingStatus
// SlotMigration: { // SlotMigration
// ProgressPercentage: Number("double"),
// },
// },
// ACLs: { // ACLsUpdateStatus
// ACLToApply: "STRING_VALUE",
// },
// ServiceUpdates: [ // PendingModifiedServiceUpdateList
// { // PendingModifiedServiceUpdate
// ServiceUpdateName: "STRING_VALUE",
// Status: "available" || "in-progress" || "complete" || "scheduled",
// },
// ],
// },
// MultiRegionClusterName: "STRING_VALUE",
// NumberOfShards: Number("int"),
// Shards: [ // ShardList
// { // Shard
// Name: "STRING_VALUE",
// Status: "STRING_VALUE",
// Slots: "STRING_VALUE",
// Nodes: [ // NodeList
// { // Node
// Name: "STRING_VALUE",
// Status: "STRING_VALUE",
// AvailabilityZone: "STRING_VALUE",
// CreateTime: new Date("TIMESTAMP"),
// Endpoint: { // Endpoint
// Address: "STRING_VALUE",
// Port: Number("int"),
// },
// },
// ],
// NumberOfNodes: Number("int"),
// },
// ],
// AvailabilityMode: "singleaz" || "multiaz",
// ClusterEndpoint: {
// Address: "STRING_VALUE",
// Port: Number("int"),
// },
// NodeType: "STRING_VALUE",
// Engine: "STRING_VALUE",
// EngineVersion: "STRING_VALUE",
// EnginePatchVersion: "STRING_VALUE",
// ParameterGroupName: "STRING_VALUE",
// ParameterGroupStatus: "STRING_VALUE",
// SecurityGroups: [ // SecurityGroupMembershipList
// { // SecurityGroupMembership
// SecurityGroupId: "STRING_VALUE",
// Status: "STRING_VALUE",
// },
// ],
// SubnetGroupName: "STRING_VALUE",
// TLSEnabled: true || false,
// KmsKeyId: "STRING_VALUE",
// ARN: "STRING_VALUE",
// SnsTopicArn: "STRING_VALUE",
// SnsTopicStatus: "STRING_VALUE",
// SnapshotRetentionLimit: Number("int"),
// MaintenanceWindow: "STRING_VALUE",
// SnapshotWindow: "STRING_VALUE",
// ACLName: "STRING_VALUE",
// AutoMinorVersionUpgrade: true || false,
// DataTiering: "true" || "false",
// },
// };
UpdateClusterCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ClusterName Required | string | undefined | The name of the cluster to update. |
ACLName | string | undefined | The Access Control List that is associated with the cluster. |
Description | string | undefined | The description of the cluster to update. |
Engine | string | undefined | The name of the engine to be used for the cluster. |
EngineVersion | string | undefined | The upgraded version of the engine to be run on the nodes. You can upgrade to a newer engine version, but you cannot downgrade to an earlier engine version. If you want to use an earlier engine version, you must delete the existing cluster and create it anew with the earlier engine version. |
MaintenanceWindow | string | undefined | Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period. Valid values for
Example: |
NodeType | string | undefined | A valid node type that you want to scale this cluster up or down to. |
ParameterGroupName | string | undefined | The name of the parameter group to update. |
ReplicaConfiguration | ReplicaConfigurationRequest | undefined | The number of replicas that will reside in each shard. |
SecurityGroupIds | string[] | undefined | The SecurityGroupIds to update. |
ShardConfiguration | ShardConfigurationRequest | undefined | The number of shards in the cluster. |
SnapshotRetentionLimit | number | undefined | The number of days for which MemoryDB retains automatic cluster snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot that was taken today is retained for 5 days before being deleted. |
SnapshotWindow | string | undefined | The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your cluster. |
SnsTopicArn | string | undefined | The SNS topic ARN to update. |
SnsTopicStatus | string | undefined | The status of the Amazon SNS notification topic. Notifications are sent only if the status is active. |
UpdateClusterCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Cluster | Cluster | undefined | The updated cluster. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ACLNotFoundFault | client | |
ClusterNotFoundFault | client | |
ClusterQuotaForCustomerExceededFault | client | |
InvalidACLStateFault | client | |
InvalidClusterStateFault | client | |
InvalidKMSKeyFault | client | |
InvalidNodeStateFault | client | |
InvalidParameterCombinationException | client | |
InvalidParameterValueException | client | |
InvalidVPCNetworkStateFault | client | |
NodeQuotaForClusterExceededFault | client | |
NodeQuotaForCustomerExceededFault | client | |
NoOperationFault | client | |
ParameterGroupNotFoundFault | client | |
ServiceLinkedRoleNotFoundFault | client | |
ShardsPerClusterQuotaExceededFault | client | |
MemoryDBServiceException | Base exception class for all service exceptions from MemoryDB service. |