updateFileCache method
Updates the configuration of an existing Amazon File Cache resource. You can update multiple properties in a single request.
May throw BadRequest.
May throw FileCacheNotFound.
May throw IncompatibleParameterError.
May throw InternalServerError.
May throw MissingFileCacheConfiguration.
May throw ServiceLimitExceeded.
May throw UnsupportedOperation.
Parameter fileCacheId :
The ID of the cache that you are updating.
Parameter lustreConfiguration :
The configuration updates for an Amazon File Cache resource.
Implementation
Future<UpdateFileCacheResponse> updateFileCache({
required String fileCacheId,
String? clientRequestToken,
UpdateFileCacheLustreConfiguration? lustreConfiguration,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSSimbaAPIService_v20180301.UpdateFileCache'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'FileCacheId': fileCacheId,
'ClientRequestToken':
clientRequestToken ?? _s.generateIdempotencyToken(),
if (lustreConfiguration != null)
'LustreConfiguration': lustreConfiguration,
},
);
return UpdateFileCacheResponse.fromJson(jsonResponse.body);
}