Struct aws_sdk_rds::client::fluent_builders::FailoverDBCluster
source · [−]pub struct FailoverDBCluster { /* private fields */ }Expand description
Fluent builder constructing a request to FailoverDBCluster.
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.
Implementations
sourceimpl FailoverDBCluster
impl FailoverDBCluster
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<FailoverDBCluster, AwsResponseRetryClassifier>, SdkError<FailoverDBClusterError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<FailoverDBCluster, AwsResponseRetryClassifier>, SdkError<FailoverDBClusterError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<FailoverDbClusterOutput, SdkError<FailoverDBClusterError>>
pub async fn send(
self
) -> Result<FailoverDbClusterOutput, SdkError<FailoverDBClusterError>>
Sends the request and returns the response.
If an error occurs, an SdkError will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn db_cluster_identifier(self, input: impl Into<String>) -> Self
pub fn db_cluster_identifier(self, input: impl Into<String>) -> Self
A DB cluster identifier to force a failover for. This parameter isn't case-sensitive.
Constraints:
-
Must match the identifier of an existing DBCluster.
sourcepub fn set_db_cluster_identifier(self, input: Option<String>) -> Self
pub fn set_db_cluster_identifier(self, input: Option<String>) -> Self
A DB cluster identifier to force a failover for. This parameter isn't case-sensitive.
Constraints:
-
Must match the identifier of an existing DBCluster.
sourcepub fn target_db_instance_identifier(self, input: impl Into<String>) -> Self
pub fn target_db_instance_identifier(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_target_db_instance_identifier(self, input: Option<String>) -> Self
pub fn set_target_db_instance_identifier(self, input: Option<String>) -> Self
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.
Trait Implementations
sourceimpl Clone for FailoverDBCluster
impl Clone for FailoverDBCluster
sourcefn clone(&self) -> FailoverDBCluster
fn clone(&self) -> FailoverDBCluster
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more