import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { FailoverGlobalClusterMessage, FailoverGlobalClusterResult } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link FailoverGlobalClusterCommand}. */ export interface FailoverGlobalClusterCommandInput extends FailoverGlobalClusterMessage { } /** * @public * * The output of {@link FailoverGlobalClusterCommand}. */ export interface FailoverGlobalClusterCommandOutput extends FailoverGlobalClusterResult, __MetadataBearer { } declare const FailoverGlobalClusterCommand_base: { new (input: FailoverGlobalClusterCommandInput): import("@smithy/core/client").CommandImpl; new (input: FailoverGlobalClusterCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

Promotes the specified secondary DB cluster to be the primary DB cluster in the global cluster when failing over a global cluster occurs.

*

Use this operation to respond to an unplanned event, such as a regional disaster in the primary region. * Failing over can result in a loss of write transaction data that wasn't replicated to the chosen secondary before the failover event occurred. * However, the recovery process that promotes a DB instance on the chosen seconday DB cluster to be the primary writer DB instance guarantees that the data is in a transactionally consistent state.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { DocDBClient, FailoverGlobalClusterCommand } from "@aws-sdk/client-docdb"; // ES Modules import * // const { DocDBClient, FailoverGlobalClusterCommand } = require("@aws-sdk/client-docdb"); // CommonJS import * // import type { DocDBClientConfig } from "@aws-sdk/client-docdb"; * const config = {}; // type is DocDBClientConfig * const client = new DocDBClient(config); * const input = { // FailoverGlobalClusterMessage * GlobalClusterIdentifier: "STRING_VALUE", // required * TargetDbClusterIdentifier: "STRING_VALUE", // required * AllowDataLoss: true || false, * Switchover: true || false, * }; * const command = new FailoverGlobalClusterCommand(input); * const response = await client.send(command); * // { // FailoverGlobalClusterResult * // 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, * // SynchronizationStatus: "connected" || "pending-resync", * // }, * // ], * // FailoverState: { // FailoverState * // Status: "pending" || "failing-over" || "cancelling", * // FromDbClusterArn: "STRING_VALUE", * // ToDbClusterArn: "STRING_VALUE", * // IsDataLossAllowed: true || false, * // }, * // TagList: [ // TagList * // { // Tag * // Key: "STRING_VALUE", * // Value: "STRING_VALUE", * // }, * // ], * // }, * // }; * * ``` * * @param FailoverGlobalClusterCommandInput - {@link FailoverGlobalClusterCommandInput} * @returns {@link FailoverGlobalClusterCommandOutput} * @see {@link FailoverGlobalClusterCommandInput} for command's `input` shape. * @see {@link FailoverGlobalClusterCommandOutput} for command's `response` shape. * @see {@link DocDBClientResolvedConfig | config} for DocDBClient's `config` shape. * * @throws {@link DBClusterNotFoundFault} (client fault) *

* DBClusterIdentifier doesn't refer to an existing cluster.

* * @throws {@link GlobalClusterNotFoundFault} (client fault) *

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

* * @throws {@link InvalidDBClusterStateFault} (client fault) *

The cluster isn't in a valid state.

* * @throws {@link InvalidGlobalClusterStateFault} (client fault) *

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

* * @throws {@link DocDBServiceException} *

Base exception class for all service exceptions from DocDB service.

* * * @public */ export declare class FailoverGlobalClusterCommand extends FailoverGlobalClusterCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: FailoverGlobalClusterMessage; output: FailoverGlobalClusterResult; }; sdk: { input: FailoverGlobalClusterCommandInput; output: FailoverGlobalClusterCommandOutput; }; }; }