createMultiRegionCluster method
Creates a new multi-Region cluster.
May throw ClusterQuotaForCustomerExceededFault.
May throw InvalidParameterCombinationException.
May throw InvalidParameterValueException.
May throw MultiRegionClusterAlreadyExistsFault.
May throw MultiRegionParameterGroupNotFoundFault.
May throw TagQuotaPerResourceExceeded.
Parameter multiRegionClusterNameSuffix :
A suffix to be added to the Multi-Region cluster name. Amazon MemoryDB
automatically applies a prefix to the Multi-Region cluster Name when it is
created. Each Amazon Region has its own prefix. For instance, a
Multi-Region cluster Name created in the US-West-1 region will begin with
"virxk", along with the suffix name you provide. The suffix guarantees
uniqueness of the Multi-Region cluster name across multiple regions.
Parameter nodeType :
The node type to be used for the multi-Region cluster.
Parameter description :
A description for the multi-Region cluster.
Parameter engine :
The name of the engine to be used for the multi-Region cluster.
Parameter engineVersion :
The version of the engine to be used for the multi-Region cluster.
Parameter multiRegionParameterGroupName :
The name of the multi-Region parameter group to be associated with the
cluster.
Parameter numShards :
The number of shards for the multi-Region cluster.
Parameter tLSEnabled :
Whether to enable TLS encryption for the multi-Region cluster.
Parameter tags :
A list of tags to be applied to the multi-Region cluster.
Implementation
Future<CreateMultiRegionClusterResponse> createMultiRegionCluster({
required String multiRegionClusterNameSuffix,
required String nodeType,
String? description,
String? engine,
String? engineVersion,
String? multiRegionParameterGroupName,
int? numShards,
bool? tLSEnabled,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonMemoryDB.CreateMultiRegionCluster'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'MultiRegionClusterNameSuffix': multiRegionClusterNameSuffix,
'NodeType': nodeType,
if (description != null) 'Description': description,
if (engine != null) 'Engine': engine,
if (engineVersion != null) 'EngineVersion': engineVersion,
if (multiRegionParameterGroupName != null)
'MultiRegionParameterGroupName': multiRegionParameterGroupName,
if (numShards != null) 'NumShards': numShards,
if (tLSEnabled != null) 'TLSEnabled': tLSEnabled,
if (tags != null) 'Tags': tags,
},
);
return CreateMultiRegionClusterResponse.fromJson(jsonResponse.body);
}