Failover Db Cluster
rds_failover_db_cluster | R Documentation |
Forces a failover for a DB cluster¶
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, after RDS terminates the primary DB instance, the internal monitoring system detects that the primary DB instance is unhealthy and promotes a readable standby (read-only instances) in the DB cluster to be the primary DB instance (the cluster writer). Failover times are typically less than 35 seconds.
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 DB cluster deployments in the Amazon RDS User Guide.
Usage¶
Arguments¶
DBClusterIdentifier
[required] The identifier of the DB cluster to force a failover for. This parameter isn't case-sensitive.
Constraints:
Must match the identifier of an existing DB cluster.
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.
Value¶
A list with the following syntax:
list(
DBCluster = list(
AllocatedStorage = 123,
AvailabilityZones = list(
"string"
),
BackupRetentionPeriod = 123,
CharacterSetName = "string",
DatabaseName = "string",
DBClusterIdentifier = "string",
DBClusterParameterGroup = "string",
DBSubnetGroup = "string",
Status = "string",
AutomaticRestartTime = as.POSIXct(
"2015-01-01"
),
PercentProgress = "string",
EarliestRestorableTime = as.POSIXct(
"2015-01-01"
),
Endpoint = "string",
ReaderEndpoint = "string",
CustomEndpoints = list(
"string"
),
MultiAZ = TRUE|FALSE,
Engine = "string",
EngineVersion = "string",
LatestRestorableTime = as.POSIXct(
"2015-01-01"
),
Port = 123,
MasterUsername = "string",
DBClusterOptionGroupMemberships = list(
list(
DBClusterOptionGroupName = "string",
Status = "string"
)
),
PreferredBackupWindow = "string",
PreferredMaintenanceWindow = "string",
ReplicationSourceIdentifier = "string",
ReadReplicaIdentifiers = list(
"string"
),
StatusInfos = list(
list(
StatusType = "string",
Normal = TRUE|FALSE,
Status = "string",
Message = "string"
)
),
DBClusterMembers = list(
list(
DBInstanceIdentifier = "string",
IsClusterWriter = TRUE|FALSE,
DBClusterParameterGroupStatus = "string",
PromotionTier = 123
)
),
VpcSecurityGroups = list(
list(
VpcSecurityGroupId = "string",
Status = "string"
)
),
HostedZoneId = "string",
StorageEncrypted = TRUE|FALSE,
KmsKeyId = "string",
DbClusterResourceId = "string",
DBClusterArn = "string",
AssociatedRoles = list(
list(
RoleArn = "string",
Status = "string",
FeatureName = "string"
)
),
IAMDatabaseAuthenticationEnabled = TRUE|FALSE,
CloneGroupId = "string",
ClusterCreateTime = as.POSIXct(
"2015-01-01"
),
EarliestBacktrackTime = as.POSIXct(
"2015-01-01"
),
BacktrackWindow = 123,
BacktrackConsumedChangeRecords = 123,
EnabledCloudwatchLogsExports = list(
"string"
),
Capacity = 123,
EngineMode = "string",
ScalingConfigurationInfo = list(
MinCapacity = 123,
MaxCapacity = 123,
AutoPause = TRUE|FALSE,
SecondsUntilAutoPause = 123,
TimeoutAction = "string",
SecondsBeforeTimeout = 123
),
RdsCustomClusterConfiguration = list(
InterconnectSubnetId = "string",
TransitGatewayMulticastDomainId = "string",
ReplicaMode = "open-read-only"|"mounted"
),
DeletionProtection = TRUE|FALSE,
HttpEndpointEnabled = TRUE|FALSE,
ActivityStreamMode = "sync"|"async",
ActivityStreamStatus = "stopped"|"starting"|"started"|"stopping",
ActivityStreamKmsKeyId = "string",
ActivityStreamKinesisStreamName = "string",
CopyTagsToSnapshot = TRUE|FALSE,
CrossAccountClone = TRUE|FALSE,
DomainMemberships = list(
list(
Domain = "string",
Status = "string",
FQDN = "string",
IAMRoleName = "string",
OU = "string",
AuthSecretArn = "string",
DnsIps = list(
"string"
)
)
),
TagList = list(
list(
Key = "string",
Value = "string"
)
),
GlobalWriteForwardingStatus = "enabled"|"disabled"|"enabling"|"disabling"|"unknown",
GlobalWriteForwardingRequested = TRUE|FALSE,
PendingModifiedValues = list(
PendingCloudwatchLogsExports = list(
LogTypesToEnable = list(
"string"
),
LogTypesToDisable = list(
"string"
)
),
DBClusterIdentifier = "string",
MasterUserPassword = "string",
IAMDatabaseAuthenticationEnabled = TRUE|FALSE,
EngineVersion = "string",
BackupRetentionPeriod = 123,
AllocatedStorage = 123,
RdsCustomClusterConfiguration = list(
InterconnectSubnetId = "string",
TransitGatewayMulticastDomainId = "string",
ReplicaMode = "open-read-only"|"mounted"
),
Iops = 123,
StorageType = "string",
CertificateDetails = list(
CAIdentifier = "string",
ValidTill = as.POSIXct(
"2015-01-01"
)
)
),
DBClusterInstanceClass = "string",
StorageType = "string",
Iops = 123,
PubliclyAccessible = TRUE|FALSE,
AutoMinorVersionUpgrade = TRUE|FALSE,
MonitoringInterval = 123,
MonitoringRoleArn = "string",
PerformanceInsightsEnabled = TRUE|FALSE,
PerformanceInsightsKMSKeyId = "string",
PerformanceInsightsRetentionPeriod = 123,
ServerlessV2ScalingConfiguration = list(
MinCapacity = 123.0,
MaxCapacity = 123.0
),
NetworkType = "string",
DBSystemId = "string",
MasterUserSecret = list(
SecretArn = "string",
SecretStatus = "string",
KmsKeyId = "string"
),
IOOptimizedNextAllowedModificationTime = as.POSIXct(
"2015-01-01"
),
LocalWriteForwardingStatus = "enabled"|"disabled"|"enabling"|"disabling"|"requested",
AwsBackupRecoveryPointArn = "string",
LimitlessDatabase = list(
Status = "active"|"not-in-use"|"enabled"|"disabled"|"enabling"|"disabling"|"modifying-max-capacity"|"error",
MinRequiredACU = 123.0
),
StorageThroughput = 123,
CertificateDetails = list(
CAIdentifier = "string",
ValidTill = as.POSIXct(
"2015-01-01"
)
),
EngineLifecycleSupport = "string"
)
)