DeleteGlobalClusterCommand

Deletes a global cluster. The primary and secondary clusters must already be detached or deleted before attempting to delete a global cluster.

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

DeleteGlobalClusterCommand Input

See DeleteGlobalClusterCommandInput for more details

Parameter
Type
Description
GlobalClusterIdentifier
Required
string | undefined

The cluster identifier of the global cluster being deleted.

DeleteGlobalClusterCommand 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.