- 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.
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
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
GlobalClusterIdentifier Required | string | undefined | The identifier for the global cluster being modified. This parameter isn't case-sensitive. Constraints:
|
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.
Example: |
ModifyGlobalClusterCommand Output
Parameter | Type | Description |
---|
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 |
---|
Name | Fault | Details |
---|---|---|
GlobalClusterNotFoundFault | client | The |
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. |