updateBrokerStorage method

Future<UpdateBrokerStorageResponse> updateBrokerStorage({
  1. required String clusterArn,
  2. required String currentVersion,
  3. required List<BrokerEBSVolumeInfo> targetBrokerEBSVolumeInfo,
})

Updates the EBS storage associated with MSK brokers.

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

Parameter clusterArn :

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

Parameter currentVersion :

The version of cluster to update from. A successful operation will then generate a new version.

Parameter targetBrokerEBSVolumeInfo :

Describes the target volume size and the ID of the broker to apply the update to.

Implementation

Future<UpdateBrokerStorageResponse> updateBrokerStorage({
  required String clusterArn,
  required String currentVersion,
  required List<BrokerEBSVolumeInfo> targetBrokerEBSVolumeInfo,
}) async {
  ArgumentError.checkNotNull(clusterArn, 'clusterArn');
  ArgumentError.checkNotNull(currentVersion, 'currentVersion');
  ArgumentError.checkNotNull(
      targetBrokerEBSVolumeInfo, 'targetBrokerEBSVolumeInfo');
  final $payload = <String, dynamic>{
    'currentVersion': currentVersion,
    'targetBrokerEBSVolumeInfo': targetBrokerEBSVolumeInfo,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/v1/clusters/${Uri.encodeComponent(clusterArn)}/nodes/storage',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateBrokerStorageResponse.fromJson(response);
}