:doc:`Connect <../../connect>` / Client / delete_attached_file

********************
delete_attached_file
********************



.. py:method:: Connect.Client.delete_attached_file(**kwargs)

  

  Deletes an attached file along with the underlying S3 Object.

   

  .. warning::

     

    The attached file is **permanently deleted** if S3 bucket versioning is not enabled.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/connect-2017-08-08/DeleteAttachedFile>`_  


  **Request Syntax**
  ::

    response = client.delete_attached_file(
        InstanceId='string',
        FileId='string',
        AssociatedResourceArn='string'
    )
    
  :type InstanceId: string
  :param InstanceId: **[REQUIRED]** 

    The unique identifier of the Connect instance.

    

  
  :type FileId: string
  :param FileId: **[REQUIRED]** 

    The unique identifier of the attached file resource.

    

  
  :type AssociatedResourceArn: string
  :param AssociatedResourceArn: **[REQUIRED]** 

    The resource to which the attached file is (being) uploaded to. `Cases <https://docs.aws.amazon.com/connect/latest/APIReference/API_connect-cases_CreateCase.html>`__ are the only current supported resource.

     

    .. note::

      

      This value must be a valid ARN.

      

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* Response from DeleteAttachedFile API
  
  **Exceptions**
  
  *   :py:class:`Connect.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`Connect.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`Connect.Client.exceptions.InternalServiceException`

  
  *   :py:class:`Connect.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`Connect.Client.exceptions.ThrottlingException`

  