updateTopic method
Updates the configuration of the specified topic.
May throw BadRequestException.
May throw ClusterConnectivityException.
May throw ControllerMovedException.
May throw ForbiddenException.
May throw GroupSubscribedToTopicException.
May throw InternalServerErrorException.
May throw KafkaRequestException.
May throw KafkaTimeoutException.
May throw NotControllerException.
May throw NotFoundException.
May throw ReassignmentInProgressException.
May throw ServiceUnavailableException.
May throw UnauthorizedException.
May throw UnknownTopicOrPartitionException.
Parameter clusterArn :
The Amazon Resource Name (ARN) that uniquely identifies the cluster.
Parameter topicName :
The name of the topic to update configuration for.
Parameter configs :
The new topic configurations encoded as a Base64 string.
Parameter partitionCount :
The new total number of partitions for the topic.
Implementation
Future<UpdateTopicResponse> updateTopic({
required String clusterArn,
required String topicName,
String? configs,
int? partitionCount,
}) async {
final $payload = <String, dynamic>{
if (configs != null) 'configs': configs,
if (partitionCount != null) 'partitionCount': partitionCount,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/v1/clusters/${Uri.encodeComponent(clusterArn)}/topics/${Uri.encodeComponent(topicName)}',
exceptionFnMap: _exceptionFns,
);
return UpdateTopicResponse.fromJson(response);
}