updateFileSystem method
- required String fileSystemId,
- double? provisionedThroughputInMibps,
- ThroughputMode? throughputMode,
Updates the throughput mode or the amount of provisioned throughput of an existing file system.
May throw BadRequest. May throw FileSystemNotFound. May throw IncorrectFileSystemLifeCycleState. May throw InsufficientThroughputCapacity. May throw InternalServerError. May throw ThroughputLimitExceeded. May throw TooManyRequests.
Parameter fileSystemId
:
The ID of the file system that you want to update.
Parameter provisionedThroughputInMibps
:
(Optional) The amount of throughput, in MiB/s, that you want to provision
for your file system. Valid values are 1-1024. Required if
ThroughputMode
is changed to provisioned
on
update. If you're not updating the amount of provisioned throughput for
your file system, you don't need to provide this value in your request.
Parameter throughputMode
:
(Optional) The throughput mode that you want your file system to use. If
you're not updating your throughput mode, you don't need to provide this
value in your request. If you are changing the ThroughputMode
to provisioned
, you must also set a value for
ProvisionedThroughputInMibps
.
Implementation
Future<FileSystemDescription> updateFileSystem({
required String fileSystemId,
double? provisionedThroughputInMibps,
ThroughputMode? throughputMode,
}) async {
ArgumentError.checkNotNull(fileSystemId, 'fileSystemId');
_s.validateStringLength(
'fileSystemId',
fileSystemId,
0,
128,
isRequired: true,
);
_s.validateNumRange(
'provisionedThroughputInMibps',
provisionedThroughputInMibps,
1,
1152921504606846976,
);
final $payload = <String, dynamic>{
if (provisionedThroughputInMibps != null)
'ProvisionedThroughputInMibps': provisionedThroughputInMibps,
if (throughputMode != null) 'ThroughputMode': throughputMode.toValue(),
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/2015-02-01/file-systems/${Uri.encodeComponent(fileSystemId)}',
exceptionFnMap: _exceptionFns,
);
return FileSystemDescription.fromJson(response);
}