updateStorage method
Updates cluster broker volume size (or) sets cluster storage mode to TIERED.
May throw BadRequestException.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw NotFoundException.
May throw ServiceUnavailableException.
May throw TooManyRequestsException.
May throw UnauthorizedException.
Parameter clusterArn :
The Amazon Resource Name (ARN) of the cluster to be updated.
Parameter currentVersion :
The version of cluster to update from. A successful operation will then
generate a new version.
Parameter provisionedThroughput :
EBS volume provisioned throughput information.
Parameter storageMode :
Controls storage mode for supported storage tiers.
Parameter volumeSizeGB :
size of the EBS volume to update.
Implementation
Future<UpdateStorageResponse> updateStorage({
required String clusterArn,
required String currentVersion,
ProvisionedThroughput? provisionedThroughput,
StorageMode? storageMode,
int? volumeSizeGB,
}) async {
final $payload = <String, dynamic>{
'currentVersion': currentVersion,
if (provisionedThroughput != null)
'provisionedThroughput': provisionedThroughput,
if (storageMode != null) 'storageMode': storageMode.value,
if (volumeSizeGB != null) 'volumeSizeGB': volumeSizeGB,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/v1/clusters/${Uri.encodeComponent(clusterArn)}/storage',
exceptionFnMap: _exceptionFns,
);
return UpdateStorageResponse.fromJson(response);
}