amazonka-rds-2.0: Amazon Relational Database Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.RDS.FailoverDBCluster

Description

Forces a failover for a DB cluster.

For an Aurora DB cluster, failover for a DB cluster promotes one of the Aurora Replicas (read-only instances) in the DB cluster to be the primary DB instance (the cluster writer).

For a Multi-AZ DB cluster, failover for a DB cluster promotes one of the readable standby DB instances (read-only instances) in the DB cluster to be the primary DB instance (the cluster writer).

An Amazon Aurora DB cluster automatically fails over to an Aurora Replica, if one exists, when the primary DB instance fails. A Multi-AZ DB cluster automatically fails over to a readable standby DB instance when the primary DB instance fails.

To simulate a failure of a primary instance for testing, you can force a failover. Because each instance in a DB cluster has its own endpoint address, make sure to clean up and re-establish any existing connections that use those endpoint addresses when the failover is complete.

For more information on Amazon Aurora DB clusters, see What is Amazon Aurora? in the Amazon Aurora User Guide.

For more information on Multi-AZ DB clusters, see Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.

Synopsis

Creating a Request

data FailoverDBCluster Source #

See: newFailoverDBCluster smart constructor.

Constructors

FailoverDBCluster' 

Fields

  • targetDBInstanceIdentifier :: Maybe Text

    The name of the DB instance to promote to the primary DB instance.

    Specify the DB instance identifier for an Aurora Replica or a Multi-AZ readable standby in the DB cluster, for example mydbcluster-replica1.

    This setting isn't supported for RDS for MySQL Multi-AZ DB clusters.

  • dbClusterIdentifier :: Text

    A DB cluster identifier to force a failover for. This parameter isn't case-sensitive.

    Constraints:

    • Must match the identifier of an existing DBCluster.

Instances

Instances details
ToHeaders FailoverDBCluster Source # 
Instance details

Defined in Amazonka.RDS.FailoverDBCluster

ToPath FailoverDBCluster Source # 
Instance details

Defined in Amazonka.RDS.FailoverDBCluster

ToQuery FailoverDBCluster Source # 
Instance details

Defined in Amazonka.RDS.FailoverDBCluster

AWSRequest FailoverDBCluster Source # 
Instance details

Defined in Amazonka.RDS.FailoverDBCluster

Associated Types

type AWSResponse FailoverDBCluster #

Generic FailoverDBCluster Source # 
Instance details

Defined in Amazonka.RDS.FailoverDBCluster

Associated Types

type Rep FailoverDBCluster :: Type -> Type #

Read FailoverDBCluster Source # 
Instance details

Defined in Amazonka.RDS.FailoverDBCluster

Show FailoverDBCluster Source # 
Instance details

Defined in Amazonka.RDS.FailoverDBCluster

NFData FailoverDBCluster Source # 
Instance details

Defined in Amazonka.RDS.FailoverDBCluster

Methods

rnf :: FailoverDBCluster -> () #

Eq FailoverDBCluster Source # 
Instance details

Defined in Amazonka.RDS.FailoverDBCluster

Hashable FailoverDBCluster Source # 
Instance details

Defined in Amazonka.RDS.FailoverDBCluster

type AWSResponse FailoverDBCluster Source # 
Instance details

Defined in Amazonka.RDS.FailoverDBCluster

type Rep FailoverDBCluster Source # 
Instance details

Defined in Amazonka.RDS.FailoverDBCluster

type Rep FailoverDBCluster = D1 ('MetaData "FailoverDBCluster" "Amazonka.RDS.FailoverDBCluster" "amazonka-rds-2.0-3xXyiLHmAvvCXXUIx1uhpP" 'False) (C1 ('MetaCons "FailoverDBCluster'" 'PrefixI 'True) (S1 ('MetaSel ('Just "targetDBInstanceIdentifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "dbClusterIdentifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newFailoverDBCluster Source #

Create a value of FailoverDBCluster with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:targetDBInstanceIdentifier:FailoverDBCluster', failoverDBCluster_targetDBInstanceIdentifier - The name of the DB instance to promote to the primary DB instance.

Specify the DB instance identifier for an Aurora Replica or a Multi-AZ readable standby in the DB cluster, for example mydbcluster-replica1.

This setting isn't supported for RDS for MySQL Multi-AZ DB clusters.

FailoverDBCluster, failoverDBCluster_dbClusterIdentifier - A DB cluster identifier to force a failover for. This parameter isn't case-sensitive.

Constraints:

  • Must match the identifier of an existing DBCluster.

Request Lenses

failoverDBCluster_targetDBInstanceIdentifier :: Lens' FailoverDBCluster (Maybe Text) Source #

The name of the DB instance to promote to the primary DB instance.

Specify the DB instance identifier for an Aurora Replica or a Multi-AZ readable standby in the DB cluster, for example mydbcluster-replica1.

This setting isn't supported for RDS for MySQL Multi-AZ DB clusters.

failoverDBCluster_dbClusterIdentifier :: Lens' FailoverDBCluster Text Source #

A DB cluster identifier to force a failover for. This parameter isn't case-sensitive.

Constraints:

  • Must match the identifier of an existing DBCluster.

Destructuring the Response

data FailoverDBClusterResponse Source #

See: newFailoverDBClusterResponse smart constructor.

Constructors

FailoverDBClusterResponse' 

Fields

Instances

Instances details
Generic FailoverDBClusterResponse Source # 
Instance details

Defined in Amazonka.RDS.FailoverDBCluster

Associated Types

type Rep FailoverDBClusterResponse :: Type -> Type #

Read FailoverDBClusterResponse Source # 
Instance details

Defined in Amazonka.RDS.FailoverDBCluster

Show FailoverDBClusterResponse Source # 
Instance details

Defined in Amazonka.RDS.FailoverDBCluster

NFData FailoverDBClusterResponse Source # 
Instance details

Defined in Amazonka.RDS.FailoverDBCluster

Eq FailoverDBClusterResponse Source # 
Instance details

Defined in Amazonka.RDS.FailoverDBCluster

type Rep FailoverDBClusterResponse Source # 
Instance details

Defined in Amazonka.RDS.FailoverDBCluster

type Rep FailoverDBClusterResponse = D1 ('MetaData "FailoverDBClusterResponse" "Amazonka.RDS.FailoverDBCluster" "amazonka-rds-2.0-3xXyiLHmAvvCXXUIx1uhpP" 'False) (C1 ('MetaCons "FailoverDBClusterResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "dbCluster") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe DBCluster)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newFailoverDBClusterResponse Source #

Create a value of FailoverDBClusterResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:dbCluster:FailoverDBClusterResponse', failoverDBClusterResponse_dbCluster - Undocumented member.

$sel:httpStatus:FailoverDBClusterResponse', failoverDBClusterResponse_httpStatus - The response's http status code.

Response Lenses