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
3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 | |