createGlobalCluster method
Creates a Neptune global database spread across multiple Amazon Regions. The global database contains a single primary cluster with read-write capability, and read-only secondary clusters that receive data from the primary cluster through high-speed replication performed by the Neptune storage subsystem.
You can create a global database that is initially empty, and then add a primary cluster and secondary clusters to it, or you can specify an existing Neptune cluster during the create operation to become the primary cluster of the global database.
May throw DBClusterNotFoundFault.
May throw GlobalClusterAlreadyExistsFault.
May throw GlobalClusterQuotaExceededFault.
May throw InvalidDBClusterStateFault.
Parameter globalClusterIdentifier :
The cluster identifier of the new global database cluster.
Parameter databaseName :
The name for the new global database (up to 64 alpha-numeric characters).
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 in the global database.
Valid values: neptune
Parameter engineVersion :
The Neptune engine version to be used by the global database.
Valid values: 1.2.0.0 or above.
Parameter sourceDBClusterIdentifier :
(Optional) The Amazon Resource Name (ARN) of an existing Neptune DB
cluster to use as the primary cluster of the new global database.
Parameter storageEncrypted :
The storage encryption setting for the new global database cluster.
Parameter tags :
Tags to assign to the global cluster.
Implementation
Future<CreateGlobalClusterResult> createGlobalCluster({
required String globalClusterIdentifier,
String? databaseName,
bool? deletionProtection,
String? engine,
String? engineVersion,
String? sourceDBClusterIdentifier,
bool? storageEncrypted,
List<Tag>? tags,
}) async {
final $request = <String, String>{
'GlobalClusterIdentifier': globalClusterIdentifier,
if (databaseName != null) 'DatabaseName': databaseName,
if (deletionProtection != null)
'DeletionProtection': deletionProtection.toString(),
if (engine != null) 'Engine': engine,
if (engineVersion != null) 'EngineVersion': engineVersion,
if (sourceDBClusterIdentifier != null)
'SourceDBClusterIdentifier': sourceDBClusterIdentifier,
if (storageEncrypted != null)
'StorageEncrypted': storageEncrypted.toString(),
if (tags != null)
if (tags.isEmpty)
'Tags': ''
else
for (var i1 = 0; i1 < tags.length; i1++)
for (var e3 in tags[i1].toQueryMap().entries)
'Tags.Tag.${i1 + 1}.${e3.key}': e3.value,
};
final $result = await _protocol.send(
$request,
action: 'CreateGlobalCluster',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'CreateGlobalClusterResult',
);
return CreateGlobalClusterResult.fromXml($result);
}