ModifyGlobalClusterCommand

Modify a setting for an Amazon DocumentDB global cluster. You can change one or more configuration parameters (for example: deletion protection), or the global cluster identifier by specifying these parameters and the new values in the request.

This action only applies to Amazon DocumentDB clusters.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { DocDBClient, ModifyGlobalClusterCommand } from "@aws-sdk/client-docdb"; // ES Modules import
// const { DocDBClient, ModifyGlobalClusterCommand } = require("@aws-sdk/client-docdb"); // CommonJS import
const client = new DocDBClient(config);
const input = { // ModifyGlobalClusterMessage
  GlobalClusterIdentifier: "STRING_VALUE", // required
  NewGlobalClusterIdentifier: "STRING_VALUE",
  DeletionProtection: true || false,
};
const command = new ModifyGlobalClusterCommand(input);
const response = await client.send(command);
// { // ModifyGlobalClusterResult
//   GlobalCluster: { // GlobalCluster
//     GlobalClusterIdentifier: "STRING_VALUE",
//     GlobalClusterResourceId: "STRING_VALUE",
//     GlobalClusterArn: "STRING_VALUE",
//     Status: "STRING_VALUE",
//     Engine: "STRING_VALUE",
//     EngineVersion: "STRING_VALUE",
//     DatabaseName: "STRING_VALUE",
//     StorageEncrypted: true || false,
//     DeletionProtection: true || false,
//     GlobalClusterMembers: [ // GlobalClusterMemberList
//       { // GlobalClusterMember
//         DBClusterArn: "STRING_VALUE",
//         Readers: [ // ReadersArnList
//           "STRING_VALUE",
//         ],
//         IsWriter: true || false,
//       },
//     ],
//   },
// };

ModifyGlobalClusterCommand Input

See ModifyGlobalClusterCommandInput for more details

Parameter
Type
Description
GlobalClusterIdentifier
Required
string | undefined

The identifier for the global cluster being modified. This parameter isn't case-sensitive.

Constraints:

  • Must match the identifier of an existing global cluster.

DeletionProtection
boolean | undefined

Indicates if the global cluster has deletion protection enabled. The global cluster can't be deleted when deletion protection is enabled.

NewGlobalClusterIdentifier
string | undefined

The new identifier for a global cluster when you modify a global cluster. This value is stored as a lowercase string.

  • Must contain from 1 to 63 letters, numbers, or hyphens

    The first character must be a letter

    Can't end with a hyphen or contain two consecutive hyphens

Example: my-cluster2

ModifyGlobalClusterCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
GlobalCluster
GlobalCluster | undefined

A data type representing an Amazon DocumentDB global cluster.

Throws

Name
Fault
Details
GlobalClusterNotFoundFault
client

The GlobalClusterIdentifier doesn't refer to an existing global cluster.

InvalidGlobalClusterStateFault
client

The requested operation can't be performed while the cluster is in this state.

DocDBServiceException
Base exception class for all service exceptions from DocDB service.