bot_channel_associations
Creates, updates, deletes, gets or lists a bot_channel_associations resource.
Overview
| Name | bot_channel_associations |
| Type | Resource |
| Id | aws.lex_models.bot_channel_associations |
Fields
The following fields are returned by SELECT queries:
- get_bot_channel_association
- get_bot_channel_associations
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the association between the bot and the channel. (pattern: <code>^([A-Za-z]_?)+$</code>) |
bot_alias | string | An alias pointing to the specific version of the Amazon Lex bot to which this association is being made. (pattern: <code>^([A-Za-z]_?)+$</code>) |
bot_configuration | object | Provides information that the messaging platform needs to communicate with the Amazon Lex bot. |
bot_name | string | The name of the Amazon Lex bot. (pattern: <code>^([A-Za-z]_?)+$</code>) |
created_date | string (date-time) | The date that the association between the bot and the channel was created. |
description | string | A description of the association between the bot and the channel. |
failure_reason | string | If status is FAILED, Amazon Lex provides the reason that it failed to create the association. |
status | string | The status of the bot channel. CREATED - The channel has been created and is ready for use. IN_PROGRESS - Channel creation is in progress. FAILED - There was an error creating the channel. For information about the reason for the failure, see the failureReason field. (IN_PROGRESS, CREATED, FAILED) |
type_ | string | The type of the messaging platform. (Facebook, Slack, Twilio-Sms, Kik) |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the association between the bot and the channel. (pattern: <code>^([A-Za-z]_?)+$</code>) |
bot_alias | string | An alias pointing to the specific version of the Amazon Lex bot to which this association is being made. (pattern: <code>^([A-Za-z]_?)+$</code>) |
bot_configuration | object | Provides information necessary to communicate with the messaging platform. |
bot_name | string | The name of the Amazon Lex bot to which this association is being made. Currently, Amazon Lex supports associations with Facebook and Slack, and Twilio. (pattern: <code>^([A-Za-z]_?)+$</code>) |
created_date | string (date-time) | The date that the association between the Amazon Lex bot and the channel was created. |
description | string | A text description of the association you are creating. |
failure_reason | string | If status is FAILED, Amazon Lex provides the reason that it failed to create the association. |
status | string | The status of the bot channel. CREATED - The channel has been created and is ready for use. IN_PROGRESS - Channel creation is in progress. FAILED - There was an error creating the channel. For information about the reason for the failure, see the failureReason field. (IN_PROGRESS, CREATED, FAILED) |
type_ | string | Specifies the type of association by indicating the type of channel being established between the Amazon Lex bot and the external messaging platform. (Facebook, Slack, Twilio-Sms, Kik) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_bot_channel_association | select | name, bot_name, alias_name, region | Returns information about the association between an Amazon Lex bot and a messaging platform. This operation requires permissions for the lex:GetBotChannelAssociation action. | |
get_bot_channel_associations | select | bot_name, alias_name, region | nextToken, maxResults, nameContains | Returns a list of all of the channels associated with the specified bot. The GetBotChannelAssociations operation requires permissions for the lex:GetBotChannelAssociations action. |
delete_bot_channel_association | delete | name, bot_name, alias_name, region | Deletes the association between an Amazon Lex bot and a messaging platform. This operation requires permission for the lex:DeleteBotChannelAssociation action. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
alias_name | string | An alias that points to the specific version of the Amazon Lex bot to which this association is being made. |
bot_name | string | The name of the Amazon Lex bot. |
name | string | The name of the association. The name is case sensitive. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of associations to return in the response. The default is 50. |
nameContains | string | Substring to match in channel association names. An association will be returned if any part of its name matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz." To return all bot channel associations, use a hyphen ("-") as the nameContains parameter. |
nextToken | string | A pagination token for fetching the next page of associations. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of associations, specify the pagination token in the next request. |
SELECT examples
- get_bot_channel_association
- get_bot_channel_associations
Returns information about the association between an Amazon Lex bot and a messaging platform. This operation requires permissions for the lex:GetBotChannelAssociation action.
SELECT
name,
bot_alias,
bot_configuration,
bot_name,
created_date,
description,
failure_reason,
status,
type_
FROM aws.lex_models.bot_channel_associations
WHERE name = '{{ name }}' -- required
AND bot_name = '{{ bot_name }}' -- required
AND alias_name = '{{ alias_name }}' -- required
AND region = '{{ region }}' -- required
;
Returns a list of all of the channels associated with the specified bot. The GetBotChannelAssociations operation requires permissions for the lex:GetBotChannelAssociations action.
SELECT
name,
bot_alias,
bot_configuration,
bot_name,
created_date,
description,
failure_reason,
status,
type_
FROM aws.lex_models.bot_channel_associations
WHERE bot_name = '{{ bot_name }}' -- required
AND alias_name = '{{ alias_name }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
AND nameContains = '{{ nameContains }}'
;
DELETE examples
- delete_bot_channel_association
Deletes the association between an Amazon Lex bot and a messaging platform. This operation requires permission for the lex:DeleteBotChannelAssociation action.
DELETE FROM aws.lex_models.bot_channel_associations
WHERE name = '{{ name }}' --required
AND bot_name = '{{ bot_name }}' --required
AND alias_name = '{{ alias_name }}' --required
AND region = '{{ region }}' --required
;