clients/client-chatbot/README.md
AWS SDK for JavaScript Chatbot Client for Node.js, Browser and React Native.
<p>The <i>AWS Chatbot API Reference</i> provides descriptions, API request parameters, and the XML response for each of the AWS Chatbot API actions.</p> <p>AWS Chatbot APIs are currently available in the following Regions:</p> <ul> <li> <p>US East (Ohio) - <code>us-east-2</code> </p> </li> <li> <p>US West (Oregon) - <code>us-west-2</code> </p> </li> <li> <p>Asia Pacific (Singapore) - <code>ap-southeast-1</code> </p> </li> <li> <p>Europe (Ireland) - <code>eu-west-1</code> </p> </li> </ul> <p>The AWS Chatbot console can only be used in US East (Ohio). Your configuration data however, is stored in each of the relevant available Regions.</p> <note> <p>Your AWS CloudTrail events are logged in whatever Region you call from, not US East (N. Virginia) by default.</p> </note>To install this package, use the CLI of your favorite package manager:
npm install @aws-sdk/client-chatbotyarn add @aws-sdk/client-chatbotpnpm add @aws-sdk/client-chatbotThe AWS SDK is modulized by clients and commands.
To send a request, you only need to import the ChatbotClient and
the commands you need, for example ListCustomActionsCommand:
// ES5 example
const { ChatbotClient, ListCustomActionsCommand } = require("@aws-sdk/client-chatbot");
// ES6+ example
import { ChatbotClient, ListCustomActionsCommand } from "@aws-sdk/client-chatbot";
To send a request:
send operation on the client, providing the command object as input.const client = new ChatbotClient({ region: "REGION" });
const params = { /** input parameters */ };
const command = new ListCustomActionsCommand(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.
Chatbot extends ChatbotClient 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 (ChatbotClient).
More details are in the blog post on
modular packages in AWS SDK for JavaScript.
import { Chatbot } from "@aws-sdk/client-chatbot";
const client = new Chatbot({ region: "REGION" });
// async/await.
try {
const data = await client.listCustomActions(params);
// process data.
} catch (error) {
// error handling.
}
// Promises.
client
.listCustomActions(params)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
});
// callbacks (not recommended).
client.listCustomActions(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-chatbot 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> CreateChimeWebhookConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateCustomAction </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateMicrosoftTeamsChannelConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateSlackChannelConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteChimeWebhookConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteCustomAction </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteMicrosoftTeamsChannelConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteMicrosoftTeamsConfiguredTeam </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteMicrosoftTeamsUserIdentity </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteSlackChannelConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteSlackUserIdentity </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteSlackWorkspaceAuthorization </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeChimeWebhookConfigurations </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeSlackChannelConfigurations </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeSlackUserIdentities </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeSlackWorkspaces </summary>Command API Reference / Input / Output
</details> <details> <summary> DisassociateFromConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> GetAccountPreferences </summary>Command API Reference / Input / Output
</details> <details> <summary> GetCustomAction </summary>Command API Reference / Input / Output
</details> <details> <summary> GetMicrosoftTeamsChannelConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> ListAssociations </summary>Command API Reference / Input / Output
</details> <details> <summary> ListCustomActions </summary>Command API Reference / Input / Output
</details> <details> <summary> ListMicrosoftTeamsChannelConfigurations </summary>Command API Reference / Input / Output
</details> <details> <summary> ListMicrosoftTeamsConfiguredTeams </summary>Command API Reference / Input / Output
</details> <details> <summary> ListMicrosoftTeamsUserIdentities </summary>Command API Reference / Input / Output
</details> <details> <summary> ListTagsForResource </summary>Command API Reference / Input / Output
</details> <details> <summary> TagResource </summary>Command API Reference / Input / Output
</details> <details> <summary> UntagResource </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateAccountPreferences </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateChimeWebhookConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateCustomAction </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateMicrosoftTeamsChannelConfiguration </summary> </details> <details> <summary> UpdateSlackChannelConfiguration </summary> </details>