Amazon Lex Model Building Service

2017/12/11 - Amazon Lex Model Building Service - 2 updated api methods

Changes  Update lex-models client to latest version

GetBotChannelAssociation (updated) Link ¶
Changes (response)
{'failureReason': 'string', 'status': 'IN_PROGRESS | CREATED | FAILED'}

Returns information about the association between an Amazon Lex bot and a messaging platform.

This operation requires permissions for the lex:GetBotChannelAssociation action.

See also: AWS API Documentation

Request Syntax

client.get_bot_channel_association(
    name='string',
    botName='string',
    botAlias='string'
)
type name:

string

param name:

[REQUIRED]

The name of the association between the bot and the channel. The name is case sensitive.

type botName:

string

param botName:

[REQUIRED]

The name of the Amazon Lex bot.

type botAlias:

string

param botAlias:

[REQUIRED]

An alias pointing to the specific version of the Amazon Lex bot to which this association is being made.

rtype:

dict

returns:

Response Syntax

{
    'name': 'string',
    'description': 'string',
    'botAlias': 'string',
    'botName': 'string',
    'createdDate': datetime(2015, 1, 1),
    'type': 'Facebook'|'Slack'|'Twilio-Sms',
    'botConfiguration': {
        'string': 'string'
    },
    'status': 'IN_PROGRESS'|'CREATED'|'FAILED',
    'failureReason': 'string'
}

Response Structure

  • (dict) --

    • name (string) --

      The name of the association between the bot and the channel.

    • description (string) --

      A description of the association between the bot and the channel.

    • botAlias (string) --

      An alias pointing to the specific version of the Amazon Lex bot to which this association is being made.

    • botName (string) --

      The name of the Amazon Lex bot.

    • createdDate (datetime) --

      The date that the association between the bot and the channel was created.

    • type (string) --

      The type of the messaging platform.

    • botConfiguration (dict) --

      Provides information that the messaging platform needs to communicate with the Amazon Lex bot.

      • (string) --

        • (string) --

    • 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.

    • failureReason (string) --

      If status is FAILED, Amazon Lex provides the reason that it failed to create the association.

GetBotChannelAssociations (updated) Link ¶
Changes (response)
{'botChannelAssociations': {'failureReason': 'string',
                            'status': 'IN_PROGRESS | CREATED | FAILED'}}

Returns a list of all of the channels associated with the specified bot.

The GetBotChannelAssociations operation requires permissions for the lex:GetBotChannelAssociations action.

See also: AWS API Documentation

Request Syntax

client.get_bot_channel_associations(
    botName='string',
    botAlias='string',
    nextToken='string',
    maxResults=123,
    nameContains='string'
)
type botName:

string

param botName:

[REQUIRED]

The name of the Amazon Lex bot in the association.

type botAlias:

string

param botAlias:

[REQUIRED]

An alias pointing to the specific version of the Amazon Lex bot to which this association is being made.

type nextToken:

string

param nextToken:

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.

type maxResults:

integer

param maxResults:

The maximum number of associations to return in the response. The default is 50.

type nameContains:

string

param nameContains:

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.

rtype:

dict

returns:

Response Syntax

{
    'botChannelAssociations': [
        {
            'name': 'string',
            'description': 'string',
            'botAlias': 'string',
            'botName': 'string',
            'createdDate': datetime(2015, 1, 1),
            'type': 'Facebook'|'Slack'|'Twilio-Sms',
            'botConfiguration': {
                'string': 'string'
            },
            'status': 'IN_PROGRESS'|'CREATED'|'FAILED',
            'failureReason': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • botChannelAssociations (list) --

      An array of objects, one for each association, that provides information about the Amazon Lex bot and its association with the channel.

      • (dict) --

        Represents an association between an Amazon Lex bot and an external messaging platform.

        • name (string) --

          The name of the association between the bot and the channel.

        • description (string) --

          A text description of the association you are creating.

        • botAlias (string) --

          An alias pointing to the specific version of the Amazon Lex bot to which this association is being made.

        • botName (string) --

          The name of the Amazon Lex bot to which this association is being made.

        • createdDate (datetime) --

          The date that the association between the Amazon Lex bot and the channel was created.

        • 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.

        • botConfiguration (dict) --

          Provides information necessary to communicate with the messaging platform.

          • (string) --

            • (string) --

        • 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.

        • failureReason (string) --

          If status is FAILED, Amazon Lex provides the reason that it failed to create the association.

    • nextToken (string) --

      A pagination token that fetches 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.