Protected
Creates a mapping definition. A mapping definition describes how to turn input JSON into output JSON.
Use a bare-bones client and the command you need to make an API call.
import { MappingsClient, CreateMappingCommand } from "@stedi/sdk-client-mappings"; // ES Modules import// const { MappingsClient, CreateMappingCommand } = require("@stedi/sdk-client-mappings"); // CommonJS importconst client = new MappingsClient(config);const input = { // CreateMappingInput name: "STRING_VALUE", // required mapping: "STRING_VALUE", // required type: "only_mapped_keys" || "merge_with_target_example" || "pass_through", // required source: { // MappingSource name: "STRING_VALUE", type: "jsonschema@2020-12", // required content: "STRING_VALUE", // required connection: { // MappingDocumentConnection Union: only one key present stediGuides: { // MappingDocumentStediGuidesConnection guideId: "STRING_VALUE", // required guideName: "STRING_VALUE", subGuideName: "STRING_VALUE", ediSampleId: "STRING_VALUE", ediSamplesNames: [ // EDISamplesNames "STRING_VALUE", ], pulledAt: "STRING_VALUE", // required }, stediEvents: { // MappingDocumentStediEventsConnection eventType: "STRING_VALUE", // required guideId: "STRING_VALUE", guideName: "STRING_VALUE", subGuideName: "STRING_VALUE", ediSampleId: "STRING_VALUE", ediSamplesNames: [ "STRING_VALUE", ], pulledAt: "STRING_VALUE", // required }, }, }, target: { // MappingTarget name: "STRING_VALUE", type: "jsonschema@2020-12", // required content: "STRING_VALUE", // required connection: {// Union: only one key present stediGuides: { guideId: "STRING_VALUE", // required guideName: "STRING_VALUE", subGuideName: "STRING_VALUE", ediSampleId: "STRING_VALUE", ediSamplesNames: [ "STRING_VALUE", ], pulledAt: "STRING_VALUE", // required }, stediEvents: { eventType: "STRING_VALUE", // required guideId: "STRING_VALUE", guideName: "STRING_VALUE", subGuideName: "STRING_VALUE", ediSampleId: "STRING_VALUE", ediSamplesNames: [ "STRING_VALUE", ], pulledAt: "STRING_VALUE", // required }, }, }, lookupTables: [ // LookupTables { // LookupTable name: "STRING_VALUE", // required values: [ // LookupTableValues // required { // LookupTableValuesMember "<keys>": "STRING_VALUE", }, ], }, ],};const command = new CreateMappingCommand(input);const response = await client.send(command);// { // CreateMappingOutput// id: "STRING_VALUE", // required// name: "STRING_VALUE", // required// mapping: "STRING_VALUE", // required// type: "only_mapped_keys" || "merge_with_target_example" || "pass_through", // required// source: { // MappingSource// name: "STRING_VALUE",// type: "jsonschema@2020-12", // required// content: "STRING_VALUE", // required// connection: { // MappingDocumentConnection Union: only one key present// stediGuides: { // MappingDocumentStediGuidesConnection// guideId: "STRING_VALUE", // required// guideName: "STRING_VALUE",// subGuideName: "STRING_VALUE",// ediSampleId: "STRING_VALUE",// ediSamplesNames: [ // EDISamplesNames// "STRING_VALUE",// ],// pulledAt: "STRING_VALUE", // required// },// stediEvents: { // MappingDocumentStediEventsConnection// eventType: "STRING_VALUE", // required// guideId: "STRING_VALUE",// guideName: "STRING_VALUE",// subGuideName: "STRING_VALUE",// ediSampleId: "STRING_VALUE",// ediSamplesNames: [// "STRING_VALUE",// ],// pulledAt: "STRING_VALUE", // required// },// },// },// target: { // MappingTarget// name: "STRING_VALUE",// type: "jsonschema@2020-12", // required// content: "STRING_VALUE", // required// connection: {// Union: only one key present// stediGuides: {// guideId: "STRING_VALUE", // required// guideName: "STRING_VALUE",// subGuideName: "STRING_VALUE",// ediSampleId: "STRING_VALUE",// ediSamplesNames: [// "STRING_VALUE",// ],// pulledAt: "STRING_VALUE", // required// },// stediEvents: {// eventType: "STRING_VALUE", // required// guideId: "STRING_VALUE",// guideName: "STRING_VALUE",// subGuideName: "STRING_VALUE",// ediSampleId: "STRING_VALUE",// ediSamplesNames: [// "STRING_VALUE",// ],// pulledAt: "STRING_VALUE", // required// },// },// },// lookupTables: [ // LookupTables // required// { // LookupTable// name: "STRING_VALUE", // required// values: [ // LookupTableValues // required// { // LookupTableValuesMember// "<keys>": "STRING_VALUE",// },// ],// },// ],// lockStatus: "unlocked" || "locked", // required// lockingScope: [ // MappingLockScopeList // required// "mapping" || "source" || "target" || "lookup_tables",// ],// lockedBy: "STRING_VALUE",// unpublishedChanges: true || false, // required// publishedAt: "STRING_VALUE",// createdAt: "STRING_VALUE", // required// updatedAt: "STRING_VALUE", // required// };
CreateMappingCommandInput
CreateMappingCommandOutput
input
response
config
AccessDeniedException (client fault) The server response for authorization failure.
ResourceConflictException (client fault) The server could not process the request because of conflict in the current state of the resource.
ThrottlingException (client fault) The server response when usage plan or account-level throttling limits exceeded.
UnauthorizedException (client fault) The server response when the authorizer failed to authenticate the caller.
RequestTooLargeException (client fault) The server response for the request too large error.
ResponseTooLargeException (client fault) The server response for the request too large error.
MappingValidationException (client fault) The server cannot process the request due to an apparent client error.
UnprocessableEntityException (client fault)
MappingsServiceException
Base exception class for all service exceptions from Mappings service.
Readonly
Static
Creates a mapping definition. A mapping definition describes how to turn input JSON into output JSON.
Example
Use a bare-bones client and the command you need to make an API call.
Param
CreateMappingCommandInput
Returns
CreateMappingCommandOutput
See
input
shape.response
shape.config
shape.Throws
AccessDeniedException (client fault) The server response for authorization failure.
Throws
ResourceConflictException (client fault) The server could not process the request because of conflict in the current state of the resource.
Throws
ThrottlingException (client fault) The server response when usage plan or account-level throttling limits exceeded.
Throws
UnauthorizedException (client fault) The server response when the authorizer failed to authenticate the caller.
Throws
RequestTooLargeException (client fault) The server response for the request too large error.
Throws
ResponseTooLargeException (client fault) The server response for the request too large error.
Throws
MappingValidationException (client fault) The server cannot process the request due to an apparent client error.
Throws
UnprocessableEntityException (client fault)
Throws
MappingsServiceException
Base exception class for all service exceptions from Mappings service.