import { Command as $Command } from "@smithy/core/client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { FailoverGlobalClusterMessage, FailoverGlobalClusterResult } from "../models/models_1"; import type { RDSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RDSClient"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @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(): { [x: string]: unknown; }; }; /** *

Promotes the specified secondary DB cluster to be the primary DB cluster in the global database cluster to fail over or switch over a global database. Switchover operations were previously called "managed planned failovers."

Although this operation can be used either to fail over or to switch over a global database cluster, its intended use is for global database failover. To switch over a global database cluster, we recommend that you use the SwitchoverGlobalCluster operation instead.

How you use this operation depends on whether you are failing over or switching over your global database cluster:

About failing over and switching over

While failing over and switching over a global database cluster both change the primary DB cluster, you use these operations for different reasons:

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { RDSClient, FailoverGlobalClusterCommand } from "@aws-sdk/client-rds"; // ES Modules import * // const { RDSClient, FailoverGlobalClusterCommand } = require("@aws-sdk/client-rds"); // CommonJS import * // import type { RDSClientConfig } from "@aws-sdk/client-rds"; * const config = {}; // type is RDSClientConfig * const client = new RDSClient(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", * // EngineLifecycleSupport: "STRING_VALUE", * // DatabaseName: "STRING_VALUE", * // StorageEncrypted: true || false, * // StorageEncryptionType: "none" || "sse-kms" || "sse-rds", * // DeletionProtection: true || false, * // GlobalClusterMembers: [ // GlobalClusterMemberList * // { // GlobalClusterMember * // DBClusterArn: "STRING_VALUE", * // Readers: [ // ReadersArnList * // "STRING_VALUE", * // ], * // IsWriter: true || false, * // GlobalWriteForwardingStatus: "enabled" || "disabled" || "enabling" || "disabling" || "unknown", * // SynchronizationStatus: "connected" || "pending-resync", * // }, * // ], * // Endpoint: "STRING_VALUE", * // 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 RDSClientResolvedConfig | config} for RDSClient's `config` shape. * * @throws {@link DBClusterNotFoundFault} (client fault) *

DBClusterIdentifier doesn't refer to an existing DB cluster.

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

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

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

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

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

The global cluster is in an invalid state and can't perform the requested operation.

* * @throws {@link RDSServiceException} *

Base exception class for all service exceptions from RDS 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; }; }; }