updateClusterKafkaVersion method

Future<UpdateClusterKafkaVersionResponse> updateClusterKafkaVersion({
  1. required String clusterArn,
  2. required String currentVersion,
  3. required String targetKafkaVersion,
  4. ConfigurationInfo? configurationInfo,
})

Updates the Apache Kafka version for the cluster.

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

Parameter clusterArn :

The Amazon Resource Name (ARN) of the cluster to be updated.

Parameter currentVersion :

Current cluster version.

Parameter targetKafkaVersion :

Target Kafka version.

Parameter configurationInfo :

The custom configuration that should be applied on the new version of cluster.

Implementation

Future<UpdateClusterKafkaVersionResponse> updateClusterKafkaVersion({
  required String clusterArn,
  required String currentVersion,
  required String targetKafkaVersion,
  ConfigurationInfo? configurationInfo,
}) async {
  ArgumentError.checkNotNull(clusterArn, 'clusterArn');
  ArgumentError.checkNotNull(currentVersion, 'currentVersion');
  ArgumentError.checkNotNull(targetKafkaVersion, 'targetKafkaVersion');
  final $payload = <String, dynamic>{
    'currentVersion': currentVersion,
    'targetKafkaVersion': targetKafkaVersion,
    if (configurationInfo != null) 'configurationInfo': configurationInfo,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/v1/clusters/${Uri.encodeComponent(clusterArn)}/version',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateClusterKafkaVersionResponse.fromJson(response);
}