Skip to content

disassociate_file_system async

disassociate_file_system(
    file_system_association_arn: FileSystemAssociationARN,
    *,
    config_overrides: Optional[AsyncStorageGatewayClientConfig] = None,
    force_delete: Optional[Boolean2] = None,
) -> DisassociateFileSystemOutput

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.

Parameters:

  • file_system_association_arn (FileSystemAssociationARN) –

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

  • force_delete (Optional[Boolean2], default: None ) –

    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.

Raises:

  • InternalServerError –

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

  • InvalidGatewayRequestException –

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

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_storage_gateway/_services/async_storage_gateway.py
async def disassociate_file_system(
    self,
    file_system_association_arn: "capo_storage_gateway.types.file_system_association_arn.FileSystemAssociationARN",
    *,
    config_overrides: Optional[AsyncStorageGatewayClientConfig] = None,
    force_delete: Optional["capo_storage_gateway.types.boolean2.Boolean2"] = None,
) -> "capo_storage_gateway.types.disassociate_file_system_output.DisassociateFileSystemOutput":
    """<p>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.</p>

    Args:
        file_system_association_arn: <p>The Amazon Resource Name (ARN) of the file system association to be deleted.</p>
        force_delete: <p>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 <code>FORCE_DELETING</code> status. If this value is set to false, the Amazon FSx file system does not disassociate until all data is uploaded.</p>

    Raises:
        capo_storage_gateway.errors.internal_server_error.InternalServerError: <p>An internal server error has occurred during the request. For more information, see the error and message fields.</p>
        capo_storage_gateway.errors.invalid_gateway_request_exception.InvalidGatewayRequestException: <p>An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.</p>
        capo_storage_gateway.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_storage_gateway.types.disassociate_file_system_input.DisassociateFileSystemInput]",
    ) -> AsyncOperationResponse[
        "capo_storage_gateway.types.disassociate_file_system_output.DisassociateFileSystemOutput"
    ]:
        import capo_storage_gateway._operations.storage_gateway_20130630.disassociate_file_system

        (
            output,
            http_response,
        ) = await capo_storage_gateway._operations.storage_gateway_20130630.disassociate_file_system.async_disassociate_file_system(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DisassociateFileSystem")
    )
    input_: capo_storage_gateway.types.disassociate_file_system_input.DisassociateFileSystemInput = {
        "file_system_association_arn": file_system_association_arn
    }
    if force_delete is not None:
        input_["force_delete"] = force_delete

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output