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.

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.

Note:

This is an asynchronous operation using the standard naming convention for .NET 4.5 or higher. For .NET 3.5 the operation is implemented as a pair of methods using the standard naming convention of BeginFailoverDBCluster and EndFailoverDBCluster.

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

Syntax

C#
public abstract Task<FailoverDBClusterResponse> FailoverDBClusterAsync(
         FailoverDBClusterRequest request,
         CancellationToken cancellationToken
)
Parameters
request
Type: Amazon.Neptune.Model.FailoverDBClusterRequest

Container for the necessary parameters to execute the FailoverDBCluster service method.

cancellationToken
Type: System.Threading.CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Return Value
The response from the FailoverDBCluster service method, as returned by Neptune.

Exceptions

ExceptionCondition
DBClusterNotFoundException DBClusterIdentifier does not refer to an existing DB cluster.
InvalidDBClusterStateException The DB cluster is not in a valid state.
InvalidDBInstanceStateException The specified DB instance is not in the available state.

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5

See Also