disassociateFileSystem method
Disassociates an Amazon FSx file system from the specified gateway. After the disassociation process finishes, the gateway can no longer access the Amazon FSx file system. This operation is only supported in the FSx File Gateway type.
May throw InternalServerError.
May throw InvalidGatewayRequestException.
Parameter fileSystemAssociationARN :
The Amazon Resource Name (ARN) of the file system association to be
deleted.
Parameter forceDelete :
If this value is set to true, the operation disassociates an Amazon FSx
file system immediately. It ends all data uploads to the file system, and
the file system association enters the FORCE_DELETING status.
If this value is set to false, the Amazon FSx file system does not
disassociate until all data is uploaded.
Implementation
Future<DisassociateFileSystemOutput> disassociateFileSystem({
required String fileSystemAssociationARN,
bool? forceDelete,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'StorageGateway_20130630.DisassociateFileSystem'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'FileSystemAssociationARN': fileSystemAssociationARN,
if (forceDelete != null) 'ForceDelete': forceDelete,
},
);
return DisassociateFileSystemOutput.fromJson(jsonResponse.body);
}