:doc:`B2BI <../../b2bi>` / Client / test_mapping

************
test_mapping
************



.. py:method:: B2BI.Client.test_mapping(**kwargs)

  

  Maps the input file according to the provided template file. The API call downloads the file contents from the Amazon S3 location, and passes the contents in as a string, to the ``inputFileContent`` parameter.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/b2bi-2022-06-23/TestMapping>`_  


  **Request Syntax**
  ::

    response = client.test_mapping(
        inputFileContent='string',
        mappingTemplate='string',
        fileFormat='XML'|'JSON'|'NOT_USED'
    )
    
  :type inputFileContent: string
  :param inputFileContent: **[REQUIRED]** 

    Specify the contents of the EDI (electronic data interchange) XML or JSON file that is used as input for the transform.

    

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

    Specifies the mapping template for the transformer. This template is used to map the parsed EDI file using JSONata or XSLT.

     

    .. note::

      

      This parameter is available for backwards compatibility. Use the `Mapping <https://docs.aws.amazon.com/b2bi/latest/APIReference/API_Mapping.html>`__ data type instead.

      

    

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

    Specifies that the currently supported file formats for EDI transformations are ``JSON`` and ``XML``.

    

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

    
    ::

      {
          'mappedFileContent': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **mappedFileContent** *(string) --* 

        Returns a string for the mapping that can be used to identify the mapping. Similar to a fingerprint

        
  
  **Exceptions**
  
  *   :py:class:`B2BI.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`B2BI.Client.exceptions.ValidationException`

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

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

  
  *   :py:class:`B2BI.Client.exceptions.InternalServerException`

  