clients/client-b2bi/README.md
AWS SDK for JavaScript B2bi Client for Node.js, Browser and React Native.
<p>This is the <i>Amazon Web Services B2B Data Interchange API Reference</i>. It provides descriptions, API request parameters, and the XML response for each of the B2BI API actions.</p> <p>B2BI enables automated exchange of EDI (electronic data interchange) based business-critical transactions at cloud scale, with elasticity and pay-as-you-go pricing. Businesses use EDI documents to exchange transactional data with trading partners, such as suppliers and end customers, using standardized formats such as X12.</p> <note> <p>Rather than actually running a command, you can use the <code>--generate-cli-skeleton</code> parameter with any API call to generate and display a parameter template. You can then use the generated template to customize and use as input on a later command. For details, see <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-skeleton.html#cli-usage-skeleton-generate">Generate and use a parameter skeleton file</a>.</p> </note>To install this package, use the CLI of your favorite package manager:
npm install @aws-sdk/client-b2biyarn add @aws-sdk/client-b2bipnpm add @aws-sdk/client-b2biThe AWS SDK is modulized by clients and commands.
To send a request, you only need to import the B2biClient and
the commands you need, for example ListCapabilitiesCommand:
// ES5 example
const { B2biClient, ListCapabilitiesCommand } = require("@aws-sdk/client-b2bi");
// ES6+ example
import { B2biClient, ListCapabilitiesCommand } from "@aws-sdk/client-b2bi";
To send a request:
send operation on the client, providing the command object as input.const client = new B2biClient({ region: "REGION" });
const params = { /** input parameters */ };
const command = new ListCapabilitiesCommand(params);
We recommend using the await operator to wait for the promise returned by send operation as follows:
// async/await.
try {
const data = await client.send(command);
// process data.
} catch (error) {
// error handling.
} finally {
// finally.
}
You can also use Promise chaining.
client
.send(command)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
})
.finally(() => {
// finally.
});
The aggregated client class is exported from the same package, but without the "Client" suffix.
B2bi extends B2biClient and additionally supports all operations, waiters, and paginators as methods.
This style may be familiar to you from the AWS SDK for JavaScript v2.
If you are bundling the AWS SDK, we recommend using only the bare-bones client (B2biClient).
More details are in the blog post on
modular packages in AWS SDK for JavaScript.
import { B2bi } from "@aws-sdk/client-b2bi";
const client = new B2bi({ region: "REGION" });
// async/await.
try {
const data = await client.listCapabilities(params);
// process data.
} catch (error) {
// error handling.
}
// Promises.
client
.listCapabilities(params)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
});
// callbacks (not recommended).
client.listCapabilities(params, (err, data) => {
// process err and data.
});
When the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).
try {
const data = await client.send(command);
// process data.
} catch (error) {
const { requestId, cfId, extendedRequestId } = error.$metadata;
console.log({ requestId, cfId, extendedRequestId });
/**
* The keys within exceptions are also parsed.
* You can access them by specifying exception names:
* if (error.name === 'SomeServiceException') {
* const value = error.specialKeyInException;
* }
*/
}
See also docs/ERROR_HANDLING.
Please use these community resources for getting help. We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
aws-sdk-js
on AWS Developer Blog.aws-sdk-js.To test your universal JavaScript code in Node.js, browser and react-native environments, visit our code samples repo.
This client code is generated automatically. Any modifications will be overwritten the next time the @aws-sdk/client-b2bi package is updated.
To contribute to client you can check our generate clients scripts.
This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.
Command API Reference / Input / Output
</details> <details> <summary> CreatePartnership </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateProfile </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateStarterMappingTemplate </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateTransformer </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteCapability </summary>Command API Reference / Input / Output
</details> <details> <summary> DeletePartnership </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteProfile </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteTransformer </summary>Command API Reference / Input / Output
</details> <details> <summary> GenerateMapping </summary>Command API Reference / Input / Output
</details> <details> <summary> GetCapability </summary>Command API Reference / Input / Output
</details> <details> <summary> GetPartnership </summary>Command API Reference / Input / Output
</details> <details> <summary> GetProfile </summary>Command API Reference / Input / Output
</details> <details> <summary> GetTransformer </summary>Command API Reference / Input / Output
</details> <details> <summary> GetTransformerJob </summary>Command API Reference / Input / Output
</details> <details> <summary> ListCapabilities </summary>Command API Reference / Input / Output
</details> <details> <summary> ListPartnerships </summary>Command API Reference / Input / Output
</details> <details> <summary> ListProfiles </summary>Command API Reference / Input / Output
</details> <details> <summary> ListTagsForResource </summary>Command API Reference / Input / Output
</details> <details> <summary> ListTransformers </summary>Command API Reference / Input / Output
</details> <details> <summary> StartTransformerJob </summary>Command API Reference / Input / Output
</details> <details> <summary> TagResource </summary>Command API Reference / Input / Output
</details> <details> <summary> TestConversion </summary>Command API Reference / Input / Output
</details> <details> <summary> TestMapping </summary>Command API Reference / Input / Output
</details> <details> <summary> TestParsing </summary>Command API Reference / Input / Output
</details> <details> <summary> UntagResource </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateCapability </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdatePartnership </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateProfile </summary> </details> <details> <summary> UpdateTransformer </summary> </details>