deleteFileShare method
Deletes a file share from an S3 File Gateway. This operation is only supported for S3 File Gateways.
May throw InternalServerError.
May throw InvalidGatewayRequestException.
Parameter fileShareARN :
The Amazon Resource Name (ARN) of the file share to be deleted.
Parameter forceDelete :
If this value is set to true, the operation deletes a file
share immediately and aborts all data uploads to Amazon Web Services.
Otherwise, the file share is not deleted until all data is uploaded to
Amazon Web Services. This process aborts the data upload process, and the
file share enters the FORCE_DELETING status.
Valid Values: true | false
Implementation
Future<DeleteFileShareOutput> deleteFileShare({
required String fileShareARN,
bool? forceDelete,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'StorageGateway_20130630.DeleteFileShare'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'FileShareARN': fileShareARN,
if (forceDelete != null) 'ForceDelete': forceDelete,
},
);
return DeleteFileShareOutput.fromJson(jsonResponse.body);
}