DisassociateFileSystemCommand

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.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { StorageGatewayClient, DisassociateFileSystemCommand } from "@aws-sdk/client-storage-gateway"; // ES Modules import
// const { StorageGatewayClient, DisassociateFileSystemCommand } = require("@aws-sdk/client-storage-gateway"); // CommonJS import
const client = new StorageGatewayClient(config);
const input = { // DisassociateFileSystemInput
  FileSystemAssociationARN: "STRING_VALUE", // required
  ForceDelete: true || false,
};
const command = new DisassociateFileSystemCommand(input);
const response = await client.send(command);
// { // DisassociateFileSystemOutput
//   FileSystemAssociationARN: "STRING_VALUE",
// };

DisassociateFileSystemCommand Input

Parameter
Type
Description
FileSystemAssociationARN
Required
string | undefined

The Amazon Resource Name (ARN) of the file system association to be deleted.

ForceDelete
boolean | undefined

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.

DisassociateFileSystemCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
FileSystemAssociationARN
string | undefined

The Amazon Resource Name (ARN) of the deleted file system association.

Throws

Name
Fault
Details
InternalServerError
server

An internal server error has occurred during the request. For more information, see the error and message fields.

InvalidGatewayRequestException
client

An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

StorageGatewayServiceException
Base exception class for all service exceptions from StorageGateway service.