updateClusterConfiguration method

Future<UpdateClusterConfigurationResponse> updateClusterConfiguration({
  1. required String clusterArn,
  2. required ConfigurationInfo configurationInfo,
  3. required String currentVersion,
})

Updates the cluster with the configuration that is specified in the request body.

May throw BadRequestException. May throw UnauthorizedException. May throw InternalServerErrorException. May throw ForbiddenException. May throw NotFoundException. May throw ServiceUnavailableException.

Parameter clusterArn :

The Amazon Resource Name (ARN) that uniquely identifies the cluster.

Parameter configurationInfo :

Represents the configuration that you want MSK to use for the brokers in a cluster.

Parameter currentVersion :

The version of the cluster that needs to be updated.

Implementation

Future<UpdateClusterConfigurationResponse> updateClusterConfiguration({
  required String clusterArn,
  required ConfigurationInfo configurationInfo,
  required String currentVersion,
}) async {
  ArgumentError.checkNotNull(clusterArn, 'clusterArn');
  ArgumentError.checkNotNull(configurationInfo, 'configurationInfo');
  ArgumentError.checkNotNull(currentVersion, 'currentVersion');
  final $payload = <String, dynamic>{
    'configurationInfo': configurationInfo,
    'currentVersion': currentVersion,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/v1/clusters/${Uri.encodeComponent(clusterArn)}/configuration',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateClusterConfigurationResponse.fromJson(response);
}