B2BI / Client / generate_mapping
generate_mapping#
- B2BI.Client.generate_mapping(**kwargs)#
Takes sample input and output documents and uses Amazon Bedrock to generate a mapping automatically. Depending on the accuracy and other factors, you can then edit the mapping for your needs.
Note
Before you can use the AI-assisted feature for Amazon Web Services B2B Data Interchange you must enable models in Amazon Bedrock. For details, see AI-assisted template mapping prerequisites in the Amazon Web Services B2B Data Interchange User guide.
See also: AWS API Documentation
Request Syntax
response = client.generate_mapping( inputFileContent='string', outputFileContent='string', mappingType='JSONATA'|'XSLT' )
- Parameters:
inputFileContent (string) –
[REQUIRED]
Provide the contents of a sample X12 EDI file (for inbound EDI) or JSON/XML file (for outbound EDI) to use as a starting point for the mapping.
outputFileContent (string) –
[REQUIRED]
Provide the contents of a sample X12 EDI file (for outbound EDI) or JSON/XML file (for inbound EDI) to use as a target for the mapping.
mappingType (string) –
[REQUIRED]
Specify the mapping type: either
JSONATA
orXSLT.
- Return type:
dict
- Returns:
Response Syntax
{ 'mappingTemplate': 'string', 'mappingAccuracy': ... }
Response Structure
(dict) –
mappingTemplate (string) –
Returns a mapping template based on your inputs.
mappingAccuracy (float) –
Returns a percentage that estimates the accuracy of the generated mapping.
Exceptions