RemoveFromGlobalClusterCommand

Detaches an Amazon DocumentDB secondary cluster from a global cluster. The cluster becomes a standalone cluster with read-write capability instead of being read-only and receiving data from a primary in a different region.

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, RemoveFromGlobalClusterCommand } from "@aws-sdk/client-docdb"; // ES Modules import
// const { DocDBClient, RemoveFromGlobalClusterCommand } = require("@aws-sdk/client-docdb"); // CommonJS import
const client = new DocDBClient(config);
const input = { // RemoveFromGlobalClusterMessage
  GlobalClusterIdentifier: "STRING_VALUE", // required
  DbClusterIdentifier: "STRING_VALUE", // required
};
const command = new RemoveFromGlobalClusterCommand(input);
const response = await client.send(command);
// { // RemoveFromGlobalClusterResult
//   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,
//       },
//     ],
//   },
// };

RemoveFromGlobalClusterCommand Input

Parameter
Type
Description
DbClusterIdentifier
Required
string | undefined

The Amazon Resource Name (ARN) identifying the cluster that was detached from the Amazon DocumentDB global cluster.

GlobalClusterIdentifier
Required
string | undefined

The cluster identifier to detach from the Amazon DocumentDB global cluster.

RemoveFromGlobalClusterCommand 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
DBClusterNotFoundFault
client

DBClusterIdentifier doesn't refer to an existing cluster.

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.