AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the FailoverDBCluster operation. Forces a failover for a DB cluster.

A failover for a DB cluster promotes one of the Read Replicas (read-only instances) in the DB cluster to be the primary instance (the cluster writer).

Amazon Neptune will automatically fail over to a Read Replica, if one exists, when the primary instance fails. You can force a failover when you want to simulate a failure of a primary instance for testing. Because each instance in a DB cluster has its own endpoint address, you will need to clean up and re-establish any existing connections that use those endpoint addresses when the failover is complete.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.Neptune.AmazonNeptuneRequest
      Amazon.Neptune.Model.FailoverDBClusterRequest

Namespace: Amazon.Neptune.Model
Assembly: AWSSDK.Neptune.dll
Version: 3.x.y.z

Syntax

C#
public class FailoverDBClusterRequest : AmazonNeptuneRequest
         IAmazonWebServiceRequest

The FailoverDBClusterRequest type exposes the following members

Constructors

NameDescription
Public Method FailoverDBClusterRequest()

Properties

NameTypeDescription
Public Property DBClusterIdentifier System.String

Gets and sets the property DBClusterIdentifier.

A DB cluster identifier to force a failover for. This parameter is not case-sensitive.

Constraints:

  • Must match the identifier of an existing DBCluster.

Public Property TargetDBInstanceIdentifier System.String

Gets and sets the property TargetDBInstanceIdentifier.

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

You must specify the instance identifier for an Read Replica in the DB cluster. For example, mydbcluster-replica1.

Examples

This example performs a failover for the specified DB cluster to the specified DB instance.

To perform a failover for a DB cluster


var response = client.FailoverDBCluster(new FailoverDBClusterRequest 
{
    DBClusterIdentifier = "myaurorainstance-cluster",
    TargetDBInstanceIdentifier = "myaurorareplica"
});

DBCluster dbCluster = response.DBCluster;

            

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5