failover_global_cluster
¶
failover_global_cluster(
*,
config_overrides: Optional[NeptuneClientConfig] = None,
global_cluster_identifier: Optional[GlobalClusterIdentifier] = None,
target_db_cluster_identifier: Optional[String] = None,
allow_data_loss: Optional[BooleanOptional] = None,
switchover: Optional[BooleanOptional] = None,
) -> FailoverGlobalClusterResult
Initiates the failover process for a Neptune global database.
A failover for a Neptune global database promotes one of secondary read-only DB clusters to be the primary DB cluster and demotes the primary DB cluster to being a secondary (read-only) DB cluster. In other words, the role of the current primary DB cluster and the selected target secondary DB cluster are switched. The selected secondary DB cluster assumes full read/write capabilities for the Neptune global database.
This action applies only to Neptune global databases. This action is only intended for use on healthy Neptune global databases with healthy Neptune DB clusters and no region-wide outages, to test disaster recovery scenarios or to reconfigure the global database topology.
Parameters:
-
global_cluster_identifier(Optional[GlobalClusterIdentifier], default:None) –Identifier of the Neptune global database that should be failed over. The identifier is the unique key assigned by the user when the Neptune global database was created. In other words, it's the name of the global database that you want to fail over.
Constraints: Must match the identifier of an existing Neptune global database.
-
target_db_cluster_identifier(Optional[String], default:None) –The Amazon Resource Name (ARN) of the secondary Neptune DB cluster that you want to promote to primary for the global database.
-
allow_data_loss(Optional[BooleanOptional], default:None) –Specifies whether to allow data loss for this global database cluster operation. Allowing data loss triggers a global failover operation.
If you don't specify
AllowDataLoss, the global database cluster operation defaults to a switchover.Constraints: Can't be specified together with the
Switchoverparameter. -
switchover(Optional[BooleanOptional], default:None) –Specifies whether to switch over this global database cluster.
Constraints: Can't be specified together with the
AllowDataLossparameter.
Raises:
-
DBClusterNotFoundFault–DBClusterIdentifier does not refer to an existing DB cluster.
-
GlobalClusterNotFoundFault–The
GlobalClusterIdentifierdoesn't refer to an existing global database cluster. -
InvalidDBClusterStateFault–The DB cluster is not in a valid state.
-
InvalidGlobalClusterStateFault–The global cluster is in an invalid state and can't perform the requested operation.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_neptune/_services/neptune.py
4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 | |