deleteFileSystem method

Future<void> deleteFileSystem({
  1. required String fileSystemId,
})

Deletes a file system, permanently severing access to its contents. Upon return, the file system no longer exists and you can't access any contents of the deleted file system.

You need to manually delete mount targets attached to a file system before you can delete an EFS file system. This step is performed for you when you use the Amazon Web Services console to delete a file system. You can't delete a file system that is in use. That is, if the file system has any mount targets, you must first delete them. For more information, see DescribeMountTargets and DeleteMountTarget. This operation requires permissions for the elasticfilesystem:DeleteFileSystem action.

May throw BadRequest. May throw FileSystemInUse. May throw FileSystemNotFound. May throw InternalServerError.

Parameter fileSystemId : The ID of the file system you want to delete.

Implementation

Future<void> deleteFileSystem({
  required String fileSystemId,
}) async {
  await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/2015-02-01/file-systems/${Uri.encodeComponent(fileSystemId)}',
    exceptionFnMap: _exceptionFns,
  );
}