create_global_cluster
¶
create_global_cluster(
*,
config_overrides: Optional[RDSClientConfig] = None,
global_cluster_identifier: Optional[GlobalClusterIdentifier] = None,
source_db_cluster_identifier: Optional[String] = None,
engine: Optional[String] = None,
engine_version: Optional[String] = None,
engine_lifecycle_support: Optional[String] = None,
deletion_protection: Optional[BooleanOptional] = None,
database_name: Optional[String] = None,
storage_encrypted: Optional[BooleanOptional] = None,
tags: Optional[TagList] = None,
) -> CreateGlobalClusterResult
Creates an Aurora global database spread across multiple Amazon Web Services Regions. The global database contains a single primary cluster with read-write capability, and a read-only secondary cluster that receives data from the primary cluster through high-speed replication performed by the Aurora storage subsystem.
You can create a global database that is initially empty, and then create the primary and secondary DB clusters in the global database. Or you can specify an existing Aurora cluster during the create operation, and this cluster becomes the primary cluster of the global database.
This operation applies only to Aurora DB clusters.
Parameters:
-
global_cluster_identifier(Optional[GlobalClusterIdentifier], default:None) –The cluster identifier for this global database cluster. This parameter is stored as a lowercase string.
-
source_db_cluster_identifier(Optional[String], default:None) –The Amazon Resource Name (ARN) to use as the primary cluster of the global database.
If you provide a value for this parameter, don't specify values for the following settings because Amazon Aurora uses the values from the specified source DB cluster:
-
DatabaseName -
Engine -
EngineVersion -
StorageEncrypted
-
-
engine(Optional[String], default:None) –The database engine to use for this global database cluster.
Valid Values:
aurora-mysql | aurora-postgresqlConstraints:
-
Can't be specified if
SourceDBClusterIdentifieris specified. In this case, Amazon Aurora uses the engine of the source DB cluster.
-
-
engine_version(Optional[String], default:None) –The engine version to use for this global database cluster.
Constraints:
-
Can't be specified if
SourceDBClusterIdentifieris specified. In this case, Amazon Aurora uses the engine version of the source DB cluster.
-
-
engine_lifecycle_support(Optional[String], default:None) –The lifecycle type for this global database cluster.
By default, this value is set to
open-source-rds-extended-support, which enrolls your global cluster into Amazon RDS Extended Support. At the end of standard support, you can avoid charges for Extended Support by setting the value toopen-source-rds-extended-support-disabled. In this case, creating the global cluster will fail if the DB major version is past its end of standard support date.This setting only applies to Aurora PostgreSQL-based global databases.
You can use this setting to enroll your global cluster into Amazon RDS Extended Support. With RDS Extended Support, you can run the selected major engine version on your global cluster past the end of standard support for that engine version. For more information, see Amazon RDS Extended Support with Amazon Aurora in the Amazon Aurora User Guide.
Valid Values:
open-source-rds-extended-support | open-source-rds-extended-support-disabledDefault:
open-source-rds-extended-support -
deletion_protection(Optional[BooleanOptional], default:None) –Specifies whether to enable deletion protection for the new global database cluster. The global database can't be deleted when deletion protection is enabled.
-
database_name(Optional[String], default:None) –The name for your database of up to 64 alphanumeric characters. If you don't specify a name, Amazon Aurora doesn't create a database in the global database cluster.
Constraints:
-
Can't be specified if
SourceDBClusterIdentifieris specified. In this case, Amazon Aurora uses the database name from the source DB cluster.
-
-
storage_encrypted(Optional[BooleanOptional], default:None) –Specifies whether to enable storage encryption for the new global database cluster.
Constraints:
-
Can't be specified if
SourceDBClusterIdentifieris specified. In this case, Amazon Aurora uses the setting from the source DB cluster.
-
-
tags(Optional[TagList], default:None) –Tags to assign to the global cluster.
Raises:
-
DBClusterNotFoundFault–DBClusterIdentifierdoesn't refer to an existing DB cluster. -
GlobalClusterAlreadyExistsFault–The
GlobalClusterIdentifieralready exists. Specify a new global database identifier (unique name) to create a new global database cluster or to rename an existing one. -
GlobalClusterQuotaExceededFault–The number of global database clusters for this account is already at the maximum allowed.
-
InvalidDBClusterStateFault–The requested operation can't be performed while the cluster is in this state.
-
InvalidDBShardGroupStateFault–The DB shard group must be in the available state.
-
ResourceNotFoundFault–The specified resource ID was not found.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To create a global DB cluster The following example creates a new Aurora MySQL-compatible global DB cluster.
>>> client.create_global_cluster(global_cluster_identifier='myglobalcluster', engine='aurora-mysql')
Source code in docs_src/capo_rds/_services/rds.py
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 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 | |