updateMultiRegionCluster method

Future<UpdateMultiRegionClusterResponse> updateMultiRegionCluster({
  1. required String multiRegionClusterName,
  2. String? description,
  3. String? engineVersion,
  4. String? multiRegionParameterGroupName,
  5. String? nodeType,
  6. ShardConfigurationRequest? shardConfiguration,
  7. UpdateStrategy? updateStrategy,
})

Updates the configuration of an existing multi-Region cluster.

May throw InvalidMultiRegionClusterStateFault. May throw InvalidParameterCombinationException. May throw InvalidParameterValueException. May throw MultiRegionClusterNotFoundFault. May throw MultiRegionParameterGroupNotFoundFault.

Parameter multiRegionClusterName : The name of the multi-Region cluster to be updated.

Parameter description : A new description for the multi-Region cluster.

Parameter engineVersion : The new engine version to be used for the multi-Region cluster.

Parameter multiRegionParameterGroupName : The new multi-Region parameter group to be associated with the cluster.

Parameter nodeType : The new node type to be used for the multi-Region cluster.

Parameter updateStrategy : The strategy to use for the update operation. Supported values are "coordinated" or "uncoordinated".

Implementation

Future<UpdateMultiRegionClusterResponse> updateMultiRegionCluster({
  required String multiRegionClusterName,
  String? description,
  String? engineVersion,
  String? multiRegionParameterGroupName,
  String? nodeType,
  ShardConfigurationRequest? shardConfiguration,
  UpdateStrategy? updateStrategy,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonMemoryDB.UpdateMultiRegionCluster'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'MultiRegionClusterName': multiRegionClusterName,
      if (description != null) 'Description': description,
      if (engineVersion != null) 'EngineVersion': engineVersion,
      if (multiRegionParameterGroupName != null)
        'MultiRegionParameterGroupName': multiRegionParameterGroupName,
      if (nodeType != null) 'NodeType': nodeType,
      if (shardConfiguration != null)
        'ShardConfiguration': shardConfiguration,
      if (updateStrategy != null) 'UpdateStrategy': updateStrategy.value,
    },
  );

  return UpdateMultiRegionClusterResponse.fromJson(jsonResponse.body);
}