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

********************************
batch_get_attached_file_metadata
********************************



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

  

  Allows you to retrieve metadata about multiple attached files on an associated resource. Each attached file provided in the input list must be associated with the input AssociatedResourceArn.

  

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


  **Request Syntax**
  ::

    response = client.batch_get_attached_file_metadata(
        FileIds=[
            'string',
        ],
        InstanceId='string',
        AssociatedResourceArn='string'
    )
    
  :type FileIds: list
  :param FileIds: **[REQUIRED]** 

    The unique identifiers of the attached file resource.

    

  
    - *(string) --* 

    

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

    The unique identifier of the Connect instance.

    

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

    The resource to which the attached file is (being) uploaded to. The supported resources are `Cases <https://docs.aws.amazon.com/connect/latest/adminguide/cases.html>`__ and `Email <https://docs.aws.amazon.com/connect/latest/adminguide/setup-email-channel.html>`__.

     

    .. note::

      

      This value must be a valid ARN.

      

    

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

    
    ::

      {
          'Files': [
              {
                  'CreationTime': 'string',
                  'FileArn': 'string',
                  'FileId': 'string',
                  'FileName': 'string',
                  'FileSizeInBytes': 123,
                  'FileStatus': 'APPROVED'|'REJECTED'|'PROCESSING'|'FAILED',
                  'CreatedBy': {
                      'ConnectUserArn': 'string',
                      'AWSIdentityArn': 'string'
                  },
                  'FileUseCaseType': 'EMAIL_MESSAGE'|'ATTACHMENT',
                  'AssociatedResourceArn': 'string',
                  'Tags': {
                      'string': 'string'
                  }
              },
          ],
          'Errors': [
              {
                  'ErrorCode': 'string',
                  'ErrorMessage': 'string',
                  'FileId': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Files** *(list) --* 

        List of attached files that were successfully retrieved.

        
        

        - *(dict) --* 

          Information about the attached file.

          
          

          - **CreationTime** *(string) --* 

            The time of Creation of the file resource as an ISO timestamp. It's specified in ISO 8601 format: ``yyyy-MM-ddThh:mm:ss.SSSZ``. For example, ``2024-05-03T02:41:28.172Z``.

            
          

          - **FileArn** *(string) --* 

            The unique identifier of the attached file resource (ARN).

            
          

          - **FileId** *(string) --* 

            The unique identifier of the attached file resource.

            
          

          - **FileName** *(string) --* 

            A case-sensitive name of the attached file being uploaded.

            
          

          - **FileSizeInBytes** *(integer) --* 

            The size of the attached file in bytes.

            
          

          - **FileStatus** *(string) --* 

            The current status of the attached file.

            
          

          - **CreatedBy** *(dict) --* 

            Represents the identity that created the file.

            .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``ConnectUserArn``, ``AWSIdentityArn``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


          
            

            - **ConnectUserArn** *(string) --* 

              An agent ARN representing a `connect user <https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonconnect.html#amazonconnect-resources-for-iam-policies>`__.

              
            

            - **AWSIdentityArn** *(string) --* 

              STS or IAM ARN representing the identity of API Caller. SDK users cannot populate this and this value is calculated automatically if ``ConnectUserArn`` is not provided.

              
        
          

          - **FileUseCaseType** *(string) --* 

            The use case for the file.

            
          

          - **AssociatedResourceArn** *(string) --* 

            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.

              

            
          

          - **Tags** *(dict) --* 

            The tags used to organize, track, or control access for this resource. For example, ``{ "Tags": {"key1":"value1", "key2":"value2"} }``.

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
      
    
      

      - **Errors** *(list) --* 

        List of errors of attached files that could not be retrieved.

        
        

        - *(dict) --* 

          Error describing a failure to retrieve attached file metadata through BatchGetAttachedFileMetadata action.

          
          

          - **ErrorCode** *(string) --* 

            Status code describing the failure.

            
          

          - **ErrorMessage** *(string) --* 

            Why the attached file couldn't be retrieved.

            
          

          - **FileId** *(string) --* 

            The unique identifier of the attached file resource.

            
      
    
  
  **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`

  