createGlobalCluster method

Future<CreateGlobalClusterResult> createGlobalCluster({
  1. String? databaseName,
  2. bool? deletionProtection,
  3. String? engine,
  4. String? engineVersion,
  5. String? globalClusterIdentifier,
  6. String? sourceDBClusterIdentifier,
  7. bool? storageEncrypted,
})

Creates an Aurora global database spread across multiple AWS 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 add a primary cluster and a secondary cluster to it. Or you can specify an existing Aurora cluster during the create operation, and this cluster becomes the primary cluster of the global database.

May throw GlobalClusterAlreadyExistsFault. May throw GlobalClusterQuotaExceededFault. May throw InvalidDBClusterStateFault. May throw DBClusterNotFoundFault.

Parameter databaseName : The name for your database of up to 64 alpha-numeric characters. If you do not provide a name, Amazon Aurora will not create a database in the global database cluster you are creating.

Parameter deletionProtection : The deletion protection setting for the new global database. The global database can't be deleted when deletion protection is enabled.

Parameter engine : The name of the database engine to be used for this DB cluster.

Parameter engineVersion : The engine version of the Aurora global database.

Parameter globalClusterIdentifier : The cluster identifier of the new global database cluster.

Parameter sourceDBClusterIdentifier : The Amazon Resource Name (ARN) to use as the primary cluster of the global database. This parameter is optional.

Parameter storageEncrypted : The storage encryption setting for the new global database cluster.

Implementation

Future<CreateGlobalClusterResult> createGlobalCluster({
  String? databaseName,
  bool? deletionProtection,
  String? engine,
  String? engineVersion,
  String? globalClusterIdentifier,
  String? sourceDBClusterIdentifier,
  bool? storageEncrypted,
}) async {
  final $request = <String, dynamic>{};
  databaseName?.also((arg) => $request['DatabaseName'] = arg);
  deletionProtection?.also((arg) => $request['DeletionProtection'] = arg);
  engine?.also((arg) => $request['Engine'] = arg);
  engineVersion?.also((arg) => $request['EngineVersion'] = arg);
  globalClusterIdentifier
      ?.also((arg) => $request['GlobalClusterIdentifier'] = arg);
  sourceDBClusterIdentifier
      ?.also((arg) => $request['SourceDBClusterIdentifier'] = arg);
  storageEncrypted?.also((arg) => $request['StorageEncrypted'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'CreateGlobalCluster',
    version: '2014-10-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['CreateGlobalClusterMessage'],
    shapes: shapes,
    resultWrapper: 'CreateGlobalClusterResult',
  );
  return CreateGlobalClusterResult.fromXml($result);
}