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 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 InternalServerError. May throw FileSystemNotFound. May throw FileSystemInUse.

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

Implementation

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