evictFilesFailingUpload method

Future<EvictFilesFailingUploadOutput> evictFilesFailingUpload({
  1. required String fileShareARN,
  2. bool? forceRemove,
})

Starts a process that cleans the specified file share's cache of file entries that are failing upload to Amazon S3. This API operation reports success if the request is received with valid arguments, and there are no other cache clean operations currently in-progress for the specified file share. After a successful request, the cache clean operation occurs asynchronously and reports progress using CloudWatch logs and notifications.

May throw InternalServerError. May throw InvalidGatewayRequestException.

Parameter fileShareARN : The Amazon Resource Name (ARN) of the file share for which you want to start the cache clean operation.

Parameter forceRemove : Specifies whether cache entries with full or partial file data currently stored on the gateway will be forcibly removed by the cache clean operation.

Valid arguments:

  • False - The cache clean operation skips cache entries failing upload if they are associated with data currently stored on the gateway. This preserves the cached data.
  • True - The cache clean operation removes cache entries failing upload even if they are associated with data currently stored on the gateway. This deletes the cached data.

Implementation

Future<EvictFilesFailingUploadOutput> evictFilesFailingUpload({
  required String fileShareARN,
  bool? forceRemove,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'StorageGateway_20130630.EvictFilesFailingUpload'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'FileShareARN': fileShareARN,
      if (forceRemove != null) 'ForceRemove': forceRemove,
    },
  );

  return EvictFilesFailingUploadOutput.fromJson(jsonResponse.body);
}