batchUpdateCluster method

Future<BatchUpdateClusterResponse> batchUpdateCluster({
  1. required List<String> clusterNames,
  2. ServiceUpdateRequest? serviceUpdate,
})

Apply the service update to a list of clusters supplied. For more information on service updates and applying them, see Applying the service updates.

May throw InvalidParameterValueException. May throw ServiceUpdateNotFoundFault.

Parameter clusterNames : The cluster names to apply the updates.

Parameter serviceUpdate : The unique ID of the service update

Implementation

Future<BatchUpdateClusterResponse> batchUpdateCluster({
  required List<String> clusterNames,
  ServiceUpdateRequest? serviceUpdate,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonMemoryDB.BatchUpdateCluster'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ClusterNames': clusterNames,
      if (serviceUpdate != null) 'ServiceUpdate': serviceUpdate,
    },
  );

  return BatchUpdateClusterResponse.fromJson(jsonResponse.body);
}