create_global_cluster
async
¶
create_global_cluster(
*,
config_overrides: Optional[AsyncRDSClientConfig] = 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.
>>> await client.create_global_cluster(global_cluster_identifier='myglobalcluster', engine='aurora-mysql')
Source code in docs_src/capo_rds/_services/async_rds.py
3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 | |