Amazon Lex Model Building V2

2021/01/22 - Amazon Lex Model Building V2 - 40 new api methods

Changes  This release adds support for Amazon Lex V2 APIs for model building.

DeleteBotVersion (new) Link ¶

Deletes a specific version of a bot. To delete all version of a bot, use the DeleteBot operation.

See also: AWS API Documentation

Request Syntax

client.delete_bot_version(
    botId='string',
    botVersion='string',
    skipResourceInUseCheck=True|False
)
type botId

string

param botId

[REQUIRED]

The identifier of the bot that contains the version.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot to delete.

type skipResourceInUseCheck

boolean

param skipResourceInUseCheck

By default, the DeleteBotVersion operations throws a ResourceInUseException exception if you try to delete a bot version that has an alias pointing at it. Set the skipResourceInUseCheck parameter to true to skip this check and remove the version even if an alias points to it.

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning'
}

Response Structure

  • (dict) --

    • botId (string) --

      The identifier of the bot that is being deleted.

    • botVersion (string) --

      The version of the bot that is being deleted.

    • botStatus (string) --

      The current status of the bot.

ListBots (new) Link ¶

Gets a list of available bots.

See also: AWS API Documentation

Request Syntax

client.list_bots(
    sortBy={
        'attribute': 'BotName',
        'order': 'Ascending'|'Descending'
    },
    filters=[
        {
            'name': 'BotName',
            'values': [
                'string',
            ],
            'operator': 'CO'|'EQ'
        },
    ],
    maxResults=123,
    nextToken='string'
)
type sortBy

dict

param sortBy

Specifies sorting parameters for the list of bots. You can specify that the list be sorted by bot name in ascending or descending order.

  • attribute (string) -- [REQUIRED]

    The attribute to use to sort the list of bots.

  • order (string) -- [REQUIRED]

    The order to sort the list. You can choose ascending or descending.

type filters

list

param filters

Provides the specification of a filter used to limit the bots in the response to only those that match the filter specification. You can only specify one filter and one string to filter on.

  • (dict) --

    Filters the responses returned by the ListBots operation.

    • name (string) -- [REQUIRED]

      The name of the field to filter the list of bots.

    • values (list) -- [REQUIRED]

      The value to use for filtering the list of bots.

      • (string) --

    • operator (string) -- [REQUIRED]

      The operator to use for the filter. Specify EQ when the ListBots operation should return only aliases that equal the specified value. Specify CO when the ListBots operation should return aliases that contain the specified value.

type maxResults

integer

param maxResults

The maximum number of bots to return in each page of results. If there are fewer results than the maximum page size, only the actual number of results are returned.

type nextToken

string

param nextToken

If the response from the ListBots operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

rtype

dict

returns

Response Syntax

{
    'botSummaries': [
        {
            'botId': 'string',
            'botName': 'string',
            'description': 'string',
            'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning',
            'latestBotVersion': 'string',
            'lastUpdatedDateTime': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • botSummaries (list) --

      Summary information for the bots that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more bots available, the nextToken field contains a token to the next page of results.

      • (dict) --

        Summary information about a bot returned by the ListBots operation.

        • botId (string) --

          The unique identifier assigned to the bot. Use this ID to get detailed information about the bot with the DescribeBot operation.

        • botName (string) --

          The name of the bot.

        • description (string) --

          The description of the bot.

        • botStatus (string) --

          The current status of the bot. When the status is Available the bot is ready for use.

        • latestBotVersion (string) --

          The latest numerical version in use for the bot.

        • lastUpdatedDateTime (datetime) --

          The date and time that the bot was last updated.

    • nextToken (string) --

      A token that indicates whether there are more results to return in a response to the ListBots operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListBots operation request to get the next page of results.

ListBotAliases (new) Link ¶

Gets a list of aliases for the specified bot.

See also: AWS API Documentation

Request Syntax

client.list_bot_aliases(
    botId='string',
    maxResults=123,
    nextToken='string'
)
type botId

string

param botId

[REQUIRED]

The identifier of the bot to list aliases for.

type maxResults

integer

param maxResults

The maximum number of aliases to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

type nextToken

string

param nextToken

If the response from the ListBotAliases operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

rtype

dict

returns

Response Syntax

{
    'botAliasSummaries': [
        {
            'botAliasId': 'string',
            'botAliasName': 'string',
            'description': 'string',
            'botVersion': 'string',
            'botAliasStatus': 'Creating'|'Available'|'Deleting'|'Failed',
            'creationDateTime': datetime(2015, 1, 1),
            'lastUpdatedDateTime': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string',
    'botId': 'string'
}

Response Structure

  • (dict) --

    • botAliasSummaries (list) --

      Summary information for the bot aliases that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more aliases available, the nextToken field contains a token to get the next page of results.

      • (dict) --

        Summary information about bot aliases returned from the ListBotAliases operation.

        • botAliasId (string) --

          The unique identifier assigned to the bot alias. You can use this ID to get detailed information about the alias using the DescribeBotAlias operation.

        • botAliasName (string) --

          The name of the bot alias.

        • description (string) --

          The description of the bot alias.

        • botVersion (string) --

          The version of the bot that the bot alias references.

        • botAliasStatus (string) --

          The current state of the bot alias. If the status is Available , the alias is ready for use.

        • creationDateTime (datetime) --

          A timestamp of the date and time that the bot alias was created.

        • lastUpdatedDateTime (datetime) --

          A timestamp of the date and time that the bot alias was last updated.

    • nextToken (string) --

      A token that indicates whether there are more results to return in a response to the ListBotAliases operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListBotAliases operation request to get the next page of results.

    • botId (string) --

      The identifier of the bot associated with the aliases.

ListTagsForResource (new) Link ¶

Gets a list of tags associated with a resource. Only bots, bot aliases, and bot channels can have tags associated with them.

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    resourceARN='string'
)
type resourceARN

string

param resourceARN

[REQUIRED]

The Amazon Resource Name (ARN) of the resource to get a list of tags for.

rtype

dict

returns

Response Syntax

{
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • tags (dict) --

      The tags associated with a resource.

      • (string) --

        • (string) --

CreateBotLocale (new) Link ¶

Creates a locale in the bot. The locale contains the intents and slot types that the bot uses in conversations with users in the specified language and locale. You must add a locale to a bot before you can add intents and slot types to the bot.

See also: AWS API Documentation

Request Syntax

client.create_bot_locale(
    botId='string',
    botVersion='string',
    localeId='string',
    description='string',
    nluIntentConfidenceThreshold=123.0,
    voiceSettings={
        'voiceId': 'string'
    }
)
type botId

string

param botId

[REQUIRED]

The identifier of the bot to create the locale for.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot to create the locale for. This can only be the draft version of the bot.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale that the bot will be used in. The string must match one of the supported locales. All of the intents, slot types, and slots used in the bot must have the same locale. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

type description

string

param description

A description of the bot locale. Use this to help identify the bot locale in lists.

type nluIntentConfidenceThreshold

float

param nluIntentConfidenceThreshold

[REQUIRED]

Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent , AMAZON.KendraSearchIntent , or both when returning alternative intents. AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for the bot.

For example, suppose a bot is configured with the confidence threshold of 0.80 and the AMAZON.FallbackIntent . Amazon Lex returns three alternative intents with the following confidence scores: IntentA (0.70), IntentB (0.60), IntentC (0.50). The response from the PostText operation would be:

  • AMAZON.FallbackIntent

  • IntentA

  • IntentB

  • IntentC

type voiceSettings

dict

param voiceSettings

The Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user.

  • voiceId (string) -- [REQUIRED]

    The identifier of the Amazon Polly voice to use.

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeName': 'string',
    'localeId': 'string',
    'description': 'string',
    'nluIntentConfidenceThreshold': 123.0,
    'voiceSettings': {
        'voiceId': 'string'
    },
    'botLocaleStatus': 'Creating'|'Building'|'Built'|'ReadyExpressTesting'|'Failed'|'Deleting'|'NotBuilt',
    'creationDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • botId (string) --

      The specified bot identifier.

    • botVersion (string) --

      The specified bot version.

    • localeName (string) --

      The specified locale name.

    • localeId (string) --

      The specified locale identifier.

    • description (string) --

      The specified description of the bot locale.

    • nluIntentConfidenceThreshold (float) --

      The specified confidence threshold for inserting the AMAZON.FallbackIntent and AMAZON.KendraSearchIntent intents.

    • voiceSettings (dict) --

      The Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user.

      • voiceId (string) --

        The identifier of the Amazon Polly voice to use.

    • botLocaleStatus (string) --

      The status of the bot.

      When the status is Creating the bot locale is being configured. When the status is Building Amazon Lex is building the bot for testing and use.

      If the status of the bot is ReadyExpressTesting , you can test the bot using the exact utterances specified in the bots' intents. When the bot is ready for full testing or to run, the status is Built .

      If there was a problem with building the bot, the status is Failed . If the bot was saved but not built, the status is NotBuilt .

    • creationDateTime (datetime) --

      A timestamp specifying the date and time that the bot locale was created.

BuildBotLocale (new) Link ¶

Builds a bot, its intents, and its slot types into a specific locale. A bot can be built into multiple locales. At runtime the locale is used to choose a specific build of the bot.

See also: AWS API Documentation

Request Syntax

client.build_bot_locale(
    botId='string',
    botVersion='string',
    localeId='string'
)
type botId

string

param botId

[REQUIRED]

The identifier of the bot to build. The identifier is returned in the response from the operation.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot to build. This can only be the draft version of the bot.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale that the bot will be used in. The string must match one of the supported locales. All of the intents, slot types, and slots used in the bot must have the same locale. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'botLocaleStatus': 'Creating'|'Building'|'Built'|'ReadyExpressTesting'|'Failed'|'Deleting'|'NotBuilt',
    'lastBuildSubmittedDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • botId (string) --

      The identifier of the specified bot.

    • botVersion (string) --

      The version of the bot that was built. This is only the draft version of the bot.

    • localeId (string) --

      The language and locale specified of where the bot can be used.

    • botLocaleStatus (string) --

      The bot's build status. When the status is ReadyExpressTesting you can test the bot using the utterances defined for the intents and slot types. When the status is Built , the bot is ready for use and can be tested using any utterance.

    • lastBuildSubmittedDateTime (datetime) --

      A timestamp indicating the date and time that the bot was last built for this locale.

DeleteIntent (new) Link ¶

Removes the specified intent.

Deleting an intent also deletes the slots associated with the intent.

See also: AWS API Documentation

Request Syntax

client.delete_intent(
    intentId='string',
    botId='string',
    botVersion='string',
    localeId='string'
)
type intentId

string

param intentId

[REQUIRED]

The unique identifier of the intent to delete.

type botId

string

param botId

[REQUIRED]

The identifier of the bot associated with the intent.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot associated with the intent.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale where the bot will be deleted. The string must match one of the supported locales. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

returns

None

ListBotLocales (new) Link ¶

Gets a list of locales for the specified bot.

See also: AWS API Documentation

Request Syntax

client.list_bot_locales(
    botId='string',
    botVersion='string',
    sortBy={
        'attribute': 'BotLocaleName',
        'order': 'Ascending'|'Descending'
    },
    filters=[
        {
            'name': 'BotLocaleName',
            'values': [
                'string',
            ],
            'operator': 'CO'|'EQ'
        },
    ],
    maxResults=123,
    nextToken='string'
)
type botId

string

param botId

[REQUIRED]

The identifier of the bot to list locales for.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot to list locales for.

type sortBy

dict

param sortBy

Specifies sorting parameters for the list of locales. You can sort by locale name in ascending or descending order.

  • attribute (string) -- [REQUIRED]

    The bot locale attribute to sort by.

  • order (string) -- [REQUIRED]

    Specifies whether to sort the bot locales in ascending or descending order.

type filters

list

param filters

Provides the specification for a filter used to limit the response to only those locales that match the filter specification. You can only specify one filter and one value to filter on.

  • (dict) --

    Filters responses returned by the ListBotLocales operation.

    • name (string) -- [REQUIRED]

      The name of the field to filter the list of bots.

    • values (list) -- [REQUIRED]

      The value to use for filtering the list of bots.

      • (string) --

    • operator (string) -- [REQUIRED]

      The operator to use for the filter. Specify EQ when the ListBotLocales operation should return only aliases that equal the specified value. Specify CO when the ListBotLocales operation should return aliases that contain the specified value.

type maxResults

integer

param maxResults

The maximum number of aliases to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

type nextToken

string

param nextToken

If the response from the ListBotLocales operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token as the nextToken parameter to return the next page of results.

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'nextToken': 'string',
    'botLocaleSummaries': [
        {
            'localeId': 'string',
            'localeName': 'string',
            'description': 'string',
            'botLocaleStatus': 'Creating'|'Building'|'Built'|'ReadyExpressTesting'|'Failed'|'Deleting'|'NotBuilt',
            'lastUpdatedDateTime': datetime(2015, 1, 1),
            'lastBuildSubmittedDateTime': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    • botId (string) --

      The identifier of the bot to list locales for.

    • botVersion (string) --

      The version of the bot.

    • nextToken (string) --

      A token that indicates whether there are more results to return in a response to the ListBotLocales operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListBotLocales operation request to get the next page of results.

    • botLocaleSummaries (list) --

      Summary information for the locales that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more locales available, the nextToken field contains a token to get the next page of results.

      • (dict) --

        Summary information about bot locales returned by the ListBotLocales operation.

        • localeId (string) --

          The language and locale of the bot locale.

        • localeName (string) --

          The name of the bot locale.

        • description (string) --

          The description of the bot locale.

        • botLocaleStatus (string) --

          The current status of the bot locale. When the status is Built the locale is ready for use.

        • lastUpdatedDateTime (datetime) --

          A timestamp of the date and time that the bot locale was last updated.

        • lastBuildSubmittedDateTime (datetime) --

          A timestamp of the date and time that the bot locale was last built.

DescribeBotLocale (new) Link ¶

Describes the settings that a bot has for a specific locale.

See also: AWS API Documentation

Request Syntax

client.describe_bot_locale(
    botId='string',
    botVersion='string',
    localeId='string'
)
type botId

string

param botId

[REQUIRED]

The identifier of the bot associated with the locale.

type botVersion

string

param botVersion

[REQUIRED]

The identifier of the version of the bot associated with the locale.

type localeId

string

param localeId

[REQUIRED]

The unique identifier of the locale to describe. The string must match one of the supported locales. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'localeName': 'string',
    'description': 'string',
    'nluIntentConfidenceThreshold': 123.0,
    'voiceSettings': {
        'voiceId': 'string'
    },
    'intentsCount': 123,
    'slotTypesCount': 123,
    'botLocaleStatus': 'Creating'|'Building'|'Built'|'ReadyExpressTesting'|'Failed'|'Deleting'|'NotBuilt',
    'failureReasons': [
        'string',
    ],
    'creationDateTime': datetime(2015, 1, 1),
    'lastUpdatedDateTime': datetime(2015, 1, 1),
    'lastBuildSubmittedDateTime': datetime(2015, 1, 1),
    'botLocaleHistoryEvents': [
        {
            'event': 'string',
            'eventDate': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    • botId (string) --

      The identifier of the bot associated with the locale.

    • botVersion (string) --

      The identifier of the version of the bot associated with the locale.

    • localeId (string) --

      The unique identifier of the described locale.

    • localeName (string) --

      The name of the locale.

    • description (string) --

      The description of the locale.

    • nluIntentConfidenceThreshold (float) --

      The confidence threshold where Amazon Lex inserts the AMAZON.FallbackIntent and AMAZON.KendraSearchIntent intents in the list of possible intents for an utterance.

    • voiceSettings (dict) --

      The Amazon Polly voice Amazon Lex uses for voice interaction with the user.

      • voiceId (string) --

        The identifier of the Amazon Polly voice to use.

    • intentsCount (integer) --

      The number of intents defined for the locale.

    • slotTypesCount (integer) --

      The number of slot types defined for the locale.

    • botLocaleStatus (string) --

      The status of the bot. If the status is Failed , the reasons for the failure are listed in the failureReasons field.

    • failureReasons (list) --

      if botLocaleStatus is Failed , Amazon Lex explains why it failed to build the bot.

      • (string) --

    • creationDateTime (datetime) --

      The date and time that the locale was created.

    • lastUpdatedDateTime (datetime) --

      The date and time that the locale was last updated.

    • lastBuildSubmittedDateTime (datetime) --

      The date and time that the locale was last submitted for building.

    • botLocaleHistoryEvents (list) --

      History of changes, such as when a locale is used in an alias, that have taken place for the locale.

      • (dict) --

        Provides information about an event that occurred affecting the bot locale.

        • event (string) --

          A description of the event that occurred.

        • eventDate (datetime) --

          A timestamp of the date and time that the event occurred.

DescribeIntent (new) Link ¶

Returns metadata about an intent.

See also: AWS API Documentation

Request Syntax

client.describe_intent(
    intentId='string',
    botId='string',
    botVersion='string',
    localeId='string'
)
type intentId

string

param intentId

[REQUIRED]

The identifier of the intent to describe.

type botId

string

param botId

[REQUIRED]

The identifier of the bot associated with the intent.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot associated with the intent.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale of the intent to describe. The string must match one of the supported locales. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

rtype

dict

returns

Response Syntax

{
    'intentId': 'string',
    'intentName': 'string',
    'description': 'string',
    'parentIntentSignature': 'string',
    'sampleUtterances': [
        {
            'utterance': 'string'
        },
    ],
    'dialogCodeHook': {
        'enabled': True|False
    },
    'fulfillmentCodeHook': {
        'enabled': True|False
    },
    'slotPriorities': [
        {
            'priority': 123,
            'slotId': 'string'
        },
    ],
    'intentConfirmationSetting': {
        'promptSpecification': {
            'messageGroups': [
                {
                    'message': {
                        'plainTextMessage': {
                            'value': 'string'
                        },
                        'customPayload': {
                            'value': 'string'
                        },
                        'ssmlMessage': {
                            'value': 'string'
                        },
                        'imageResponseCard': {
                            'title': 'string',
                            'subtitle': 'string',
                            'imageUrl': 'string',
                            'buttons': [
                                {
                                    'text': 'string',
                                    'value': 'string'
                                },
                            ]
                        }
                    },
                    'variations': [
                        {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                    ]
                },
            ],
            'maxRetries': 123,
            'allowInterrupt': True|False
        },
        'declinationResponse': {
            'messageGroups': [
                {
                    'message': {
                        'plainTextMessage': {
                            'value': 'string'
                        },
                        'customPayload': {
                            'value': 'string'
                        },
                        'ssmlMessage': {
                            'value': 'string'
                        },
                        'imageResponseCard': {
                            'title': 'string',
                            'subtitle': 'string',
                            'imageUrl': 'string',
                            'buttons': [
                                {
                                    'text': 'string',
                                    'value': 'string'
                                },
                            ]
                        }
                    },
                    'variations': [
                        {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                    ]
                },
            ],
            'allowInterrupt': True|False
        }
    },
    'intentClosingSetting': {
        'closingResponse': {
            'messageGroups': [
                {
                    'message': {
                        'plainTextMessage': {
                            'value': 'string'
                        },
                        'customPayload': {
                            'value': 'string'
                        },
                        'ssmlMessage': {
                            'value': 'string'
                        },
                        'imageResponseCard': {
                            'title': 'string',
                            'subtitle': 'string',
                            'imageUrl': 'string',
                            'buttons': [
                                {
                                    'text': 'string',
                                    'value': 'string'
                                },
                            ]
                        }
                    },
                    'variations': [
                        {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                    ]
                },
            ],
            'allowInterrupt': True|False
        }
    },
    'inputContexts': [
        {
            'name': 'string'
        },
    ],
    'outputContexts': [
        {
            'name': 'string',
            'timeToLiveInSeconds': 123,
            'turnsToLive': 123
        },
    ],
    'kendraConfiguration': {
        'kendraIndex': 'string',
        'queryFilterStringEnabled': True|False,
        'queryFilterString': 'string'
    },
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'creationDateTime': datetime(2015, 1, 1),
    'lastUpdatedDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • intentId (string) --

      The unique identifier assigned to the intent when it was created.

    • intentName (string) --

      The name specified for the intent.

    • description (string) --

      The description of the intent.

    • parentIntentSignature (string) --

      The identifier of the built-in intent that this intent is derived from, if any.

    • sampleUtterances (list) --

      User utterances that trigger this intent.

      • (dict) --

        A sample utterance that invokes an intent or respond to a slot elicitation prompt.

        • utterance (string) --

          The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.

    • dialogCodeHook (dict) --

      The Lambda function called during each turn of a conversation with the intent.

      • enabled (boolean) --

        Enables the dialog code hook so that it processes user requests.

    • fulfillmentCodeHook (dict) --

      The Lambda function called when the intent is complete and ready for fulfillment.

      • enabled (boolean) --

        Indicates whether a Lambda function should be invoked to fulfill a specific intent.

    • slotPriorities (list) --

      The list that determines the priority that slots should be elicited from the user.

      • (dict) --

        Sets the priority that Amazon Lex should use when eliciting slot values from a user.

        • priority (integer) --

          The priority that a slot should be elicited.

        • slotId (string) --

          The unique identifier of the slot.

    • intentConfirmationSetting (dict) --

      Prompts that Amazon Lex sends to the user to confirm completion of an intent.

      • promptSpecification (dict) --

        Prompts the user to confirm the intent. This question should have a yes or no answer.

        Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the OrderPizza intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information.

        • messageGroups (list) --

          A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.

          • (dict) --

            Provides one or more messages that Amazon Lex should send to the user.

            • message (dict) --

              The primary message that Amazon Lex should send to the user.

              • plainTextMessage (dict) --

                A message in plain text format.

                • value (string) --

                  The message to send to the user.

              • customPayload (dict) --

                A message in a custom format defined by the client application.

                • value (string) --

                  The string that is sent to your application.

              • ssmlMessage (dict) --

                A message in Speech Synthesis Markup Language (SSML).

                • value (string) --

                  The SSML text that defines the prompt.

              • imageResponseCard (dict) --

                A message that defines a response card that the client application can show to the user.

                • title (string) --

                  The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                • subtitle (string) --

                  The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                • imageUrl (string) --

                  The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                • buttons (list) --

                  A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                  • (dict) --

                    Describes a button to use on a response card used to gather slot values from a user.

                    • text (string) --

                      The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                    • value (string) --

                      The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

            • variations (list) --

              Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

              • (dict) --

                The object that provides message text and it's type.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

        • maxRetries (integer) --

          The maximum number of times the bot tries to elicit a resonse from the user using this prompt.

        • allowInterrupt (boolean) --

          Indicates whether the user can interrupt a speech prompt from the bot.

      • declinationResponse (dict) --

        When the user answers "no" to the question defined in promptSpecification , Amazon Lex responds with this response to acknowledge that the intent was canceled.

        • messageGroups (list) --

          A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.

          • (dict) --

            Provides one or more messages that Amazon Lex should send to the user.

            • message (dict) --

              The primary message that Amazon Lex should send to the user.

              • plainTextMessage (dict) --

                A message in plain text format.

                • value (string) --

                  The message to send to the user.

              • customPayload (dict) --

                A message in a custom format defined by the client application.

                • value (string) --

                  The string that is sent to your application.

              • ssmlMessage (dict) --

                A message in Speech Synthesis Markup Language (SSML).

                • value (string) --

                  The SSML text that defines the prompt.

              • imageResponseCard (dict) --

                A message that defines a response card that the client application can show to the user.

                • title (string) --

                  The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                • subtitle (string) --

                  The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                • imageUrl (string) --

                  The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                • buttons (list) --

                  A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                  • (dict) --

                    Describes a button to use on a response card used to gather slot values from a user.

                    • text (string) --

                      The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                    • value (string) --

                      The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

            • variations (list) --

              Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

              • (dict) --

                The object that provides message text and it's type.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

        • allowInterrupt (boolean) --

          Indicates whether the user can interrupt a speech response from Amazon Lex.

    • intentClosingSetting (dict) --

      The response that Amazon Lex sends to when the intent is closed.

      • closingResponse (dict) --

        The response that Amazon Lex sends to the user when the intent is complete.

        • messageGroups (list) --

          A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.

          • (dict) --

            Provides one or more messages that Amazon Lex should send to the user.

            • message (dict) --

              The primary message that Amazon Lex should send to the user.

              • plainTextMessage (dict) --

                A message in plain text format.

                • value (string) --

                  The message to send to the user.

              • customPayload (dict) --

                A message in a custom format defined by the client application.

                • value (string) --

                  The string that is sent to your application.

              • ssmlMessage (dict) --

                A message in Speech Synthesis Markup Language (SSML).

                • value (string) --

                  The SSML text that defines the prompt.

              • imageResponseCard (dict) --

                A message that defines a response card that the client application can show to the user.

                • title (string) --

                  The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                • subtitle (string) --

                  The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                • imageUrl (string) --

                  The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                • buttons (list) --

                  A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                  • (dict) --

                    Describes a button to use on a response card used to gather slot values from a user.

                    • text (string) --

                      The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                    • value (string) --

                      The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

            • variations (list) --

              Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

              • (dict) --

                The object that provides message text and it's type.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

        • allowInterrupt (boolean) --

          Indicates whether the user can interrupt a speech response from Amazon Lex.

    • inputContexts (list) --

      A list of contexts that must be active for the intent to be considered for sending to the user.

      • (dict) --

        The name of a context that must be active for an intent to be selected by Amazon Lex.

        • name (string) --

          The name of the context.

    • outputContexts (list) --

      A list of contexts that are activated when the intent is fulfilled.

      • (dict) --

        Describes a session context that is activated when an intent is fulfilled.

        • name (string) --

          The name of the output context.

        • timeToLiveInSeconds (integer) --

          The amount of time, in seconds, that the output context should remain active. The time is figured from the first time the context is sent to the user.

        • turnsToLive (integer) --

          The number of conversation turns that the output context should remain active. The number of turns is counted from the first time that the context is sent to the user.

    • kendraConfiguration (dict) --

      Configuration information required to use the AMAZON.KendraSearchIntent intent.

      • kendraIndex (string) --

        The Amazon Resource Name (ARN) of the Amazon Kendra index that you want the AMAZON.KendraSearchIntent intent to search. The index must be in the same account and Region as the Amazon Lex bot.

      • queryFilterStringEnabled (boolean) --

        Determines whether the AMAZON.KendraSearchIntent intent uses a custom query string to query the Amazon Kendra index.

      • queryFilterString (string) --

        A query filter that Amazon Lex sends to Amazon Kendra to filter the response from a query. The filter is in the format defined by Amazon Kendra. For more information, see Filtering queries .

    • botId (string) --

      The identifier of the bot associated with the intent.

    • botVersion (string) --

      The version of the bot associated with the intent.

    • localeId (string) --

      The language and locale specified for the intent.

    • creationDateTime (datetime) --

      A timestamp of the date and time that the intent was created.

    • lastUpdatedDateTime (datetime) --

      A timestamp of the date and time that the intent was last updated.

DeleteBotLocale (new) Link ¶

Removes a locale from a bot.

When you delete a locale, all intents, slots, and slot types defined for the locale are also deleted.

See also: AWS API Documentation

Request Syntax

client.delete_bot_locale(
    botId='string',
    botVersion='string',
    localeId='string'
)
type botId

string

param botId

[REQUIRED]

The unique identifier of the bot that contains the locale.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot that contains the locale.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale that will be deleted. The string must match one of the supported locales. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'botLocaleStatus': 'Creating'|'Building'|'Built'|'ReadyExpressTesting'|'Failed'|'Deleting'|'NotBuilt'
}

Response Structure

  • (dict) --

    • botId (string) --

      The identifier of the bot that contained the deleted locale.

    • botVersion (string) --

      The version of the bot that contained the deleted locale.

    • localeId (string) --

      The language and locale of the deleted locale.

    • botLocaleStatus (string) --

      The status of deleting the bot locale. The locale first enters the Deleting status. Once the locale is deleted it no longer appears in the list of locales for the bot.

CreateSlot (new) Link ¶

Creates a slot in an intent. A slot is a variable needed to fulfill an intent. For example, an OrderPizza intent might need slots for size, crust, and number of pizzas. For each slot, you define one or more utterances that Amazon Lex uses to elicit a response from the user.

See also: AWS API Documentation

Request Syntax

client.create_slot(
    slotName='string',
    description='string',
    slotTypeId='string',
    valueElicitationSetting={
        'defaultValueSpecification': {
            'defaultValueList': [
                {
                    'defaultValue': 'string'
                },
            ]
        },
        'slotConstraint': 'Required'|'Optional',
        'promptSpecification': {
            'messageGroups': [
                {
                    'message': {
                        'plainTextMessage': {
                            'value': 'string'
                        },
                        'customPayload': {
                            'value': 'string'
                        },
                        'ssmlMessage': {
                            'value': 'string'
                        },
                        'imageResponseCard': {
                            'title': 'string',
                            'subtitle': 'string',
                            'imageUrl': 'string',
                            'buttons': [
                                {
                                    'text': 'string',
                                    'value': 'string'
                                },
                            ]
                        }
                    },
                    'variations': [
                        {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                    ]
                },
            ],
            'maxRetries': 123,
            'allowInterrupt': True|False
        },
        'sampleUtterances': [
            {
                'utterance': 'string'
            },
        ],
        'waitAndContinueSpecification': {
            'waitingResponse': {
                'messageGroups': [
                    {
                        'message': {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                        'variations': [
                            {
                                'plainTextMessage': {
                                    'value': 'string'
                                },
                                'customPayload': {
                                    'value': 'string'
                                },
                                'ssmlMessage': {
                                    'value': 'string'
                                },
                                'imageResponseCard': {
                                    'title': 'string',
                                    'subtitle': 'string',
                                    'imageUrl': 'string',
                                    'buttons': [
                                        {
                                            'text': 'string',
                                            'value': 'string'
                                        },
                                    ]
                                }
                            },
                        ]
                    },
                ],
                'allowInterrupt': True|False
            },
            'continueResponse': {
                'messageGroups': [
                    {
                        'message': {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                        'variations': [
                            {
                                'plainTextMessage': {
                                    'value': 'string'
                                },
                                'customPayload': {
                                    'value': 'string'
                                },
                                'ssmlMessage': {
                                    'value': 'string'
                                },
                                'imageResponseCard': {
                                    'title': 'string',
                                    'subtitle': 'string',
                                    'imageUrl': 'string',
                                    'buttons': [
                                        {
                                            'text': 'string',
                                            'value': 'string'
                                        },
                                    ]
                                }
                            },
                        ]
                    },
                ],
                'allowInterrupt': True|False
            },
            'stillWaitingResponse': {
                'messageGroups': [
                    {
                        'message': {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                        'variations': [
                            {
                                'plainTextMessage': {
                                    'value': 'string'
                                },
                                'customPayload': {
                                    'value': 'string'
                                },
                                'ssmlMessage': {
                                    'value': 'string'
                                },
                                'imageResponseCard': {
                                    'title': 'string',
                                    'subtitle': 'string',
                                    'imageUrl': 'string',
                                    'buttons': [
                                        {
                                            'text': 'string',
                                            'value': 'string'
                                        },
                                    ]
                                }
                            },
                        ]
                    },
                ],
                'frequencyInSeconds': 123,
                'timeoutInSeconds': 123,
                'allowInterrupt': True|False
            }
        }
    },
    obfuscationSetting={
        'obfuscationSettingType': 'None'|'DefaultObfuscation'
    },
    botId='string',
    botVersion='string',
    localeId='string',
    intentId='string'
)
type slotName

string

param slotName

[REQUIRED]

The name of the slot. Slot names must be unique within the bot that contains the slot.

type description

string

param description

A description of the slot. Use this to help identify the slot in lists.

type slotTypeId

string

param slotTypeId

[REQUIRED]

The unique identifier for the slot type associated with this slot. The slot type determines the values that can be entered into the slot.

type valueElicitationSetting

dict

param valueElicitationSetting

[REQUIRED]

Specifies prompts that Amazon Lex sends to the user to elicit a response that provides the value for the slot.

  • defaultValueSpecification (dict) --

    A list of default values for a slot. Default values are used when Amazon Lex hasn't determined a value for a slot. You can specify default values from context variables, sesion attributes, and defined values.

    • defaultValueList (list) -- [REQUIRED]

      A list of default values. Amazon Lex chooses the default value to use in the order that they are presented in the list.

      • (dict) --

        Specifies the default value to use when a user doesn't provide a value for a slot.

        • defaultValue (string) -- [REQUIRED]

          The default value to use when a user doesn't provide a value for a slot.

  • slotConstraint (string) -- [REQUIRED]

    Specifies whether the slot is required or optional.

  • promptSpecification (dict) --

    The prompt that Amazon Lex uses to elicit the slot value from the user.

    • messageGroups (list) -- [REQUIRED]

      A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.

      • (dict) --

        Provides one or more messages that Amazon Lex should send to the user.

        • message (dict) -- [REQUIRED]

          The primary message that Amazon Lex should send to the user.

          • plainTextMessage (dict) --

            A message in plain text format.

            • value (string) -- [REQUIRED]

              The message to send to the user.

          • customPayload (dict) --

            A message in a custom format defined by the client application.

            • value (string) -- [REQUIRED]

              The string that is sent to your application.

          • ssmlMessage (dict) --

            A message in Speech Synthesis Markup Language (SSML).

            • value (string) -- [REQUIRED]

              The SSML text that defines the prompt.

          • imageResponseCard (dict) --

            A message that defines a response card that the client application can show to the user.

            • title (string) -- [REQUIRED]

              The title to display on the response card. The format of the title is determined by the platform displaying the response card.

            • subtitle (string) --

              The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

            • imageUrl (string) --

              The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

            • buttons (list) --

              A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

              • (dict) --

                Describes a button to use on a response card used to gather slot values from a user.

                • text (string) -- [REQUIRED]

                  The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                • value (string) -- [REQUIRED]

                  The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

        • variations (list) --

          Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

          • (dict) --

            The object that provides message text and it's type.

            • plainTextMessage (dict) --

              A message in plain text format.

              • value (string) -- [REQUIRED]

                The message to send to the user.

            • customPayload (dict) --

              A message in a custom format defined by the client application.

              • value (string) -- [REQUIRED]

                The string that is sent to your application.

            • ssmlMessage (dict) --

              A message in Speech Synthesis Markup Language (SSML).

              • value (string) -- [REQUIRED]

                The SSML text that defines the prompt.

            • imageResponseCard (dict) --

              A message that defines a response card that the client application can show to the user.

              • title (string) -- [REQUIRED]

                The title to display on the response card. The format of the title is determined by the platform displaying the response card.

              • subtitle (string) --

                The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

              • imageUrl (string) --

                The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

              • buttons (list) --

                A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                • (dict) --

                  Describes a button to use on a response card used to gather slot values from a user.

                  • text (string) -- [REQUIRED]

                    The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                  • value (string) -- [REQUIRED]

                    The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

    • maxRetries (integer) -- [REQUIRED]

      The maximum number of times the bot tries to elicit a resonse from the user using this prompt.

    • allowInterrupt (boolean) --

      Indicates whether the user can interrupt a speech prompt from the bot.

  • sampleUtterances (list) --

    If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy. This is optional. In most cases, Amazon Lex is capable of understanding user utterances.

    • (dict) --

      A sample utterance that invokes an intent or respond to a slot elicitation prompt.

      • utterance (string) -- [REQUIRED]

        The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.

  • waitAndContinueSpecification (dict) --

    Specifies the prompts that Amazon Lex uses while a bot is waiting for customer input.

    • waitingResponse (dict) -- [REQUIRED]

      The response that Amazon Lex sends to indicate that the bot is waiting for the conversation to continue.

      • messageGroups (list) -- [REQUIRED]

        A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.

        • (dict) --

          Provides one or more messages that Amazon Lex should send to the user.

          • message (dict) -- [REQUIRED]

            The primary message that Amazon Lex should send to the user.

            • plainTextMessage (dict) --

              A message in plain text format.

              • value (string) -- [REQUIRED]

                The message to send to the user.

            • customPayload (dict) --

              A message in a custom format defined by the client application.

              • value (string) -- [REQUIRED]

                The string that is sent to your application.

            • ssmlMessage (dict) --

              A message in Speech Synthesis Markup Language (SSML).

              • value (string) -- [REQUIRED]

                The SSML text that defines the prompt.

            • imageResponseCard (dict) --

              A message that defines a response card that the client application can show to the user.

              • title (string) -- [REQUIRED]

                The title to display on the response card. The format of the title is determined by the platform displaying the response card.

              • subtitle (string) --

                The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

              • imageUrl (string) --

                The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

              • buttons (list) --

                A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                • (dict) --

                  Describes a button to use on a response card used to gather slot values from a user.

                  • text (string) -- [REQUIRED]

                    The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                  • value (string) -- [REQUIRED]

                    The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

          • variations (list) --

            Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

            • (dict) --

              The object that provides message text and it's type.

              • plainTextMessage (dict) --

                A message in plain text format.

                • value (string) -- [REQUIRED]

                  The message to send to the user.

              • customPayload (dict) --

                A message in a custom format defined by the client application.

                • value (string) -- [REQUIRED]

                  The string that is sent to your application.

              • ssmlMessage (dict) --

                A message in Speech Synthesis Markup Language (SSML).

                • value (string) -- [REQUIRED]

                  The SSML text that defines the prompt.

              • imageResponseCard (dict) --

                A message that defines a response card that the client application can show to the user.

                • title (string) -- [REQUIRED]

                  The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                • subtitle (string) --

                  The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                • imageUrl (string) --

                  The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                • buttons (list) --

                  A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                  • (dict) --

                    Describes a button to use on a response card used to gather slot values from a user.

                    • text (string) -- [REQUIRED]

                      The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                    • value (string) -- [REQUIRED]

                      The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

      • allowInterrupt (boolean) --

        Indicates whether the user can interrupt a speech response from Amazon Lex.

    • continueResponse (dict) -- [REQUIRED]

      The response that Amazon Lex sends to indicate that the bot is ready to continue the conversation.

      • messageGroups (list) -- [REQUIRED]

        A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.

        • (dict) --

          Provides one or more messages that Amazon Lex should send to the user.

          • message (dict) -- [REQUIRED]

            The primary message that Amazon Lex should send to the user.

            • plainTextMessage (dict) --

              A message in plain text format.

              • value (string) -- [REQUIRED]

                The message to send to the user.

            • customPayload (dict) --

              A message in a custom format defined by the client application.

              • value (string) -- [REQUIRED]

                The string that is sent to your application.

            • ssmlMessage (dict) --

              A message in Speech Synthesis Markup Language (SSML).

              • value (string) -- [REQUIRED]

                The SSML text that defines the prompt.

            • imageResponseCard (dict) --

              A message that defines a response card that the client application can show to the user.

              • title (string) -- [REQUIRED]

                The title to display on the response card. The format of the title is determined by the platform displaying the response card.

              • subtitle (string) --

                The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

              • imageUrl (string) --

                The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

              • buttons (list) --

                A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                • (dict) --

                  Describes a button to use on a response card used to gather slot values from a user.

                  • text (string) -- [REQUIRED]

                    The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                  • value (string) -- [REQUIRED]

                    The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

          • variations (list) --

            Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

            • (dict) --

              The object that provides message text and it's type.

              • plainTextMessage (dict) --

                A message in plain text format.

                • value (string) -- [REQUIRED]

                  The message to send to the user.

              • customPayload (dict) --

                A message in a custom format defined by the client application.

                • value (string) -- [REQUIRED]

                  The string that is sent to your application.

              • ssmlMessage (dict) --

                A message in Speech Synthesis Markup Language (SSML).

                • value (string) -- [REQUIRED]

                  The SSML text that defines the prompt.

              • imageResponseCard (dict) --

                A message that defines a response card that the client application can show to the user.

                • title (string) -- [REQUIRED]

                  The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                • subtitle (string) --

                  The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                • imageUrl (string) --

                  The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                • buttons (list) --

                  A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                  • (dict) --

                    Describes a button to use on a response card used to gather slot values from a user.

                    • text (string) -- [REQUIRED]

                      The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                    • value (string) -- [REQUIRED]

                      The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

      • allowInterrupt (boolean) --

        Indicates whether the user can interrupt a speech response from Amazon Lex.

    • stillWaitingResponse (dict) --

      A response that Amazon Lex sends periodically to the user to indicate that the bot is still waiting for input from the user.

      • messageGroups (list) -- [REQUIRED]

        One or more message groups, each containing one or more messages, that define the prompts that Amazon Lex sends to the user.

        • (dict) --

          Provides one or more messages that Amazon Lex should send to the user.

          • message (dict) -- [REQUIRED]

            The primary message that Amazon Lex should send to the user.

            • plainTextMessage (dict) --

              A message in plain text format.

              • value (string) -- [REQUIRED]

                The message to send to the user.

            • customPayload (dict) --

              A message in a custom format defined by the client application.

              • value (string) -- [REQUIRED]

                The string that is sent to your application.

            • ssmlMessage (dict) --

              A message in Speech Synthesis Markup Language (SSML).

              • value (string) -- [REQUIRED]

                The SSML text that defines the prompt.

            • imageResponseCard (dict) --

              A message that defines a response card that the client application can show to the user.

              • title (string) -- [REQUIRED]

                The title to display on the response card. The format of the title is determined by the platform displaying the response card.

              • subtitle (string) --

                The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

              • imageUrl (string) --

                The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

              • buttons (list) --

                A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                • (dict) --

                  Describes a button to use on a response card used to gather slot values from a user.

                  • text (string) -- [REQUIRED]

                    The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                  • value (string) -- [REQUIRED]

                    The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

          • variations (list) --

            Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

            • (dict) --

              The object that provides message text and it's type.

              • plainTextMessage (dict) --

                A message in plain text format.

                • value (string) -- [REQUIRED]

                  The message to send to the user.

              • customPayload (dict) --

                A message in a custom format defined by the client application.

                • value (string) -- [REQUIRED]

                  The string that is sent to your application.

              • ssmlMessage (dict) --

                A message in Speech Synthesis Markup Language (SSML).

                • value (string) -- [REQUIRED]

                  The SSML text that defines the prompt.

              • imageResponseCard (dict) --

                A message that defines a response card that the client application can show to the user.

                • title (string) -- [REQUIRED]

                  The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                • subtitle (string) --

                  The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                • imageUrl (string) --

                  The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                • buttons (list) --

                  A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                  • (dict) --

                    Describes a button to use on a response card used to gather slot values from a user.

                    • text (string) -- [REQUIRED]

                      The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                    • value (string) -- [REQUIRED]

                      The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

      • frequencyInSeconds (integer) -- [REQUIRED]

        How often a message should be sent to the user. Minimum of 1 second, maximum of 5 minutes.

      • timeoutInSeconds (integer) -- [REQUIRED]

        If Amazon Lex waits longer than this length of time for a response, it will stop sending messages.

      • allowInterrupt (boolean) --

        Indicates that the user can interrupt the response by speaking while the message is being played.

type obfuscationSetting

dict

param obfuscationSetting

Determines how slot values are used in Amazon CloudWatch logs. If the value of the obfuscationSetting parameter is DefaultObfuscation , slot values are obfuscated in the log output. If the value is None , the actual value is present in the log output.

The default is to obfuscate values in the CloudWatch logs.

  • obfuscationSettingType (string) -- [REQUIRED]

    Value that determines whether Amazon Lex obscures slot values in conversation logs. The default is to obscure the values.

type botId

string

param botId

[REQUIRED]

The identifier of the bot associated with the slot.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot associated with the slot.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale that the slot will be used in. The string must match one of the supported locales. All of the bots, intents, slot types used by the slot must have the same locale. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

type intentId

string

param intentId

[REQUIRED]

The identifier of the intent that contains the slot.

rtype

dict

returns

Response Syntax

{
    'slotId': 'string',
    'slotName': 'string',
    'description': 'string',
    'slotTypeId': 'string',
    'valueElicitationSetting': {
        'defaultValueSpecification': {
            'defaultValueList': [
                {
                    'defaultValue': 'string'
                },
            ]
        },
        'slotConstraint': 'Required'|'Optional',
        'promptSpecification': {
            'messageGroups': [
                {
                    'message': {
                        'plainTextMessage': {
                            'value': 'string'
                        },
                        'customPayload': {
                            'value': 'string'
                        },
                        'ssmlMessage': {
                            'value': 'string'
                        },
                        'imageResponseCard': {
                            'title': 'string',
                            'subtitle': 'string',
                            'imageUrl': 'string',
                            'buttons': [
                                {
                                    'text': 'string',
                                    'value': 'string'
                                },
                            ]
                        }
                    },
                    'variations': [
                        {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                    ]
                },
            ],
            'maxRetries': 123,
            'allowInterrupt': True|False
        },
        'sampleUtterances': [
            {
                'utterance': 'string'
            },
        ],
        'waitAndContinueSpecification': {
            'waitingResponse': {
                'messageGroups': [
                    {
                        'message': {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                        'variations': [
                            {
                                'plainTextMessage': {
                                    'value': 'string'
                                },
                                'customPayload': {
                                    'value': 'string'
                                },
                                'ssmlMessage': {
                                    'value': 'string'
                                },
                                'imageResponseCard': {
                                    'title': 'string',
                                    'subtitle': 'string',
                                    'imageUrl': 'string',
                                    'buttons': [
                                        {
                                            'text': 'string',
                                            'value': 'string'
                                        },
                                    ]
                                }
                            },
                        ]
                    },
                ],
                'allowInterrupt': True|False
            },
            'continueResponse': {
                'messageGroups': [
                    {
                        'message': {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                        'variations': [
                            {
                                'plainTextMessage': {
                                    'value': 'string'
                                },
                                'customPayload': {
                                    'value': 'string'
                                },
                                'ssmlMessage': {
                                    'value': 'string'
                                },
                                'imageResponseCard': {
                                    'title': 'string',
                                    'subtitle': 'string',
                                    'imageUrl': 'string',
                                    'buttons': [
                                        {
                                            'text': 'string',
                                            'value': 'string'
                                        },
                                    ]
                                }
                            },
                        ]
                    },
                ],
                'allowInterrupt': True|False
            },
            'stillWaitingResponse': {
                'messageGroups': [
                    {
                        'message': {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                        'variations': [
                            {
                                'plainTextMessage': {
                                    'value': 'string'
                                },
                                'customPayload': {
                                    'value': 'string'
                                },
                                'ssmlMessage': {
                                    'value': 'string'
                                },
                                'imageResponseCard': {
                                    'title': 'string',
                                    'subtitle': 'string',
                                    'imageUrl': 'string',
                                    'buttons': [
                                        {
                                            'text': 'string',
                                            'value': 'string'
                                        },
                                    ]
                                }
                            },
                        ]
                    },
                ],
                'frequencyInSeconds': 123,
                'timeoutInSeconds': 123,
                'allowInterrupt': True|False
            }
        }
    },
    'obfuscationSetting': {
        'obfuscationSettingType': 'None'|'DefaultObfuscation'
    },
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'intentId': 'string',
    'creationDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • slotId (string) --

      The unique identifier associated with the slot. Use this to identify the slot when you update or delete it.

    • slotName (string) --

      The name specified for the slot.

    • description (string) --

      The description associated with the slot.

    • slotTypeId (string) --

      The unique identifier of the slot type associated with this slot.

    • valueElicitationSetting (dict) --

      The value elicitation settings specified for the slot.

      • defaultValueSpecification (dict) --

        A list of default values for a slot. Default values are used when Amazon Lex hasn't determined a value for a slot. You can specify default values from context variables, sesion attributes, and defined values.

        • defaultValueList (list) --

          A list of default values. Amazon Lex chooses the default value to use in the order that they are presented in the list.

          • (dict) --

            Specifies the default value to use when a user doesn't provide a value for a slot.

            • defaultValue (string) --

              The default value to use when a user doesn't provide a value for a slot.

      • slotConstraint (string) --

        Specifies whether the slot is required or optional.

      • promptSpecification (dict) --

        The prompt that Amazon Lex uses to elicit the slot value from the user.

        • messageGroups (list) --

          A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.

          • (dict) --

            Provides one or more messages that Amazon Lex should send to the user.

            • message (dict) --

              The primary message that Amazon Lex should send to the user.

              • plainTextMessage (dict) --

                A message in plain text format.

                • value (string) --

                  The message to send to the user.

              • customPayload (dict) --

                A message in a custom format defined by the client application.

                • value (string) --

                  The string that is sent to your application.

              • ssmlMessage (dict) --

                A message in Speech Synthesis Markup Language (SSML).

                • value (string) --

                  The SSML text that defines the prompt.

              • imageResponseCard (dict) --

                A message that defines a response card that the client application can show to the user.

                • title (string) --

                  The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                • subtitle (string) --

                  The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                • imageUrl (string) --

                  The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                • buttons (list) --

                  A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                  • (dict) --

                    Describes a button to use on a response card used to gather slot values from a user.

                    • text (string) --

                      The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                    • value (string) --

                      The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

            • variations (list) --

              Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

              • (dict) --

                The object that provides message text and it's type.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

        • maxRetries (integer) --

          The maximum number of times the bot tries to elicit a resonse from the user using this prompt.

        • allowInterrupt (boolean) --

          Indicates whether the user can interrupt a speech prompt from the bot.

      • sampleUtterances (list) --

        If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy. This is optional. In most cases, Amazon Lex is capable of understanding user utterances.

        • (dict) --

          A sample utterance that invokes an intent or respond to a slot elicitation prompt.

          • utterance (string) --

            The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.

      • waitAndContinueSpecification (dict) --

        Specifies the prompts that Amazon Lex uses while a bot is waiting for customer input.

        • waitingResponse (dict) --

          The response that Amazon Lex sends to indicate that the bot is waiting for the conversation to continue.

          • messageGroups (list) --

            A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.

            • (dict) --

              Provides one or more messages that Amazon Lex should send to the user.

              • message (dict) --

                The primary message that Amazon Lex should send to the user.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

              • variations (list) --

                Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

                • (dict) --

                  The object that provides message text and it's type.

                  • plainTextMessage (dict) --

                    A message in plain text format.

                    • value (string) --

                      The message to send to the user.

                  • customPayload (dict) --

                    A message in a custom format defined by the client application.

                    • value (string) --

                      The string that is sent to your application.

                  • ssmlMessage (dict) --

                    A message in Speech Synthesis Markup Language (SSML).

                    • value (string) --

                      The SSML text that defines the prompt.

                  • imageResponseCard (dict) --

                    A message that defines a response card that the client application can show to the user.

                    • title (string) --

                      The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                    • subtitle (string) --

                      The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                    • imageUrl (string) --

                      The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                    • buttons (list) --

                      A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                      • (dict) --

                        Describes a button to use on a response card used to gather slot values from a user.

                        • text (string) --

                          The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                        • value (string) --

                          The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

          • allowInterrupt (boolean) --

            Indicates whether the user can interrupt a speech response from Amazon Lex.

        • continueResponse (dict) --

          The response that Amazon Lex sends to indicate that the bot is ready to continue the conversation.

          • messageGroups (list) --

            A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.

            • (dict) --

              Provides one or more messages that Amazon Lex should send to the user.

              • message (dict) --

                The primary message that Amazon Lex should send to the user.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

              • variations (list) --

                Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

                • (dict) --

                  The object that provides message text and it's type.

                  • plainTextMessage (dict) --

                    A message in plain text format.

                    • value (string) --

                      The message to send to the user.

                  • customPayload (dict) --

                    A message in a custom format defined by the client application.

                    • value (string) --

                      The string that is sent to your application.

                  • ssmlMessage (dict) --

                    A message in Speech Synthesis Markup Language (SSML).

                    • value (string) --

                      The SSML text that defines the prompt.

                  • imageResponseCard (dict) --

                    A message that defines a response card that the client application can show to the user.

                    • title (string) --

                      The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                    • subtitle (string) --

                      The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                    • imageUrl (string) --

                      The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                    • buttons (list) --

                      A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                      • (dict) --

                        Describes a button to use on a response card used to gather slot values from a user.

                        • text (string) --

                          The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                        • value (string) --

                          The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

          • allowInterrupt (boolean) --

            Indicates whether the user can interrupt a speech response from Amazon Lex.

        • stillWaitingResponse (dict) --

          A response that Amazon Lex sends periodically to the user to indicate that the bot is still waiting for input from the user.

          • messageGroups (list) --

            One or more message groups, each containing one or more messages, that define the prompts that Amazon Lex sends to the user.

            • (dict) --

              Provides one or more messages that Amazon Lex should send to the user.

              • message (dict) --

                The primary message that Amazon Lex should send to the user.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

              • variations (list) --

                Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

                • (dict) --

                  The object that provides message text and it's type.

                  • plainTextMessage (dict) --

                    A message in plain text format.

                    • value (string) --

                      The message to send to the user.

                  • customPayload (dict) --

                    A message in a custom format defined by the client application.

                    • value (string) --

                      The string that is sent to your application.

                  • ssmlMessage (dict) --

                    A message in Speech Synthesis Markup Language (SSML).

                    • value (string) --

                      The SSML text that defines the prompt.

                  • imageResponseCard (dict) --

                    A message that defines a response card that the client application can show to the user.

                    • title (string) --

                      The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                    • subtitle (string) --

                      The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                    • imageUrl (string) --

                      The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                    • buttons (list) --

                      A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                      • (dict) --

                        Describes a button to use on a response card used to gather slot values from a user.

                        • text (string) --

                          The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                        • value (string) --

                          The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

          • frequencyInSeconds (integer) --

            How often a message should be sent to the user. Minimum of 1 second, maximum of 5 minutes.

          • timeoutInSeconds (integer) --

            If Amazon Lex waits longer than this length of time for a response, it will stop sending messages.

          • allowInterrupt (boolean) --

            Indicates that the user can interrupt the response by speaking while the message is being played.

    • obfuscationSetting (dict) --

      Indicates whether the slot is configured to obfuscate values in Amazon CloudWatch logs.

      • obfuscationSettingType (string) --

        Value that determines whether Amazon Lex obscures slot values in conversation logs. The default is to obscure the values.

    • botId (string) --

      The unique identifier of the bot associated with the slot.

    • botVersion (string) --

      The version of the bot associated with the slot.

    • localeId (string) --

      The language and local specified for the slot.

    • intentId (string) --

      The unique identifier of the intent associated with the slot.

    • creationDateTime (datetime) --

      The timestamp of the date and time that the slot was created.

ListSlotTypes (new) Link ¶

Gets a list of slot types that match the specified criteria.

See also: AWS API Documentation

Request Syntax

client.list_slot_types(
    botId='string',
    botVersion='string',
    localeId='string',
    sortBy={
        'attribute': 'SlotTypeName'|'LastUpdatedDateTime',
        'order': 'Ascending'|'Descending'
    },
    filters=[
        {
            'name': 'SlotTypeName',
            'values': [
                'string',
            ],
            'operator': 'CO'|'EQ'
        },
    ],
    maxResults=123,
    nextToken='string'
)
type botId

string

param botId

[REQUIRED]

The unique identifier of the bot that contains the slot types.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot that contains the slot type.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale of the slot types to list. The string must match one of the supported locales. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

type sortBy

dict

param sortBy

Determines the sort order for the response from the ListSlotTypes operation. You can choose to sort by the slot type name or last updated date in either ascending or descending order.

  • attribute (string) -- [REQUIRED]

    The attribute to use to sort the list of slot types.

  • order (string) -- [REQUIRED]

    The order to sort the list. You can say ascending or descending.

type filters

list

param filters

Provides the specification of a filter used to limit the slot types in the response to only those that match the filter specification. You can only specify one filter and only one string to filter on.

  • (dict) --

    Filters the response from the ListSlotTypes operation.

    • name (string) -- [REQUIRED]

      The name of the field to use for filtering.

    • values (list) -- [REQUIRED]

      The value to use to filter the response.

      • (string) --

    • operator (string) -- [REQUIRED]

      The operator to use for the filter. Specify EQ when the ListSlotTypes operation should return only aliases that equal the specified value. Specify CO when the ListSlotTypes operation should return aliases that contain the specified value.

type maxResults

integer

param maxResults

The maximum number of slot types to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

type nextToken

string

param nextToken

If the response from the ListSlotTypes operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'slotTypeSummaries': [
        {
            'slotTypeId': 'string',
            'slotTypeName': 'string',
            'description': 'string',
            'parentSlotTypeSignature': 'string',
            'lastUpdatedDateTime': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • botId (string) --

      The identifier of the bot that contains the slot types.

    • botVersion (string) --

      The version of the bot that contains the slot types.

    • localeId (string) --

      The language and local of the slot types in the list.

    • slotTypeSummaries (list) --

      Summary information for the slot types that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more slot types available, the nextToken field contains a token to get the next page of results.

      • (dict) --

        Provides summary information about a slot type.

        • slotTypeId (string) --

          The unique identifier assigned to the slot type.

        • slotTypeName (string) --

          The name of the slot type.

        • description (string) --

          The description of the slot type.

        • parentSlotTypeSignature (string) --

          If the slot type is derived from a built-on slot type, the name of the parent slot type.

        • lastUpdatedDateTime (datetime) --

          A timestamp of the date and time that the slot type was last updated.

    • nextToken (string) --

      A token that indicates whether there are more results to return in a response to the ListSlotTypes operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListSlotTypes operation request to get the next page of results.

UpdateBot (new) Link ¶

Updates the configuration of an existing bot.

See also: AWS API Documentation

Request Syntax

client.update_bot(
    botId='string',
    botName='string',
    description='string',
    roleArn='string',
    dataPrivacy={
        'childDirected': True|False
    },
    idleSessionTTLInSeconds=123
)
type botId

string

param botId

[REQUIRED]

The unique identifier of the bot to update. This identifier is returned by the CreateBot operation.

type botName

string

param botName

[REQUIRED]

The new name of the bot. The name must be unique in the account that creates the bot.

type description

string

param description

A description of the bot.

type roleArn

string

param roleArn

[REQUIRED]

The Amazon Resource Name (ARN) of an IAM role that has permissions to access the bot.

type dataPrivacy

dict

param dataPrivacy

[REQUIRED]

Provides information on additional privacy protections Amazon Lex should use with the bot's data.

  • childDirected (boolean) -- [REQUIRED]

    For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children's Online Privacy Protection Act (COPPA) by specifying true or false in the childDirected field. By specifying true in the childDirected field, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying false in the childDirected field, you confirm that your use of Amazon Lex is not related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the childDirected field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the Amazon Lex FAQ .

type idleSessionTTLInSeconds

integer

param idleSessionTTLInSeconds

[REQUIRED]

The time, in seconds, that Amazon Lex should keep information about a user's conversation with the bot.

A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout.

You can specify between 60 (1 minute) and 86,400 (24 hours) seconds.

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botName': 'string',
    'description': 'string',
    'roleArn': 'string',
    'dataPrivacy': {
        'childDirected': True|False
    },
    'idleSessionTTLInSeconds': 123,
    'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning',
    'creationDateTime': datetime(2015, 1, 1),
    'lastUpdatedDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • botId (string) --

      The unique identifier of the bot that was updated.

    • botName (string) --

      The name of the bot after the update.

    • description (string) --

      The description of the bot after the update.

    • roleArn (string) --

      The Amazon Resource Name (ARN) of the IAM role used by the bot after the update.

    • dataPrivacy (dict) --

      The data privacy settings for the bot after the update.

      • childDirected (boolean) --

        For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children's Online Privacy Protection Act (COPPA) by specifying true or false in the childDirected field. By specifying true in the childDirected field, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying false in the childDirected field, you confirm that your use of Amazon Lex is not related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the childDirected field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the Amazon Lex FAQ .

    • idleSessionTTLInSeconds (integer) --

      The session timeout, in seconds, for the bot after the update.

    • botStatus (string) --

      Shows the current status of the bot. The bot is first in the Creating status. Once the bot is read for use, it changes to the Available status. After the bot is created, you can use the DRAFT version of the bot.

    • creationDateTime (datetime) --

      A timestamp of the date and time that the bot was created.

    • lastUpdatedDateTime (datetime) --

      A timestamp of the date and time that the bot was last updated.

UpdateSlot (new) Link ¶

Updates the settings for a slot.

See also: AWS API Documentation

Request Syntax

client.update_slot(
    slotId='string',
    slotName='string',
    description='string',
    slotTypeId='string',
    valueElicitationSetting={
        'defaultValueSpecification': {
            'defaultValueList': [
                {
                    'defaultValue': 'string'
                },
            ]
        },
        'slotConstraint': 'Required'|'Optional',
        'promptSpecification': {
            'messageGroups': [
                {
                    'message': {
                        'plainTextMessage': {
                            'value': 'string'
                        },
                        'customPayload': {
                            'value': 'string'
                        },
                        'ssmlMessage': {
                            'value': 'string'
                        },
                        'imageResponseCard': {
                            'title': 'string',
                            'subtitle': 'string',
                            'imageUrl': 'string',
                            'buttons': [
                                {
                                    'text': 'string',
                                    'value': 'string'
                                },
                            ]
                        }
                    },
                    'variations': [
                        {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                    ]
                },
            ],
            'maxRetries': 123,
            'allowInterrupt': True|False
        },
        'sampleUtterances': [
            {
                'utterance': 'string'
            },
        ],
        'waitAndContinueSpecification': {
            'waitingResponse': {
                'messageGroups': [
                    {
                        'message': {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                        'variations': [
                            {
                                'plainTextMessage': {
                                    'value': 'string'
                                },
                                'customPayload': {
                                    'value': 'string'
                                },
                                'ssmlMessage': {
                                    'value': 'string'
                                },
                                'imageResponseCard': {
                                    'title': 'string',
                                    'subtitle': 'string',
                                    'imageUrl': 'string',
                                    'buttons': [
                                        {
                                            'text': 'string',
                                            'value': 'string'
                                        },
                                    ]
                                }
                            },
                        ]
                    },
                ],
                'allowInterrupt': True|False
            },
            'continueResponse': {
                'messageGroups': [
                    {
                        'message': {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                        'variations': [
                            {
                                'plainTextMessage': {
                                    'value': 'string'
                                },
                                'customPayload': {
                                    'value': 'string'
                                },
                                'ssmlMessage': {
                                    'value': 'string'
                                },
                                'imageResponseCard': {
                                    'title': 'string',
                                    'subtitle': 'string',
                                    'imageUrl': 'string',
                                    'buttons': [
                                        {
                                            'text': 'string',
                                            'value': 'string'
                                        },
                                    ]
                                }
                            },
                        ]
                    },
                ],
                'allowInterrupt': True|False
            },
            'stillWaitingResponse': {
                'messageGroups': [
                    {
                        'message': {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                        'variations': [
                            {
                                'plainTextMessage': {
                                    'value': 'string'
                                },
                                'customPayload': {
                                    'value': 'string'
                                },
                                'ssmlMessage': {
                                    'value': 'string'
                                },
                                'imageResponseCard': {
                                    'title': 'string',
                                    'subtitle': 'string',
                                    'imageUrl': 'string',
                                    'buttons': [
                                        {
                                            'text': 'string',
                                            'value': 'string'
                                        },
                                    ]
                                }
                            },
                        ]
                    },
                ],
                'frequencyInSeconds': 123,
                'timeoutInSeconds': 123,
                'allowInterrupt': True|False
            }
        }
    },
    obfuscationSetting={
        'obfuscationSettingType': 'None'|'DefaultObfuscation'
    },
    botId='string',
    botVersion='string',
    localeId='string',
    intentId='string'
)
type slotId

string

param slotId

[REQUIRED]

The unique identifier for the slot to update.

type slotName

string

param slotName

[REQUIRED]

The new name for the slot.

type description

string

param description

The new description for the slot.

type slotTypeId

string

param slotTypeId

[REQUIRED]

The unique identifier of the new slot type to associate with this slot.

type valueElicitationSetting

dict

param valueElicitationSetting

[REQUIRED]

A new set of prompts that Amazon Lex sends to the user to elicit a response the provides a value for the slot.

  • defaultValueSpecification (dict) --

    A list of default values for a slot. Default values are used when Amazon Lex hasn't determined a value for a slot. You can specify default values from context variables, sesion attributes, and defined values.

    • defaultValueList (list) -- [REQUIRED]

      A list of default values. Amazon Lex chooses the default value to use in the order that they are presented in the list.

      • (dict) --

        Specifies the default value to use when a user doesn't provide a value for a slot.

        • defaultValue (string) -- [REQUIRED]

          The default value to use when a user doesn't provide a value for a slot.

  • slotConstraint (string) -- [REQUIRED]

    Specifies whether the slot is required or optional.

  • promptSpecification (dict) --

    The prompt that Amazon Lex uses to elicit the slot value from the user.

    • messageGroups (list) -- [REQUIRED]

      A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.

      • (dict) --

        Provides one or more messages that Amazon Lex should send to the user.

        • message (dict) -- [REQUIRED]

          The primary message that Amazon Lex should send to the user.

          • plainTextMessage (dict) --

            A message in plain text format.

            • value (string) -- [REQUIRED]

              The message to send to the user.

          • customPayload (dict) --

            A message in a custom format defined by the client application.

            • value (string) -- [REQUIRED]

              The string that is sent to your application.

          • ssmlMessage (dict) --

            A message in Speech Synthesis Markup Language (SSML).

            • value (string) -- [REQUIRED]

              The SSML text that defines the prompt.

          • imageResponseCard (dict) --

            A message that defines a response card that the client application can show to the user.

            • title (string) -- [REQUIRED]

              The title to display on the response card. The format of the title is determined by the platform displaying the response card.

            • subtitle (string) --

              The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

            • imageUrl (string) --

              The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

            • buttons (list) --

              A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

              • (dict) --

                Describes a button to use on a response card used to gather slot values from a user.

                • text (string) -- [REQUIRED]

                  The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                • value (string) -- [REQUIRED]

                  The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

        • variations (list) --

          Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

          • (dict) --

            The object that provides message text and it's type.

            • plainTextMessage (dict) --

              A message in plain text format.

              • value (string) -- [REQUIRED]

                The message to send to the user.

            • customPayload (dict) --

              A message in a custom format defined by the client application.

              • value (string) -- [REQUIRED]

                The string that is sent to your application.

            • ssmlMessage (dict) --

              A message in Speech Synthesis Markup Language (SSML).

              • value (string) -- [REQUIRED]

                The SSML text that defines the prompt.

            • imageResponseCard (dict) --

              A message that defines a response card that the client application can show to the user.

              • title (string) -- [REQUIRED]

                The title to display on the response card. The format of the title is determined by the platform displaying the response card.

              • subtitle (string) --

                The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

              • imageUrl (string) --

                The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

              • buttons (list) --

                A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                • (dict) --

                  Describes a button to use on a response card used to gather slot values from a user.

                  • text (string) -- [REQUIRED]

                    The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                  • value (string) -- [REQUIRED]

                    The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

    • maxRetries (integer) -- [REQUIRED]

      The maximum number of times the bot tries to elicit a resonse from the user using this prompt.

    • allowInterrupt (boolean) --

      Indicates whether the user can interrupt a speech prompt from the bot.

  • sampleUtterances (list) --

    If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy. This is optional. In most cases, Amazon Lex is capable of understanding user utterances.

    • (dict) --

      A sample utterance that invokes an intent or respond to a slot elicitation prompt.

      • utterance (string) -- [REQUIRED]

        The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.

  • waitAndContinueSpecification (dict) --

    Specifies the prompts that Amazon Lex uses while a bot is waiting for customer input.

    • waitingResponse (dict) -- [REQUIRED]

      The response that Amazon Lex sends to indicate that the bot is waiting for the conversation to continue.

      • messageGroups (list) -- [REQUIRED]

        A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.

        • (dict) --

          Provides one or more messages that Amazon Lex should send to the user.

          • message (dict) -- [REQUIRED]

            The primary message that Amazon Lex should send to the user.

            • plainTextMessage (dict) --

              A message in plain text format.

              • value (string) -- [REQUIRED]

                The message to send to the user.

            • customPayload (dict) --

              A message in a custom format defined by the client application.

              • value (string) -- [REQUIRED]

                The string that is sent to your application.

            • ssmlMessage (dict) --

              A message in Speech Synthesis Markup Language (SSML).

              • value (string) -- [REQUIRED]

                The SSML text that defines the prompt.

            • imageResponseCard (dict) --

              A message that defines a response card that the client application can show to the user.

              • title (string) -- [REQUIRED]

                The title to display on the response card. The format of the title is determined by the platform displaying the response card.

              • subtitle (string) --

                The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

              • imageUrl (string) --

                The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

              • buttons (list) --

                A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                • (dict) --

                  Describes a button to use on a response card used to gather slot values from a user.

                  • text (string) -- [REQUIRED]

                    The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                  • value (string) -- [REQUIRED]

                    The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

          • variations (list) --

            Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

            • (dict) --

              The object that provides message text and it's type.

              • plainTextMessage (dict) --

                A message in plain text format.

                • value (string) -- [REQUIRED]

                  The message to send to the user.

              • customPayload (dict) --

                A message in a custom format defined by the client application.

                • value (string) -- [REQUIRED]

                  The string that is sent to your application.

              • ssmlMessage (dict) --

                A message in Speech Synthesis Markup Language (SSML).

                • value (string) -- [REQUIRED]

                  The SSML text that defines the prompt.

              • imageResponseCard (dict) --

                A message that defines a response card that the client application can show to the user.

                • title (string) -- [REQUIRED]

                  The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                • subtitle (string) --

                  The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                • imageUrl (string) --

                  The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                • buttons (list) --

                  A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                  • (dict) --

                    Describes a button to use on a response card used to gather slot values from a user.

                    • text (string) -- [REQUIRED]

                      The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                    • value (string) -- [REQUIRED]

                      The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

      • allowInterrupt (boolean) --

        Indicates whether the user can interrupt a speech response from Amazon Lex.

    • continueResponse (dict) -- [REQUIRED]

      The response that Amazon Lex sends to indicate that the bot is ready to continue the conversation.

      • messageGroups (list) -- [REQUIRED]

        A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.

        • (dict) --

          Provides one or more messages that Amazon Lex should send to the user.

          • message (dict) -- [REQUIRED]

            The primary message that Amazon Lex should send to the user.

            • plainTextMessage (dict) --

              A message in plain text format.

              • value (string) -- [REQUIRED]

                The message to send to the user.

            • customPayload (dict) --

              A message in a custom format defined by the client application.

              • value (string) -- [REQUIRED]

                The string that is sent to your application.

            • ssmlMessage (dict) --

              A message in Speech Synthesis Markup Language (SSML).

              • value (string) -- [REQUIRED]

                The SSML text that defines the prompt.

            • imageResponseCard (dict) --

              A message that defines a response card that the client application can show to the user.

              • title (string) -- [REQUIRED]

                The title to display on the response card. The format of the title is determined by the platform displaying the response card.

              • subtitle (string) --

                The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

              • imageUrl (string) --

                The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

              • buttons (list) --

                A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                • (dict) --

                  Describes a button to use on a response card used to gather slot values from a user.

                  • text (string) -- [REQUIRED]

                    The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                  • value (string) -- [REQUIRED]

                    The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

          • variations (list) --

            Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

            • (dict) --

              The object that provides message text and it's type.

              • plainTextMessage (dict) --

                A message in plain text format.

                • value (string) -- [REQUIRED]

                  The message to send to the user.

              • customPayload (dict) --

                A message in a custom format defined by the client application.

                • value (string) -- [REQUIRED]

                  The string that is sent to your application.

              • ssmlMessage (dict) --

                A message in Speech Synthesis Markup Language (SSML).

                • value (string) -- [REQUIRED]

                  The SSML text that defines the prompt.

              • imageResponseCard (dict) --

                A message that defines a response card that the client application can show to the user.

                • title (string) -- [REQUIRED]

                  The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                • subtitle (string) --

                  The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                • imageUrl (string) --

                  The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                • buttons (list) --

                  A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                  • (dict) --

                    Describes a button to use on a response card used to gather slot values from a user.

                    • text (string) -- [REQUIRED]

                      The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                    • value (string) -- [REQUIRED]

                      The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

      • allowInterrupt (boolean) --

        Indicates whether the user can interrupt a speech response from Amazon Lex.

    • stillWaitingResponse (dict) --

      A response that Amazon Lex sends periodically to the user to indicate that the bot is still waiting for input from the user.

      • messageGroups (list) -- [REQUIRED]

        One or more message groups, each containing one or more messages, that define the prompts that Amazon Lex sends to the user.

        • (dict) --

          Provides one or more messages that Amazon Lex should send to the user.

          • message (dict) -- [REQUIRED]

            The primary message that Amazon Lex should send to the user.

            • plainTextMessage (dict) --

              A message in plain text format.

              • value (string) -- [REQUIRED]

                The message to send to the user.

            • customPayload (dict) --

              A message in a custom format defined by the client application.

              • value (string) -- [REQUIRED]

                The string that is sent to your application.

            • ssmlMessage (dict) --

              A message in Speech Synthesis Markup Language (SSML).

              • value (string) -- [REQUIRED]

                The SSML text that defines the prompt.

            • imageResponseCard (dict) --

              A message that defines a response card that the client application can show to the user.

              • title (string) -- [REQUIRED]

                The title to display on the response card. The format of the title is determined by the platform displaying the response card.

              • subtitle (string) --

                The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

              • imageUrl (string) --

                The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

              • buttons (list) --

                A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                • (dict) --

                  Describes a button to use on a response card used to gather slot values from a user.

                  • text (string) -- [REQUIRED]

                    The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                  • value (string) -- [REQUIRED]

                    The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

          • variations (list) --

            Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

            • (dict) --

              The object that provides message text and it's type.

              • plainTextMessage (dict) --

                A message in plain text format.

                • value (string) -- [REQUIRED]

                  The message to send to the user.

              • customPayload (dict) --

                A message in a custom format defined by the client application.

                • value (string) -- [REQUIRED]

                  The string that is sent to your application.

              • ssmlMessage (dict) --

                A message in Speech Synthesis Markup Language (SSML).

                • value (string) -- [REQUIRED]

                  The SSML text that defines the prompt.

              • imageResponseCard (dict) --

                A message that defines a response card that the client application can show to the user.

                • title (string) -- [REQUIRED]

                  The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                • subtitle (string) --

                  The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                • imageUrl (string) --

                  The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                • buttons (list) --

                  A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                  • (dict) --

                    Describes a button to use on a response card used to gather slot values from a user.

                    • text (string) -- [REQUIRED]

                      The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                    • value (string) -- [REQUIRED]

                      The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

      • frequencyInSeconds (integer) -- [REQUIRED]

        How often a message should be sent to the user. Minimum of 1 second, maximum of 5 minutes.

      • timeoutInSeconds (integer) -- [REQUIRED]

        If Amazon Lex waits longer than this length of time for a response, it will stop sending messages.

      • allowInterrupt (boolean) --

        Indicates that the user can interrupt the response by speaking while the message is being played.

type obfuscationSetting

dict

param obfuscationSetting

New settings that determine how slot values are formatted in Amazon CloudWatch logs.

  • obfuscationSettingType (string) -- [REQUIRED]

    Value that determines whether Amazon Lex obscures slot values in conversation logs. The default is to obscure the values.

type botId

string

param botId

[REQUIRED]

The unique identifier of the bot that contains the slot.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot that contains the slot. Must always be DRAFT .

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale that contains the slot. The string must match one of the supported locales. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

type intentId

string

param intentId

[REQUIRED]

The identifier of the intent that contains the slot.

rtype

dict

returns

Response Syntax

{
    'slotId': 'string',
    'slotName': 'string',
    'description': 'string',
    'slotTypeId': 'string',
    'valueElicitationSetting': {
        'defaultValueSpecification': {
            'defaultValueList': [
                {
                    'defaultValue': 'string'
                },
            ]
        },
        'slotConstraint': 'Required'|'Optional',
        'promptSpecification': {
            'messageGroups': [
                {
                    'message': {
                        'plainTextMessage': {
                            'value': 'string'
                        },
                        'customPayload': {
                            'value': 'string'
                        },
                        'ssmlMessage': {
                            'value': 'string'
                        },
                        'imageResponseCard': {
                            'title': 'string',
                            'subtitle': 'string',
                            'imageUrl': 'string',
                            'buttons': [
                                {
                                    'text': 'string',
                                    'value': 'string'
                                },
                            ]
                        }
                    },
                    'variations': [
                        {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                    ]
                },
            ],
            'maxRetries': 123,
            'allowInterrupt': True|False
        },
        'sampleUtterances': [
            {
                'utterance': 'string'
            },
        ],
        'waitAndContinueSpecification': {
            'waitingResponse': {
                'messageGroups': [
                    {
                        'message': {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                        'variations': [
                            {
                                'plainTextMessage': {
                                    'value': 'string'
                                },
                                'customPayload': {
                                    'value': 'string'
                                },
                                'ssmlMessage': {
                                    'value': 'string'
                                },
                                'imageResponseCard': {
                                    'title': 'string',
                                    'subtitle': 'string',
                                    'imageUrl': 'string',
                                    'buttons': [
                                        {
                                            'text': 'string',
                                            'value': 'string'
                                        },
                                    ]
                                }
                            },
                        ]
                    },
                ],
                'allowInterrupt': True|False
            },
            'continueResponse': {
                'messageGroups': [
                    {
                        'message': {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                        'variations': [
                            {
                                'plainTextMessage': {
                                    'value': 'string'
                                },
                                'customPayload': {
                                    'value': 'string'
                                },
                                'ssmlMessage': {
                                    'value': 'string'
                                },
                                'imageResponseCard': {
                                    'title': 'string',
                                    'subtitle': 'string',
                                    'imageUrl': 'string',
                                    'buttons': [
                                        {
                                            'text': 'string',
                                            'value': 'string'
                                        },
                                    ]
                                }
                            },
                        ]
                    },
                ],
                'allowInterrupt': True|False
            },
            'stillWaitingResponse': {
                'messageGroups': [
                    {
                        'message': {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                        'variations': [
                            {
                                'plainTextMessage': {
                                    'value': 'string'
                                },
                                'customPayload': {
                                    'value': 'string'
                                },
                                'ssmlMessage': {
                                    'value': 'string'
                                },
                                'imageResponseCard': {
                                    'title': 'string',
                                    'subtitle': 'string',
                                    'imageUrl': 'string',
                                    'buttons': [
                                        {
                                            'text': 'string',
                                            'value': 'string'
                                        },
                                    ]
                                }
                            },
                        ]
                    },
                ],
                'frequencyInSeconds': 123,
                'timeoutInSeconds': 123,
                'allowInterrupt': True|False
            }
        }
    },
    'obfuscationSetting': {
        'obfuscationSettingType': 'None'|'DefaultObfuscation'
    },
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'intentId': 'string',
    'creationDateTime': datetime(2015, 1, 1),
    'lastUpdatedDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • slotId (string) --

      The unique identifier of the slot that was updated.

    • slotName (string) --

      The updated name of the slot.

    • description (string) --

      The updated description of the bot.

    • slotTypeId (string) --

      The updated identifier of the slot type that provides values for the slot.

    • valueElicitationSetting (dict) --

      The updated prompts that Amazon Lex sends to the user to elicit a response that provides a value for the slot.

      • defaultValueSpecification (dict) --

        A list of default values for a slot. Default values are used when Amazon Lex hasn't determined a value for a slot. You can specify default values from context variables, sesion attributes, and defined values.

        • defaultValueList (list) --

          A list of default values. Amazon Lex chooses the default value to use in the order that they are presented in the list.

          • (dict) --

            Specifies the default value to use when a user doesn't provide a value for a slot.

            • defaultValue (string) --

              The default value to use when a user doesn't provide a value for a slot.

      • slotConstraint (string) --

        Specifies whether the slot is required or optional.

      • promptSpecification (dict) --

        The prompt that Amazon Lex uses to elicit the slot value from the user.

        • messageGroups (list) --

          A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.

          • (dict) --

            Provides one or more messages that Amazon Lex should send to the user.

            • message (dict) --

              The primary message that Amazon Lex should send to the user.

              • plainTextMessage (dict) --

                A message in plain text format.

                • value (string) --

                  The message to send to the user.

              • customPayload (dict) --

                A message in a custom format defined by the client application.

                • value (string) --

                  The string that is sent to your application.

              • ssmlMessage (dict) --

                A message in Speech Synthesis Markup Language (SSML).

                • value (string) --

                  The SSML text that defines the prompt.

              • imageResponseCard (dict) --

                A message that defines a response card that the client application can show to the user.

                • title (string) --

                  The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                • subtitle (string) --

                  The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                • imageUrl (string) --

                  The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                • buttons (list) --

                  A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                  • (dict) --

                    Describes a button to use on a response card used to gather slot values from a user.

                    • text (string) --

                      The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                    • value (string) --

                      The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

            • variations (list) --

              Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

              • (dict) --

                The object that provides message text and it's type.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

        • maxRetries (integer) --

          The maximum number of times the bot tries to elicit a resonse from the user using this prompt.

        • allowInterrupt (boolean) --

          Indicates whether the user can interrupt a speech prompt from the bot.

      • sampleUtterances (list) --

        If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy. This is optional. In most cases, Amazon Lex is capable of understanding user utterances.

        • (dict) --

          A sample utterance that invokes an intent or respond to a slot elicitation prompt.

          • utterance (string) --

            The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.

      • waitAndContinueSpecification (dict) --

        Specifies the prompts that Amazon Lex uses while a bot is waiting for customer input.

        • waitingResponse (dict) --

          The response that Amazon Lex sends to indicate that the bot is waiting for the conversation to continue.

          • messageGroups (list) --

            A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.

            • (dict) --

              Provides one or more messages that Amazon Lex should send to the user.

              • message (dict) --

                The primary message that Amazon Lex should send to the user.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

              • variations (list) --

                Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

                • (dict) --

                  The object that provides message text and it's type.

                  • plainTextMessage (dict) --

                    A message in plain text format.

                    • value (string) --

                      The message to send to the user.

                  • customPayload (dict) --

                    A message in a custom format defined by the client application.

                    • value (string) --

                      The string that is sent to your application.

                  • ssmlMessage (dict) --

                    A message in Speech Synthesis Markup Language (SSML).

                    • value (string) --

                      The SSML text that defines the prompt.

                  • imageResponseCard (dict) --

                    A message that defines a response card that the client application can show to the user.

                    • title (string) --

                      The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                    • subtitle (string) --

                      The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                    • imageUrl (string) --

                      The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                    • buttons (list) --

                      A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                      • (dict) --

                        Describes a button to use on a response card used to gather slot values from a user.

                        • text (string) --

                          The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                        • value (string) --

                          The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

          • allowInterrupt (boolean) --

            Indicates whether the user can interrupt a speech response from Amazon Lex.

        • continueResponse (dict) --

          The response that Amazon Lex sends to indicate that the bot is ready to continue the conversation.

          • messageGroups (list) --

            A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.

            • (dict) --

              Provides one or more messages that Amazon Lex should send to the user.

              • message (dict) --

                The primary message that Amazon Lex should send to the user.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

              • variations (list) --

                Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

                • (dict) --

                  The object that provides message text and it's type.

                  • plainTextMessage (dict) --

                    A message in plain text format.

                    • value (string) --

                      The message to send to the user.

                  • customPayload (dict) --

                    A message in a custom format defined by the client application.

                    • value (string) --

                      The string that is sent to your application.

                  • ssmlMessage (dict) --

                    A message in Speech Synthesis Markup Language (SSML).

                    • value (string) --

                      The SSML text that defines the prompt.

                  • imageResponseCard (dict) --

                    A message that defines a response card that the client application can show to the user.

                    • title (string) --

                      The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                    • subtitle (string) --

                      The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                    • imageUrl (string) --

                      The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                    • buttons (list) --

                      A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                      • (dict) --

                        Describes a button to use on a response card used to gather slot values from a user.

                        • text (string) --

                          The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                        • value (string) --

                          The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

          • allowInterrupt (boolean) --

            Indicates whether the user can interrupt a speech response from Amazon Lex.

        • stillWaitingResponse (dict) --

          A response that Amazon Lex sends periodically to the user to indicate that the bot is still waiting for input from the user.

          • messageGroups (list) --

            One or more message groups, each containing one or more messages, that define the prompts that Amazon Lex sends to the user.

            • (dict) --

              Provides one or more messages that Amazon Lex should send to the user.

              • message (dict) --

                The primary message that Amazon Lex should send to the user.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

              • variations (list) --

                Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

                • (dict) --

                  The object that provides message text and it's type.

                  • plainTextMessage (dict) --

                    A message in plain text format.

                    • value (string) --

                      The message to send to the user.

                  • customPayload (dict) --

                    A message in a custom format defined by the client application.

                    • value (string) --

                      The string that is sent to your application.

                  • ssmlMessage (dict) --

                    A message in Speech Synthesis Markup Language (SSML).

                    • value (string) --

                      The SSML text that defines the prompt.

                  • imageResponseCard (dict) --

                    A message that defines a response card that the client application can show to the user.

                    • title (string) --

                      The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                    • subtitle (string) --

                      The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                    • imageUrl (string) --

                      The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                    • buttons (list) --

                      A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                      • (dict) --

                        Describes a button to use on a response card used to gather slot values from a user.

                        • text (string) --

                          The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                        • value (string) --

                          The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

          • frequencyInSeconds (integer) --

            How often a message should be sent to the user. Minimum of 1 second, maximum of 5 minutes.

          • timeoutInSeconds (integer) --

            If Amazon Lex waits longer than this length of time for a response, it will stop sending messages.

          • allowInterrupt (boolean) --

            Indicates that the user can interrupt the response by speaking while the message is being played.

    • obfuscationSetting (dict) --

      The updated setting that determines whether the slot value is obfuscated in the Amazon CloudWatch logs.

      • obfuscationSettingType (string) --

        Value that determines whether Amazon Lex obscures slot values in conversation logs. The default is to obscure the values.

    • botId (string) --

      The identifier of the bot that contains the slot.

    • botVersion (string) --

      The identifier of the slot version that contains the slot. Will always be DRAFT .

    • localeId (string) --

      The locale that contains the slot.

    • intentId (string) --

      The intent that contains the slot.

    • creationDateTime (datetime) --

      The timestamp of the date and time that the slot was created.

    • lastUpdatedDateTime (datetime) --

      The timestamp of the date and time that the slot was last updated.

UpdateBotAlias (new) Link ¶

Updates the configuration of an existing bot alias.

See also: AWS API Documentation

Request Syntax

client.update_bot_alias(
    botAliasId='string',
    botAliasName='string',
    description='string',
    botVersion='string',
    botAliasLocaleSettings={
        'string': {
            'enabled': True|False,
            'codeHookSpecification': {
                'lambdaCodeHook': {
                    'lambdaARN': 'string',
                    'codeHookInterfaceVersion': 'string'
                }
            }
        }
    },
    conversationLogSettings={
        'textLogSettings': [
            {
                'enabled': True|False,
                'destination': {
                    'cloudWatch': {
                        'cloudWatchLogGroupArn': 'string',
                        'logPrefix': 'string'
                    }
                }
            },
        ],
        'audioLogSettings': [
            {
                'enabled': True|False,
                'destination': {
                    's3Bucket': {
                        'kmsKeyArn': 'string',
                        's3BucketArn': 'string',
                        'logPrefix': 'string'
                    }
                }
            },
        ]
    },
    sentimentAnalysisSettings={
        'detectSentiment': True|False
    },
    botId='string'
)
type botAliasId

string

param botAliasId

[REQUIRED]

The unique identifier of the bot alias.

type botAliasName

string

param botAliasName

[REQUIRED]

The new name to assign to the bot alias.

type description

string

param description

The new description to assign to the bot alias.

type botVersion

string

param botVersion

The new bot version to assign to the bot alias.

type botAliasLocaleSettings

dict

param botAliasLocaleSettings

The new Lambda functions to use in each locale for the bot alias.

  • (string) --

    • (dict) --

      Specifies settings that are unique to a locale. For example, you can use different Lambda function depending on the bot's locale.

      • enabled (boolean) -- [REQUIRED]

        Determines whether the locale is enabled for the bot. If the value is false , the locale isn't available for use.

      • codeHookSpecification (dict) --

        Specifies the Lambda function that should be used in the locale.

        • lambdaCodeHook (dict) -- [REQUIRED]

          Specifies a Lambda function that verifies requests to a bot or fulfilles the user's request to a bot.

          • lambdaARN (string) -- [REQUIRED]

            The Amazon Resource Name (ARN) of the Lambda function.

          • codeHookInterfaceVersion (string) -- [REQUIRED]

            The version of the request-response that you want Amazon Lex to use to invoke your Lambda function.

type conversationLogSettings

dict

param conversationLogSettings

The new settings for storing conversation logs in Amazon CloudWatch Logs and Amazon S3 buckets.

  • textLogSettings (list) --

    The Amazon CloudWatch Logs settings for logging text and metadata.

    • (dict) --

      Defines settings to enable text conversation logs.

      • enabled (boolean) -- [REQUIRED]

        Determines whether conversation logs should be stored for an alias.

      • destination (dict) -- [REQUIRED]

        Defines the Amazon CloudWatch Logs destination log group for conversation text logs.

        • cloudWatch (dict) -- [REQUIRED]

          Defines the Amazon CloudWatch Logs log group where text and metadata logs are delivered.

          • cloudWatchLogGroupArn (string) -- [REQUIRED]

            The Amazon Resource Name (ARN) of the log group where text and metadata logs are delivered.

          • logPrefix (string) -- [REQUIRED]

            The prefix of the log stream name within the log group that you specified

  • audioLogSettings (list) --

    The Amazon S3 settings for logging audio to an S3 bucket.

    • (dict) --

      Settings for logging audio of conversations between Amazon Lex and a user. You specify whether to log audio and the Amazon S3 bucket where the audio file is stored.

      • enabled (boolean) -- [REQUIRED]

        Determines whether audio logging in enabled for the bot.

      • destination (dict) -- [REQUIRED]

        The location of audio log files collected when conversation logging is enabled for a bot.

        • s3Bucket (dict) -- [REQUIRED]

          The Amazon S3 bucket where the audio log files are stored. The IAM role specified in the roleArn parameter of the CreateBot operation must have permission to write to this bucket.

          • kmsKeyArn (string) --

            The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key for encrypting audio log files stored in an S3 bucket.

          • s3BucketArn (string) -- [REQUIRED]

            The Amazon Resource Name (ARN) of an Amazon S3 bucket where audio log files are stored.

          • logPrefix (string) -- [REQUIRED]

            The S3 prefix to assign to audio log files.

type sentimentAnalysisSettings

dict

param sentimentAnalysisSettings

Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.

  • detectSentiment (boolean) -- [REQUIRED]

    Sets whether Amazon Lex uses Amazon Comprehend to detect the sentiment of user utterances.

type botId

string

param botId

[REQUIRED]

The identifier of the bot with the updated alias.

rtype

dict

returns

Response Syntax

{
    'botAliasId': 'string',
    'botAliasName': 'string',
    'description': 'string',
    'botVersion': 'string',
    'botAliasLocaleSettings': {
        'string': {
            'enabled': True|False,
            'codeHookSpecification': {
                'lambdaCodeHook': {
                    'lambdaARN': 'string',
                    'codeHookInterfaceVersion': 'string'
                }
            }
        }
    },
    'conversationLogSettings': {
        'textLogSettings': [
            {
                'enabled': True|False,
                'destination': {
                    'cloudWatch': {
                        'cloudWatchLogGroupArn': 'string',
                        'logPrefix': 'string'
                    }
                }
            },
        ],
        'audioLogSettings': [
            {
                'enabled': True|False,
                'destination': {
                    's3Bucket': {
                        'kmsKeyArn': 'string',
                        's3BucketArn': 'string',
                        'logPrefix': 'string'
                    }
                }
            },
        ]
    },
    'sentimentAnalysisSettings': {
        'detectSentiment': True|False
    },
    'botAliasStatus': 'Creating'|'Available'|'Deleting'|'Failed',
    'botId': 'string',
    'creationDateTime': datetime(2015, 1, 1),
    'lastUpdatedDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • botAliasId (string) --

      The identifier of the updated bot alias.

    • botAliasName (string) --

      The updated name of the bot alias.

    • description (string) --

      The updated description of the bot alias.

    • botVersion (string) --

      The updated version of the bot that the alias points to.

    • botAliasLocaleSettings (dict) --

      The updated Lambda functions to use in each locale for the bot alias.

      • (string) --

        • (dict) --

          Specifies settings that are unique to a locale. For example, you can use different Lambda function depending on the bot's locale.

          • enabled (boolean) --

            Determines whether the locale is enabled for the bot. If the value is false , the locale isn't available for use.

          • codeHookSpecification (dict) --

            Specifies the Lambda function that should be used in the locale.

            • lambdaCodeHook (dict) --

              Specifies a Lambda function that verifies requests to a bot or fulfilles the user's request to a bot.

              • lambdaARN (string) --

                The Amazon Resource Name (ARN) of the Lambda function.

              • codeHookInterfaceVersion (string) --

                The version of the request-response that you want Amazon Lex to use to invoke your Lambda function.

    • conversationLogSettings (dict) --

      The updated settings for storing conversation logs in Amazon CloudWatch Logs and Amazon S3 buckets.

      • textLogSettings (list) --

        The Amazon CloudWatch Logs settings for logging text and metadata.

        • (dict) --

          Defines settings to enable text conversation logs.

          • enabled (boolean) --

            Determines whether conversation logs should be stored for an alias.

          • destination (dict) --

            Defines the Amazon CloudWatch Logs destination log group for conversation text logs.

            • cloudWatch (dict) --

              Defines the Amazon CloudWatch Logs log group where text and metadata logs are delivered.

              • cloudWatchLogGroupArn (string) --

                The Amazon Resource Name (ARN) of the log group where text and metadata logs are delivered.

              • logPrefix (string) --

                The prefix of the log stream name within the log group that you specified

      • audioLogSettings (list) --

        The Amazon S3 settings for logging audio to an S3 bucket.

        • (dict) --

          Settings for logging audio of conversations between Amazon Lex and a user. You specify whether to log audio and the Amazon S3 bucket where the audio file is stored.

          • enabled (boolean) --

            Determines whether audio logging in enabled for the bot.

          • destination (dict) --

            The location of audio log files collected when conversation logging is enabled for a bot.

            • s3Bucket (dict) --

              The Amazon S3 bucket where the audio log files are stored. The IAM role specified in the roleArn parameter of the CreateBot operation must have permission to write to this bucket.

              • kmsKeyArn (string) --

                The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key for encrypting audio log files stored in an S3 bucket.

              • s3BucketArn (string) --

                The Amazon Resource Name (ARN) of an Amazon S3 bucket where audio log files are stored.

              • logPrefix (string) --

                The S3 prefix to assign to audio log files.

    • sentimentAnalysisSettings (dict) --

      Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.

      • detectSentiment (boolean) --

        Sets whether Amazon Lex uses Amazon Comprehend to detect the sentiment of user utterances.

    • botAliasStatus (string) --

      The current status of the bot alias. When the status is Available the alias is ready for use.

    • botId (string) --

      The identifier of the bot with the updated alias.

    • creationDateTime (datetime) --

      A timestamp of the date and time that the bot was created.

    • lastUpdatedDateTime (datetime) --

      A timestamp of the date and time that the bot was last updated.

DescribeBotAlias (new) Link ¶

Get information about a specific bot alias.

See also: AWS API Documentation

Request Syntax

client.describe_bot_alias(
    botAliasId='string',
    botId='string'
)
type botAliasId

string

param botAliasId

[REQUIRED]

The identifier of the bot alias to describe.

type botId

string

param botId

[REQUIRED]

The identifier of the bot associated with the bot alias to describe.

rtype

dict

returns

Response Syntax

{
    'botAliasId': 'string',
    'botAliasName': 'string',
    'description': 'string',
    'botVersion': 'string',
    'botAliasLocaleSettings': {
        'string': {
            'enabled': True|False,
            'codeHookSpecification': {
                'lambdaCodeHook': {
                    'lambdaARN': 'string',
                    'codeHookInterfaceVersion': 'string'
                }
            }
        }
    },
    'conversationLogSettings': {
        'textLogSettings': [
            {
                'enabled': True|False,
                'destination': {
                    'cloudWatch': {
                        'cloudWatchLogGroupArn': 'string',
                        'logPrefix': 'string'
                    }
                }
            },
        ],
        'audioLogSettings': [
            {
                'enabled': True|False,
                'destination': {
                    's3Bucket': {
                        'kmsKeyArn': 'string',
                        's3BucketArn': 'string',
                        'logPrefix': 'string'
                    }
                }
            },
        ]
    },
    'sentimentAnalysisSettings': {
        'detectSentiment': True|False
    },
    'botAliasHistoryEvents': [
        {
            'botVersion': 'string',
            'startDate': datetime(2015, 1, 1),
            'endDate': datetime(2015, 1, 1)
        },
    ],
    'botAliasStatus': 'Creating'|'Available'|'Deleting'|'Failed',
    'botId': 'string',
    'creationDateTime': datetime(2015, 1, 1),
    'lastUpdatedDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • botAliasId (string) --

      The identifier of the bot alias.

    • botAliasName (string) --

      The name of the bot alias.

    • description (string) --

      The description of the bot alias.

    • botVersion (string) --

      The version of the bot associated with the bot alias.

    • botAliasLocaleSettings (dict) --

      The locale settings that are unique to the alias.

      • (string) --

        • (dict) --

          Specifies settings that are unique to a locale. For example, you can use different Lambda function depending on the bot's locale.

          • enabled (boolean) --

            Determines whether the locale is enabled for the bot. If the value is false , the locale isn't available for use.

          • codeHookSpecification (dict) --

            Specifies the Lambda function that should be used in the locale.

            • lambdaCodeHook (dict) --

              Specifies a Lambda function that verifies requests to a bot or fulfilles the user's request to a bot.

              • lambdaARN (string) --

                The Amazon Resource Name (ARN) of the Lambda function.

              • codeHookInterfaceVersion (string) --

                The version of the request-response that you want Amazon Lex to use to invoke your Lambda function.

    • conversationLogSettings (dict) --

      Specifics of how Amazon Lex logs text and audio conversations with the bot associated with the alias.

      • textLogSettings (list) --

        The Amazon CloudWatch Logs settings for logging text and metadata.

        • (dict) --

          Defines settings to enable text conversation logs.

          • enabled (boolean) --

            Determines whether conversation logs should be stored for an alias.

          • destination (dict) --

            Defines the Amazon CloudWatch Logs destination log group for conversation text logs.

            • cloudWatch (dict) --

              Defines the Amazon CloudWatch Logs log group where text and metadata logs are delivered.

              • cloudWatchLogGroupArn (string) --

                The Amazon Resource Name (ARN) of the log group where text and metadata logs are delivered.

              • logPrefix (string) --

                The prefix of the log stream name within the log group that you specified

      • audioLogSettings (list) --

        The Amazon S3 settings for logging audio to an S3 bucket.

        • (dict) --

          Settings for logging audio of conversations between Amazon Lex and a user. You specify whether to log audio and the Amazon S3 bucket where the audio file is stored.

          • enabled (boolean) --

            Determines whether audio logging in enabled for the bot.

          • destination (dict) --

            The location of audio log files collected when conversation logging is enabled for a bot.

            • s3Bucket (dict) --

              The Amazon S3 bucket where the audio log files are stored. The IAM role specified in the roleArn parameter of the CreateBot operation must have permission to write to this bucket.

              • kmsKeyArn (string) --

                The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key for encrypting audio log files stored in an S3 bucket.

              • s3BucketArn (string) --

                The Amazon Resource Name (ARN) of an Amazon S3 bucket where audio log files are stored.

              • logPrefix (string) --

                The S3 prefix to assign to audio log files.

    • sentimentAnalysisSettings (dict) --

      Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.

      • detectSentiment (boolean) --

        Sets whether Amazon Lex uses Amazon Comprehend to detect the sentiment of user utterances.

    • botAliasHistoryEvents (list) --

      A list of events that affect a bot alias. For example, an event is recorded when the version that the alias points to changes.

      • (dict) --

        Provides a record of an event that affects a bot alias. For example, when the version of a bot that the alias points to changes.

        • botVersion (string) --

          The version of the bot that was used in the event.

        • startDate (datetime) --

          The date and time that the event started.

        • endDate (datetime) --

          The date and time that the event ended.

    • botAliasStatus (string) --

      The current status of the alias. When the alias is Available , the alias is ready for use with your bot.

    • botId (string) --

      The identifier of the bot associated with the bot alias.

    • creationDateTime (datetime) --

      A timestamp of the date and time that the alias was created.

    • lastUpdatedDateTime (datetime) --

      A timestamp of the date and time that the alias was last updated.

DeleteBotAlias (new) Link ¶

Deletes the specified bot alias.

See also: AWS API Documentation

Request Syntax

client.delete_bot_alias(
    botAliasId='string',
    botId='string',
    skipResourceInUseCheck=True|False
)
type botAliasId

string

param botAliasId

[REQUIRED]

The unique identifier of the bot alias to delete.

type botId

string

param botId

[REQUIRED]

The unique identifier of the bot associated with the alias to delete.

type skipResourceInUseCheck

boolean

param skipResourceInUseCheck

When this parameter is true, Amazon Lex doesn't check to see if any other resource is using the alias before it is deleted.

rtype

dict

returns

Response Syntax

{
    'botAliasId': 'string',
    'botId': 'string',
    'botAliasStatus': 'Creating'|'Available'|'Deleting'|'Failed'
}

Response Structure

  • (dict) --

    • botAliasId (string) --

      The unique identifier of the bot alias to delete.

    • botId (string) --

      The unique identifier of the bot that contains the alias to delete.

    • botAliasStatus (string) --

      The current status of the alias. The status is Deleting while the alias is in the process of being deleted. Once the alias is deleted, it will no longer appear in the list of aliases returned by the ListBotAliases operation.

CreateBotVersion (new) Link ¶

Creates a new version of the bot based on the DRAFT version. If the DRAFT version of this resource hasn't changed since you created the last version, Amazon Lex doesn't create a new version, it returns the last created version.

When you create the first version of a bot, Amazon Lex sets the version to 1. Subsequent versions increment by 1.

See also: AWS API Documentation

Request Syntax

client.create_bot_version(
    botId='string',
    description='string',
    botVersionLocaleSpecification={
        'string': {
            'sourceBotVersion': 'string'
        }
    }
)
type botId

string

param botId

[REQUIRED]

The identifier of the bot to create the version for.

type description

string

param description

A description of the version. Use the description to help identify the version in lists.

type botVersionLocaleSpecification

dict

param botVersionLocaleSpecification

[REQUIRED]

Specifies the locales that Amazon Lex adds to this version. You can choose the Draft version or any other previously published version for each locale. When you specify a source version, the locale data is copied from the source version to the new version.

  • (string) --

    • (dict) --

      The version of a bot used for a bot locale.

      • sourceBotVersion (string) -- [REQUIRED]

        The version of a bot used for a bot locale.

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'description': 'string',
    'botVersion': 'string',
    'botVersionLocaleSpecification': {
        'string': {
            'sourceBotVersion': 'string'
        }
    },
    'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning',
    'creationDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • botId (string) --

      The bot identifier specified in the request.

    • description (string) --

      The description of the version specified in the request.

    • botVersion (string) --

      The version number assigned to the version.

    • botVersionLocaleSpecification (dict) --

      The source versions used for each locale in the new version.

      • (string) --

        • (dict) --

          The version of a bot used for a bot locale.

          • sourceBotVersion (string) --

            The version of a bot used for a bot locale.

    • botStatus (string) --

      When you send a request to create or update a bot, Amazon Lex sets the status response element to Creating . After Amazon Lex builds the bot, it sets status to Available . If Amazon Lex can't build the bot, it sets status to Failed .

    • creationDateTime (datetime) --

      A timestamp of the date and time that the version was created.

UntagResource (new) Link ¶

Removes tags from a bot, bot alias, or bot channel.

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    resourceARN='string',
    tagKeys=[
        'string',
    ]
)
type resourceARN

string

param resourceARN

[REQUIRED]

The Amazon Resource Name (ARN) of the resource to remove the tags from.

type tagKeys

list

param tagKeys

[REQUIRED]

A list of tag keys to remove from the resource. If a tag key does not exist on the resource, it is ignored.

  • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ListBuiltInSlotTypes (new) Link ¶

Gets a list of built-in slot types that meet the specified criteria.

See also: AWS API Documentation

Request Syntax

client.list_built_in_slot_types(
    localeId='string',
    sortBy={
        'attribute': 'SlotTypeSignature',
        'order': 'Ascending'|'Descending'
    },
    maxResults=123,
    nextToken='string'
)
type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale of the slot types to list. The string must match one of the supported locales. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

type sortBy

dict

param sortBy

Determines the sort order for the response from the ListBuiltInSlotTypes operation. You can choose to sort by the slot type signature in either ascending or descending order.

  • attribute (string) -- [REQUIRED]

    The attribute to use to sort the list of built-in intents.

  • order (string) -- [REQUIRED]

    The order to sort the list. You can choose ascending or descending.

type maxResults

integer

param maxResults

The maximum number of built-in slot types to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

type nextToken

string

param nextToken

If the response from the ListBuiltInSlotTypes operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

rtype

dict

returns

Response Syntax

{
    'builtInSlotTypeSummaries': [
        {
            'slotTypeSignature': 'string',
            'description': 'string'
        },
    ],
    'nextToken': 'string',
    'localeId': 'string'
}

Response Structure

  • (dict) --

    • builtInSlotTypeSummaries (list) --

      Summary information for the built-in slot types that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more slot types available, the nextToken field contains a token to get the next page of results.

      • (dict) --

        Provides summary information about a built-in slot type for the ListBuiltInSlotTypes operation.

        • slotTypeSignature (string) --

          The signature of the built-in slot type. Use this to specify the parent slot type of a derived slot type.

        • description (string) --

          The description of the built-in slot type.

    • nextToken (string) --

      A token that indicates whether there are more results to return in a response to the ListBuiltInSlotTypes operation. If the nextToken field is present, you send the contents as the nextToken parameter of a LIstBuiltInSlotTypes operation request to get the next page of results.

    • localeId (string) --

      The language and locale of the slot types in the list.

CreateIntent (new) Link ¶

Creates an intent.

To define the interaction between the user and your bot, you define one or more intents. For example, for a pizza ordering bot you would create an OrderPizza intent.

When you create an intent, you must provide a name. You can optionally provide the following:

  • Sample utterances. For example, "I want to order a pizza" and "Can I order a pizza." You can't provide utterances for built-in intents.

  • Information to be gathered. You specify slots for the information that you bot requests from the user. You can specify standard slot types, such as date and time, or custom slot types for your application.

  • How the intent is fulfilled. You can provide a Lambda function or configure the intent to return the intent information to your client application. If you use a Lambda function, Amazon Lex invokes the function when all of the intent information is available.

  • A confirmation prompt to send to the user to confirm an intent. For example, "Shall I order your pizza?"

  • A conclusion statement to send to the user after the intent is fulfilled. For example, "I ordered your pizza."

  • A follow-up prompt that asks the user for additional activity. For example, "Do you want a drink with your pizza?"

See also: AWS API Documentation

Request Syntax

client.create_intent(
    intentName='string',
    description='string',
    parentIntentSignature='string',
    sampleUtterances=[
        {
            'utterance': 'string'
        },
    ],
    dialogCodeHook={
        'enabled': True|False
    },
    fulfillmentCodeHook={
        'enabled': True|False
    },
    intentConfirmationSetting={
        'promptSpecification': {
            'messageGroups': [
                {
                    'message': {
                        'plainTextMessage': {
                            'value': 'string'
                        },
                        'customPayload': {
                            'value': 'string'
                        },
                        'ssmlMessage': {
                            'value': 'string'
                        },
                        'imageResponseCard': {
                            'title': 'string',
                            'subtitle': 'string',
                            'imageUrl': 'string',
                            'buttons': [
                                {
                                    'text': 'string',
                                    'value': 'string'
                                },
                            ]
                        }
                    },
                    'variations': [
                        {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                    ]
                },
            ],
            'maxRetries': 123,
            'allowInterrupt': True|False
        },
        'declinationResponse': {
            'messageGroups': [
                {
                    'message': {
                        'plainTextMessage': {
                            'value': 'string'
                        },
                        'customPayload': {
                            'value': 'string'
                        },
                        'ssmlMessage': {
                            'value': 'string'
                        },
                        'imageResponseCard': {
                            'title': 'string',
                            'subtitle': 'string',
                            'imageUrl': 'string',
                            'buttons': [
                                {
                                    'text': 'string',
                                    'value': 'string'
                                },
                            ]
                        }
                    },
                    'variations': [
                        {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                    ]
                },
            ],
            'allowInterrupt': True|False
        }
    },
    intentClosingSetting={
        'closingResponse': {
            'messageGroups': [
                {
                    'message': {
                        'plainTextMessage': {
                            'value': 'string'
                        },
                        'customPayload': {
                            'value': 'string'
                        },
                        'ssmlMessage': {
                            'value': 'string'
                        },
                        'imageResponseCard': {
                            'title': 'string',
                            'subtitle': 'string',
                            'imageUrl': 'string',
                            'buttons': [
                                {
                                    'text': 'string',
                                    'value': 'string'
                                },
                            ]
                        }
                    },
                    'variations': [
                        {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                    ]
                },
            ],
            'allowInterrupt': True|False
        }
    },
    inputContexts=[
        {
            'name': 'string'
        },
    ],
    outputContexts=[
        {
            'name': 'string',
            'timeToLiveInSeconds': 123,
            'turnsToLive': 123
        },
    ],
    kendraConfiguration={
        'kendraIndex': 'string',
        'queryFilterStringEnabled': True|False,
        'queryFilterString': 'string'
    },
    botId='string',
    botVersion='string',
    localeId='string'
)
type intentName

string

param intentName

[REQUIRED]

The name of the intent. Intent names must be unique in the locale that contains the intent and cannot match the name of any built-in intent.

type description

string

param description

A description of the intent. Use the description to help identify the intent in lists.

type parentIntentSignature

string

param parentIntentSignature

A unique identifier for the built-in intent to base this intent on.

type sampleUtterances

list

param sampleUtterances

An array of strings that a user might say to signal the intent. For example, "I want a pizza", or "I want a {PizzaSize} pizza".

In an utterance, slot names are enclosed in curly braces ("{", "}") to indicate where they should be displayed in the utterance shown to the user..

  • (dict) --

    A sample utterance that invokes an intent or respond to a slot elicitation prompt.

    • utterance (string) -- [REQUIRED]

      The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.

type dialogCodeHook

dict

param dialogCodeHook

Specifies that Amazon Lex invokes the alias Lambda function for each user input. You can invoke this Lambda function to personalize user interaction.

For example, suppose that your bot determines that the user's name is John. You Lambda function might retrieve John's information from a backend database and prepopulate some of the values. For example, if you find that John is gluten intolerant, you might set the corresponding intent slot, glutenIntolerant to true . You might find John's phone number and set the corresponding session attribute.

  • enabled (boolean) -- [REQUIRED]

    Enables the dialog code hook so that it processes user requests.

type fulfillmentCodeHook

dict

param fulfillmentCodeHook

Specifies that Amazon Lex invokes the alias Lambda function when the intent is ready for fulfillment. You can invoke this function to complete the bot's transaction with the user.

For example, in a pizza ordering bot, the Lambda function can look up the closest pizza restaurant to the customer's location and then place an order on the customer's behalf.

  • enabled (boolean) -- [REQUIRED]

    Indicates whether a Lambda function should be invoked to fulfill a specific intent.

type intentConfirmationSetting

dict

param intentConfirmationSetting

Provides prompts that Amazon Lex sends to the user to confirm the completion of an intent. If the user answers "no," the settings contain a statement that is sent to the user to end the intent.

  • promptSpecification (dict) -- [REQUIRED]

    Prompts the user to confirm the intent. This question should have a yes or no answer.

    Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the OrderPizza intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information.

    • messageGroups (list) -- [REQUIRED]

      A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.

      • (dict) --

        Provides one or more messages that Amazon Lex should send to the user.

        • message (dict) -- [REQUIRED]

          The primary message that Amazon Lex should send to the user.

          • plainTextMessage (dict) --

            A message in plain text format.

            • value (string) -- [REQUIRED]

              The message to send to the user.

          • customPayload (dict) --

            A message in a custom format defined by the client application.

            • value (string) -- [REQUIRED]

              The string that is sent to your application.

          • ssmlMessage (dict) --

            A message in Speech Synthesis Markup Language (SSML).

            • value (string) -- [REQUIRED]

              The SSML text that defines the prompt.

          • imageResponseCard (dict) --

            A message that defines a response card that the client application can show to the user.

            • title (string) -- [REQUIRED]

              The title to display on the response card. The format of the title is determined by the platform displaying the response card.

            • subtitle (string) --

              The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

            • imageUrl (string) --

              The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

            • buttons (list) --

              A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

              • (dict) --

                Describes a button to use on a response card used to gather slot values from a user.

                • text (string) -- [REQUIRED]

                  The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                • value (string) -- [REQUIRED]

                  The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

        • variations (list) --

          Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

          • (dict) --

            The object that provides message text and it's type.

            • plainTextMessage (dict) --

              A message in plain text format.

              • value (string) -- [REQUIRED]

                The message to send to the user.

            • customPayload (dict) --

              A message in a custom format defined by the client application.

              • value (string) -- [REQUIRED]

                The string that is sent to your application.

            • ssmlMessage (dict) --

              A message in Speech Synthesis Markup Language (SSML).

              • value (string) -- [REQUIRED]

                The SSML text that defines the prompt.

            • imageResponseCard (dict) --

              A message that defines a response card that the client application can show to the user.

              • title (string) -- [REQUIRED]

                The title to display on the response card. The format of the title is determined by the platform displaying the response card.

              • subtitle (string) --

                The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

              • imageUrl (string) --

                The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

              • buttons (list) --

                A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                • (dict) --

                  Describes a button to use on a response card used to gather slot values from a user.

                  • text (string) -- [REQUIRED]

                    The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                  • value (string) -- [REQUIRED]

                    The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

    • maxRetries (integer) -- [REQUIRED]

      The maximum number of times the bot tries to elicit a resonse from the user using this prompt.

    • allowInterrupt (boolean) --

      Indicates whether the user can interrupt a speech prompt from the bot.

  • declinationResponse (dict) -- [REQUIRED]

    When the user answers "no" to the question defined in promptSpecification , Amazon Lex responds with this response to acknowledge that the intent was canceled.

    • messageGroups (list) -- [REQUIRED]

      A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.

      • (dict) --

        Provides one or more messages that Amazon Lex should send to the user.

        • message (dict) -- [REQUIRED]

          The primary message that Amazon Lex should send to the user.

          • plainTextMessage (dict) --

            A message in plain text format.

            • value (string) -- [REQUIRED]

              The message to send to the user.

          • customPayload (dict) --

            A message in a custom format defined by the client application.

            • value (string) -- [REQUIRED]

              The string that is sent to your application.

          • ssmlMessage (dict) --

            A message in Speech Synthesis Markup Language (SSML).

            • value (string) -- [REQUIRED]

              The SSML text that defines the prompt.

          • imageResponseCard (dict) --

            A message that defines a response card that the client application can show to the user.

            • title (string) -- [REQUIRED]

              The title to display on the response card. The format of the title is determined by the platform displaying the response card.

            • subtitle (string) --

              The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

            • imageUrl (string) --

              The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

            • buttons (list) --

              A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

              • (dict) --

                Describes a button to use on a response card used to gather slot values from a user.

                • text (string) -- [REQUIRED]

                  The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                • value (string) -- [REQUIRED]

                  The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

        • variations (list) --

          Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

          • (dict) --

            The object that provides message text and it's type.

            • plainTextMessage (dict) --

              A message in plain text format.

              • value (string) -- [REQUIRED]

                The message to send to the user.

            • customPayload (dict) --

              A message in a custom format defined by the client application.

              • value (string) -- [REQUIRED]

                The string that is sent to your application.

            • ssmlMessage (dict) --

              A message in Speech Synthesis Markup Language (SSML).

              • value (string) -- [REQUIRED]

                The SSML text that defines the prompt.

            • imageResponseCard (dict) --

              A message that defines a response card that the client application can show to the user.

              • title (string) -- [REQUIRED]

                The title to display on the response card. The format of the title is determined by the platform displaying the response card.

              • subtitle (string) --

                The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

              • imageUrl (string) --

                The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

              • buttons (list) --

                A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                • (dict) --

                  Describes a button to use on a response card used to gather slot values from a user.

                  • text (string) -- [REQUIRED]

                    The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                  • value (string) -- [REQUIRED]

                    The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

    • allowInterrupt (boolean) --

      Indicates whether the user can interrupt a speech response from Amazon Lex.

type intentClosingSetting

dict

param intentClosingSetting

Sets the response that Amazon Lex sends to the user when the intent is closed.

  • closingResponse (dict) -- [REQUIRED]

    The response that Amazon Lex sends to the user when the intent is complete.

    • messageGroups (list) -- [REQUIRED]

      A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.

      • (dict) --

        Provides one or more messages that Amazon Lex should send to the user.

        • message (dict) -- [REQUIRED]

          The primary message that Amazon Lex should send to the user.

          • plainTextMessage (dict) --

            A message in plain text format.

            • value (string) -- [REQUIRED]

              The message to send to the user.

          • customPayload (dict) --

            A message in a custom format defined by the client application.

            • value (string) -- [REQUIRED]

              The string that is sent to your application.

          • ssmlMessage (dict) --

            A message in Speech Synthesis Markup Language (SSML).

            • value (string) -- [REQUIRED]

              The SSML text that defines the prompt.

          • imageResponseCard (dict) --

            A message that defines a response card that the client application can show to the user.

            • title (string) -- [REQUIRED]

              The title to display on the response card. The format of the title is determined by the platform displaying the response card.

            • subtitle (string) --

              The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

            • imageUrl (string) --

              The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

            • buttons (list) --

              A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

              • (dict) --

                Describes a button to use on a response card used to gather slot values from a user.

                • text (string) -- [REQUIRED]

                  The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                • value (string) -- [REQUIRED]

                  The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

        • variations (list) --

          Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

          • (dict) --

            The object that provides message text and it's type.

            • plainTextMessage (dict) --

              A message in plain text format.

              • value (string) -- [REQUIRED]

                The message to send to the user.

            • customPayload (dict) --

              A message in a custom format defined by the client application.

              • value (string) -- [REQUIRED]

                The string that is sent to your application.

            • ssmlMessage (dict) --

              A message in Speech Synthesis Markup Language (SSML).

              • value (string) -- [REQUIRED]

                The SSML text that defines the prompt.

            • imageResponseCard (dict) --

              A message that defines a response card that the client application can show to the user.

              • title (string) -- [REQUIRED]

                The title to display on the response card. The format of the title is determined by the platform displaying the response card.

              • subtitle (string) --

                The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

              • imageUrl (string) --

                The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

              • buttons (list) --

                A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                • (dict) --

                  Describes a button to use on a response card used to gather slot values from a user.

                  • text (string) -- [REQUIRED]

                    The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                  • value (string) -- [REQUIRED]

                    The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

    • allowInterrupt (boolean) --

      Indicates whether the user can interrupt a speech response from Amazon Lex.

type inputContexts

list

param inputContexts

A list of contexts that must be active for this intent to be considered by Amazon Lex.

When an intent has an input context list, Amazon Lex only considers using the intent in an interaction with the user when the specified contexts are included in the active context list for the session. If the contexts are not active, then Amazon Lex will not use the intent.

A context can be automatically activated using the outputContexts property or it can be set at runtime.

For example, if there are two intents with different input contexts that respond to the same utterances, only the intent with the active context will respond.

An intent may have up to 5 input contexts. If an intent has multiple input contexts, all of the contexts must be active to consider the intent.

  • (dict) --

    The name of a context that must be active for an intent to be selected by Amazon Lex.

    • name (string) -- [REQUIRED]

      The name of the context.

type outputContexts

list

param outputContexts

A lists of contexts that the intent activates when it is fulfilled.

You can use an output context to indicate the intents that Amazon Lex should consider for the next turn of the conversation with a customer.

When you use the outputContextsList property, all of the contexts specified in the list are activated when the intent is fulfilled. You can set up to 10 output contexts. You can also set the number of conversation turns that the context should be active, or the length of time that the context should be active.

  • (dict) --

    Describes a session context that is activated when an intent is fulfilled.

    • name (string) -- [REQUIRED]

      The name of the output context.

    • timeToLiveInSeconds (integer) -- [REQUIRED]

      The amount of time, in seconds, that the output context should remain active. The time is figured from the first time the context is sent to the user.

    • turnsToLive (integer) -- [REQUIRED]

      The number of conversation turns that the output context should remain active. The number of turns is counted from the first time that the context is sent to the user.

type kendraConfiguration

dict

param kendraConfiguration

Configuration information required to use the AMAZON.KendraSearchIntent intent to connect to an Amazon Kendra index. The AMAZON.KendraSearchIntent intent is called when Amazon Lex can't determine another intent to invoke.

  • kendraIndex (string) -- [REQUIRED]

    The Amazon Resource Name (ARN) of the Amazon Kendra index that you want the AMAZON.KendraSearchIntent intent to search. The index must be in the same account and Region as the Amazon Lex bot.

  • queryFilterStringEnabled (boolean) --

    Determines whether the AMAZON.KendraSearchIntent intent uses a custom query string to query the Amazon Kendra index.

  • queryFilterString (string) --

    A query filter that Amazon Lex sends to Amazon Kendra to filter the response from a query. The filter is in the format defined by Amazon Kendra. For more information, see Filtering queries .

type botId

string

param botId

[REQUIRED]

The identifier of the bot associated with this intent.

type botVersion

string

param botVersion

[REQUIRED]

The identifier of the version of the bot associated with this intent.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale where this intent is used. All of the bots, slot types, and slots used by the intent must have the same locale.

rtype

dict

returns

Response Syntax

{
    'intentId': 'string',
    'intentName': 'string',
    'description': 'string',
    'parentIntentSignature': 'string',
    'sampleUtterances': [
        {
            'utterance': 'string'
        },
    ],
    'dialogCodeHook': {
        'enabled': True|False
    },
    'fulfillmentCodeHook': {
        'enabled': True|False
    },
    'intentConfirmationSetting': {
        'promptSpecification': {
            'messageGroups': [
                {
                    'message': {
                        'plainTextMessage': {
                            'value': 'string'
                        },
                        'customPayload': {
                            'value': 'string'
                        },
                        'ssmlMessage': {
                            'value': 'string'
                        },
                        'imageResponseCard': {
                            'title': 'string',
                            'subtitle': 'string',
                            'imageUrl': 'string',
                            'buttons': [
                                {
                                    'text': 'string',
                                    'value': 'string'
                                },
                            ]
                        }
                    },
                    'variations': [
                        {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                    ]
                },
            ],
            'maxRetries': 123,
            'allowInterrupt': True|False
        },
        'declinationResponse': {
            'messageGroups': [
                {
                    'message': {
                        'plainTextMessage': {
                            'value': 'string'
                        },
                        'customPayload': {
                            'value': 'string'
                        },
                        'ssmlMessage': {
                            'value': 'string'
                        },
                        'imageResponseCard': {
                            'title': 'string',
                            'subtitle': 'string',
                            'imageUrl': 'string',
                            'buttons': [
                                {
                                    'text': 'string',
                                    'value': 'string'
                                },
                            ]
                        }
                    },
                    'variations': [
                        {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                    ]
                },
            ],
            'allowInterrupt': True|False
        }
    },
    'intentClosingSetting': {
        'closingResponse': {
            'messageGroups': [
                {
                    'message': {
                        'plainTextMessage': {
                            'value': 'string'
                        },
                        'customPayload': {
                            'value': 'string'
                        },
                        'ssmlMessage': {
                            'value': 'string'
                        },
                        'imageResponseCard': {
                            'title': 'string',
                            'subtitle': 'string',
                            'imageUrl': 'string',
                            'buttons': [
                                {
                                    'text': 'string',
                                    'value': 'string'
                                },
                            ]
                        }
                    },
                    'variations': [
                        {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                    ]
                },
            ],
            'allowInterrupt': True|False
        }
    },
    'inputContexts': [
        {
            'name': 'string'
        },
    ],
    'outputContexts': [
        {
            'name': 'string',
            'timeToLiveInSeconds': 123,
            'turnsToLive': 123
        },
    ],
    'kendraConfiguration': {
        'kendraIndex': 'string',
        'queryFilterStringEnabled': True|False,
        'queryFilterString': 'string'
    },
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'creationDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • intentId (string) --

      A unique identifier for the intent.

    • intentName (string) --

      The name specified for the intent.

    • description (string) --

      The description specified for the intent.

    • parentIntentSignature (string) --

      The signature of the parent intent specified for the intent.

    • sampleUtterances (list) --

      The sample utterances specified for the intent.

      • (dict) --

        A sample utterance that invokes an intent or respond to a slot elicitation prompt.

        • utterance (string) --

          The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.

    • dialogCodeHook (dict) --

      The dialog Lambda function specified for the intent.

      • enabled (boolean) --

        Enables the dialog code hook so that it processes user requests.

    • fulfillmentCodeHook (dict) --

      The fulfillment Lambda function specified for the intent.

      • enabled (boolean) --

        Indicates whether a Lambda function should be invoked to fulfill a specific intent.

    • intentConfirmationSetting (dict) --

      The confirmation setting specified for the intent.

      • promptSpecification (dict) --

        Prompts the user to confirm the intent. This question should have a yes or no answer.

        Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the OrderPizza intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information.

        • messageGroups (list) --

          A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.

          • (dict) --

            Provides one or more messages that Amazon Lex should send to the user.

            • message (dict) --

              The primary message that Amazon Lex should send to the user.

              • plainTextMessage (dict) --

                A message in plain text format.

                • value (string) --

                  The message to send to the user.

              • customPayload (dict) --

                A message in a custom format defined by the client application.

                • value (string) --

                  The string that is sent to your application.

              • ssmlMessage (dict) --

                A message in Speech Synthesis Markup Language (SSML).

                • value (string) --

                  The SSML text that defines the prompt.

              • imageResponseCard (dict) --

                A message that defines a response card that the client application can show to the user.

                • title (string) --

                  The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                • subtitle (string) --

                  The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                • imageUrl (string) --

                  The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                • buttons (list) --

                  A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                  • (dict) --

                    Describes a button to use on a response card used to gather slot values from a user.

                    • text (string) --

                      The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                    • value (string) --

                      The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

            • variations (list) --

              Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

              • (dict) --

                The object that provides message text and it's type.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

        • maxRetries (integer) --

          The maximum number of times the bot tries to elicit a resonse from the user using this prompt.

        • allowInterrupt (boolean) --

          Indicates whether the user can interrupt a speech prompt from the bot.

      • declinationResponse (dict) --

        When the user answers "no" to the question defined in promptSpecification , Amazon Lex responds with this response to acknowledge that the intent was canceled.

        • messageGroups (list) --

          A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.

          • (dict) --

            Provides one or more messages that Amazon Lex should send to the user.

            • message (dict) --

              The primary message that Amazon Lex should send to the user.

              • plainTextMessage (dict) --

                A message in plain text format.

                • value (string) --

                  The message to send to the user.

              • customPayload (dict) --

                A message in a custom format defined by the client application.

                • value (string) --

                  The string that is sent to your application.

              • ssmlMessage (dict) --

                A message in Speech Synthesis Markup Language (SSML).

                • value (string) --

                  The SSML text that defines the prompt.

              • imageResponseCard (dict) --

                A message that defines a response card that the client application can show to the user.

                • title (string) --

                  The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                • subtitle (string) --

                  The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                • imageUrl (string) --

                  The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                • buttons (list) --

                  A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                  • (dict) --

                    Describes a button to use on a response card used to gather slot values from a user.

                    • text (string) --

                      The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                    • value (string) --

                      The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

            • variations (list) --

              Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

              • (dict) --

                The object that provides message text and it's type.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

        • allowInterrupt (boolean) --

          Indicates whether the user can interrupt a speech response from Amazon Lex.

    • intentClosingSetting (dict) --

      The closing setting specified for the intent.

      • closingResponse (dict) --

        The response that Amazon Lex sends to the user when the intent is complete.

        • messageGroups (list) --

          A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.

          • (dict) --

            Provides one or more messages that Amazon Lex should send to the user.

            • message (dict) --

              The primary message that Amazon Lex should send to the user.

              • plainTextMessage (dict) --

                A message in plain text format.

                • value (string) --

                  The message to send to the user.

              • customPayload (dict) --

                A message in a custom format defined by the client application.

                • value (string) --

                  The string that is sent to your application.

              • ssmlMessage (dict) --

                A message in Speech Synthesis Markup Language (SSML).

                • value (string) --

                  The SSML text that defines the prompt.

              • imageResponseCard (dict) --

                A message that defines a response card that the client application can show to the user.

                • title (string) --

                  The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                • subtitle (string) --

                  The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                • imageUrl (string) --

                  The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                • buttons (list) --

                  A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                  • (dict) --

                    Describes a button to use on a response card used to gather slot values from a user.

                    • text (string) --

                      The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                    • value (string) --

                      The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

            • variations (list) --

              Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

              • (dict) --

                The object that provides message text and it's type.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

        • allowInterrupt (boolean) --

          Indicates whether the user can interrupt a speech response from Amazon Lex.

    • inputContexts (list) --

      The list of input contexts specified for the intent.

      • (dict) --

        The name of a context that must be active for an intent to be selected by Amazon Lex.

        • name (string) --

          The name of the context.

    • outputContexts (list) --

      The list of output contexts specified for the intent.

      • (dict) --

        Describes a session context that is activated when an intent is fulfilled.

        • name (string) --

          The name of the output context.

        • timeToLiveInSeconds (integer) --

          The amount of time, in seconds, that the output context should remain active. The time is figured from the first time the context is sent to the user.

        • turnsToLive (integer) --

          The number of conversation turns that the output context should remain active. The number of turns is counted from the first time that the context is sent to the user.

    • kendraConfiguration (dict) --

      Configuration for searching a Amazon Kendra index specified for the intent.

      • kendraIndex (string) --

        The Amazon Resource Name (ARN) of the Amazon Kendra index that you want the AMAZON.KendraSearchIntent intent to search. The index must be in the same account and Region as the Amazon Lex bot.

      • queryFilterStringEnabled (boolean) --

        Determines whether the AMAZON.KendraSearchIntent intent uses a custom query string to query the Amazon Kendra index.

      • queryFilterString (string) --

        A query filter that Amazon Lex sends to Amazon Kendra to filter the response from a query. The filter is in the format defined by Amazon Kendra. For more information, see Filtering queries .

    • botId (string) --

      The identifier of the bot associated with the intent.

    • botVersion (string) --

      The identifier of the version of the bot associated with the intent.

    • localeId (string) --

      The locale that the intent is specified to use.

    • creationDateTime (datetime) --

      A timestamp of the date and time that the intent was created.

DeleteSlotType (new) Link ¶

Deletes a slot type from a bot locale.

If a slot is using the slot type, Amazon Lex throws a ResourceInUseException exception. To avoid the exception, set the skipResourceInUseCheck parameter to true .

See also: AWS API Documentation

Request Syntax

client.delete_slot_type(
    slotTypeId='string',
    botId='string',
    botVersion='string',
    localeId='string',
    skipResourceInUseCheck=True|False
)
type slotTypeId

string

param slotTypeId

[REQUIRED]

The identifier of the slot type to delete.

type botId

string

param botId

[REQUIRED]

The identifier of the bot associated with the slot type.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot associated with the slot type.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale that the slot type will be deleted from. The string must match one of the supported locales. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

type skipResourceInUseCheck

boolean

param skipResourceInUseCheck

By default, the DeleteSlotType operations throws a ResourceInUseException exception if you try to delete a slot type used by a slot. Set the skipResourceInUseCheck parameter to true to skip this check and remove the slot type even if a slot uses it.

returns

None

DescribeSlot (new) Link ¶

Gets metadata information about a slot.

See also: AWS API Documentation

Request Syntax

client.describe_slot(
    slotId='string',
    botId='string',
    botVersion='string',
    localeId='string',
    intentId='string'
)
type slotId

string

param slotId

[REQUIRED]

The unique identifier for the slot.

type botId

string

param botId

[REQUIRED]

The identifier of the bot associated with the slot.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot associated with the slot.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale of the slot to describe. The string must match one of the supported locales. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

type intentId

string

param intentId

[REQUIRED]

The identifier of the intent that contains the slot.

rtype

dict

returns

Response Syntax

{
    'slotId': 'string',
    'slotName': 'string',
    'description': 'string',
    'slotTypeId': 'string',
    'valueElicitationSetting': {
        'defaultValueSpecification': {
            'defaultValueList': [
                {
                    'defaultValue': 'string'
                },
            ]
        },
        'slotConstraint': 'Required'|'Optional',
        'promptSpecification': {
            'messageGroups': [
                {
                    'message': {
                        'plainTextMessage': {
                            'value': 'string'
                        },
                        'customPayload': {
                            'value': 'string'
                        },
                        'ssmlMessage': {
                            'value': 'string'
                        },
                        'imageResponseCard': {
                            'title': 'string',
                            'subtitle': 'string',
                            'imageUrl': 'string',
                            'buttons': [
                                {
                                    'text': 'string',
                                    'value': 'string'
                                },
                            ]
                        }
                    },
                    'variations': [
                        {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                    ]
                },
            ],
            'maxRetries': 123,
            'allowInterrupt': True|False
        },
        'sampleUtterances': [
            {
                'utterance': 'string'
            },
        ],
        'waitAndContinueSpecification': {
            'waitingResponse': {
                'messageGroups': [
                    {
                        'message': {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                        'variations': [
                            {
                                'plainTextMessage': {
                                    'value': 'string'
                                },
                                'customPayload': {
                                    'value': 'string'
                                },
                                'ssmlMessage': {
                                    'value': 'string'
                                },
                                'imageResponseCard': {
                                    'title': 'string',
                                    'subtitle': 'string',
                                    'imageUrl': 'string',
                                    'buttons': [
                                        {
                                            'text': 'string',
                                            'value': 'string'
                                        },
                                    ]
                                }
                            },
                        ]
                    },
                ],
                'allowInterrupt': True|False
            },
            'continueResponse': {
                'messageGroups': [
                    {
                        'message': {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                        'variations': [
                            {
                                'plainTextMessage': {
                                    'value': 'string'
                                },
                                'customPayload': {
                                    'value': 'string'
                                },
                                'ssmlMessage': {
                                    'value': 'string'
                                },
                                'imageResponseCard': {
                                    'title': 'string',
                                    'subtitle': 'string',
                                    'imageUrl': 'string',
                                    'buttons': [
                                        {
                                            'text': 'string',
                                            'value': 'string'
                                        },
                                    ]
                                }
                            },
                        ]
                    },
                ],
                'allowInterrupt': True|False
            },
            'stillWaitingResponse': {
                'messageGroups': [
                    {
                        'message': {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                        'variations': [
                            {
                                'plainTextMessage': {
                                    'value': 'string'
                                },
                                'customPayload': {
                                    'value': 'string'
                                },
                                'ssmlMessage': {
                                    'value': 'string'
                                },
                                'imageResponseCard': {
                                    'title': 'string',
                                    'subtitle': 'string',
                                    'imageUrl': 'string',
                                    'buttons': [
                                        {
                                            'text': 'string',
                                            'value': 'string'
                                        },
                                    ]
                                }
                            },
                        ]
                    },
                ],
                'frequencyInSeconds': 123,
                'timeoutInSeconds': 123,
                'allowInterrupt': True|False
            }
        }
    },
    'obfuscationSetting': {
        'obfuscationSettingType': 'None'|'DefaultObfuscation'
    },
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'intentId': 'string',
    'creationDateTime': datetime(2015, 1, 1),
    'lastUpdatedDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • slotId (string) --

      The unique identifier generated for the slot.

    • slotName (string) --

      The name specified for the slot.

    • description (string) --

      The description specified for the slot.

    • slotTypeId (string) --

      The identifier of the slot type that determines the values entered into the slot.

    • valueElicitationSetting (dict) --

      Prompts that Amazon Lex uses to elicit a value for the slot.

      • defaultValueSpecification (dict) --

        A list of default values for a slot. Default values are used when Amazon Lex hasn't determined a value for a slot. You can specify default values from context variables, sesion attributes, and defined values.

        • defaultValueList (list) --

          A list of default values. Amazon Lex chooses the default value to use in the order that they are presented in the list.

          • (dict) --

            Specifies the default value to use when a user doesn't provide a value for a slot.

            • defaultValue (string) --

              The default value to use when a user doesn't provide a value for a slot.

      • slotConstraint (string) --

        Specifies whether the slot is required or optional.

      • promptSpecification (dict) --

        The prompt that Amazon Lex uses to elicit the slot value from the user.

        • messageGroups (list) --

          A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.

          • (dict) --

            Provides one or more messages that Amazon Lex should send to the user.

            • message (dict) --

              The primary message that Amazon Lex should send to the user.

              • plainTextMessage (dict) --

                A message in plain text format.

                • value (string) --

                  The message to send to the user.

              • customPayload (dict) --

                A message in a custom format defined by the client application.

                • value (string) --

                  The string that is sent to your application.

              • ssmlMessage (dict) --

                A message in Speech Synthesis Markup Language (SSML).

                • value (string) --

                  The SSML text that defines the prompt.

              • imageResponseCard (dict) --

                A message that defines a response card that the client application can show to the user.

                • title (string) --

                  The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                • subtitle (string) --

                  The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                • imageUrl (string) --

                  The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                • buttons (list) --

                  A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                  • (dict) --

                    Describes a button to use on a response card used to gather slot values from a user.

                    • text (string) --

                      The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                    • value (string) --

                      The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

            • variations (list) --

              Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

              • (dict) --

                The object that provides message text and it's type.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

        • maxRetries (integer) --

          The maximum number of times the bot tries to elicit a resonse from the user using this prompt.

        • allowInterrupt (boolean) --

          Indicates whether the user can interrupt a speech prompt from the bot.

      • sampleUtterances (list) --

        If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy. This is optional. In most cases, Amazon Lex is capable of understanding user utterances.

        • (dict) --

          A sample utterance that invokes an intent or respond to a slot elicitation prompt.

          • utterance (string) --

            The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.

      • waitAndContinueSpecification (dict) --

        Specifies the prompts that Amazon Lex uses while a bot is waiting for customer input.

        • waitingResponse (dict) --

          The response that Amazon Lex sends to indicate that the bot is waiting for the conversation to continue.

          • messageGroups (list) --

            A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.

            • (dict) --

              Provides one or more messages that Amazon Lex should send to the user.

              • message (dict) --

                The primary message that Amazon Lex should send to the user.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

              • variations (list) --

                Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

                • (dict) --

                  The object that provides message text and it's type.

                  • plainTextMessage (dict) --

                    A message in plain text format.

                    • value (string) --

                      The message to send to the user.

                  • customPayload (dict) --

                    A message in a custom format defined by the client application.

                    • value (string) --

                      The string that is sent to your application.

                  • ssmlMessage (dict) --

                    A message in Speech Synthesis Markup Language (SSML).

                    • value (string) --

                      The SSML text that defines the prompt.

                  • imageResponseCard (dict) --

                    A message that defines a response card that the client application can show to the user.

                    • title (string) --

                      The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                    • subtitle (string) --

                      The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                    • imageUrl (string) --

                      The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                    • buttons (list) --

                      A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                      • (dict) --

                        Describes a button to use on a response card used to gather slot values from a user.

                        • text (string) --

                          The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                        • value (string) --

                          The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

          • allowInterrupt (boolean) --

            Indicates whether the user can interrupt a speech response from Amazon Lex.

        • continueResponse (dict) --

          The response that Amazon Lex sends to indicate that the bot is ready to continue the conversation.

          • messageGroups (list) --

            A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.

            • (dict) --

              Provides one or more messages that Amazon Lex should send to the user.

              • message (dict) --

                The primary message that Amazon Lex should send to the user.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

              • variations (list) --

                Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

                • (dict) --

                  The object that provides message text and it's type.

                  • plainTextMessage (dict) --

                    A message in plain text format.

                    • value (string) --

                      The message to send to the user.

                  • customPayload (dict) --

                    A message in a custom format defined by the client application.

                    • value (string) --

                      The string that is sent to your application.

                  • ssmlMessage (dict) --

                    A message in Speech Synthesis Markup Language (SSML).

                    • value (string) --

                      The SSML text that defines the prompt.

                  • imageResponseCard (dict) --

                    A message that defines a response card that the client application can show to the user.

                    • title (string) --

                      The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                    • subtitle (string) --

                      The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                    • imageUrl (string) --

                      The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                    • buttons (list) --

                      A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                      • (dict) --

                        Describes a button to use on a response card used to gather slot values from a user.

                        • text (string) --

                          The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                        • value (string) --

                          The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

          • allowInterrupt (boolean) --

            Indicates whether the user can interrupt a speech response from Amazon Lex.

        • stillWaitingResponse (dict) --

          A response that Amazon Lex sends periodically to the user to indicate that the bot is still waiting for input from the user.

          • messageGroups (list) --

            One or more message groups, each containing one or more messages, that define the prompts that Amazon Lex sends to the user.

            • (dict) --

              Provides one or more messages that Amazon Lex should send to the user.

              • message (dict) --

                The primary message that Amazon Lex should send to the user.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

              • variations (list) --

                Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

                • (dict) --

                  The object that provides message text and it's type.

                  • plainTextMessage (dict) --

                    A message in plain text format.

                    • value (string) --

                      The message to send to the user.

                  • customPayload (dict) --

                    A message in a custom format defined by the client application.

                    • value (string) --

                      The string that is sent to your application.

                  • ssmlMessage (dict) --

                    A message in Speech Synthesis Markup Language (SSML).

                    • value (string) --

                      The SSML text that defines the prompt.

                  • imageResponseCard (dict) --

                    A message that defines a response card that the client application can show to the user.

                    • title (string) --

                      The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                    • subtitle (string) --

                      The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                    • imageUrl (string) --

                      The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                    • buttons (list) --

                      A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                      • (dict) --

                        Describes a button to use on a response card used to gather slot values from a user.

                        • text (string) --

                          The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                        • value (string) --

                          The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

          • frequencyInSeconds (integer) --

            How often a message should be sent to the user. Minimum of 1 second, maximum of 5 minutes.

          • timeoutInSeconds (integer) --

            If Amazon Lex waits longer than this length of time for a response, it will stop sending messages.

          • allowInterrupt (boolean) --

            Indicates that the user can interrupt the response by speaking while the message is being played.

    • obfuscationSetting (dict) --

      Whether slot values are shown in Amazon CloudWatch logs. If the value is None , the actual value of the slot is shown in logs.

      • obfuscationSettingType (string) --

        Value that determines whether Amazon Lex obscures slot values in conversation logs. The default is to obscure the values.

    • botId (string) --

      The identifier of the bot associated with the slot.

    • botVersion (string) --

      The version of the bot associated with the slot.

    • localeId (string) --

      The language and locale specified for the slot.

    • intentId (string) --

      The identifier of the intent associated with the slot.

    • creationDateTime (datetime) --

      A timestamp of the date and time that the slot was created.

    • lastUpdatedDateTime (datetime) --

      A timestamp of the date and time that the slot was last updated.

UpdateBotLocale (new) Link ¶

Updates the settings that a bot has for a specific locale.

See also: AWS API Documentation

Request Syntax

client.update_bot_locale(
    botId='string',
    botVersion='string',
    localeId='string',
    description='string',
    nluIntentConfidenceThreshold=123.0,
    voiceSettings={
        'voiceId': 'string'
    }
)
type botId

string

param botId

[REQUIRED]

The unique identifier of the bot that contains the locale.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot that contains the locale to be updated. The version can only be the DRAFT version.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale to update. The string must match one of the supported locales. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

type description

string

param description

The new description of the locale.

type nluIntentConfidenceThreshold

float

param nluIntentConfidenceThreshold

[REQUIRED]

The new confidence threshold where Amazon Lex inserts the AMAZON.FallbackIntent and AMAZON.KendraSearchIntent intents in the list of possible intents for an utterance.

type voiceSettings

dict

param voiceSettings

The new Amazon Polly voice Amazon Lex should use for voice interaction with the user.

  • voiceId (string) -- [REQUIRED]

    The identifier of the Amazon Polly voice to use.

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'localeName': 'string',
    'description': 'string',
    'nluIntentConfidenceThreshold': 123.0,
    'voiceSettings': {
        'voiceId': 'string'
    },
    'botLocaleStatus': 'Creating'|'Building'|'Built'|'ReadyExpressTesting'|'Failed'|'Deleting'|'NotBuilt',
    'failureReasons': [
        'string',
    ],
    'creationDateTime': datetime(2015, 1, 1),
    'lastUpdatedDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • botId (string) --

      The identifier of the bot that contains the updated locale.

    • botVersion (string) --

      The version of the bot that contains the updated locale.

    • localeId (string) --

      The language and locale of the updated bot locale.

    • localeName (string) --

      The updated locale name for the locale.

    • description (string) --

      The updated description of the locale.

    • nluIntentConfidenceThreshold (float) --

      The updated confidence threshold for inserting the AMAZON.FallbackIntent and AMAZON.KendraSearchIntent intents in the list of possible intents for an utterance.

    • voiceSettings (dict) --

      The updated Amazon Polly voice to use for voice interaction with the user.

      • voiceId (string) --

        The identifier of the Amazon Polly voice to use.

    • botLocaleStatus (string) --

      The current status of the locale. When the bot status is Built the locale is ready for use.

    • failureReasons (list) --

      If the botLocaleStatus is Failed , the failureReasons field lists the errors that occurred while building the bot.

      • (string) --

    • creationDateTime (datetime) --

      A timestamp of the date and time that the locale was created.

    • lastUpdatedDateTime (datetime) --

      A timestamp of the date and time that the locale was last updated.

TagResource (new) Link ¶

Adds the specified tags to the specified resource. If a tag key already exists, the existing value is replaced with the new value.

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    resourceARN='string',
    tags={
        'string': 'string'
    }
)
type resourceARN

string

param resourceARN

[REQUIRED]

The Amazon Resource Name (ARN) of the bot, bot alias, or bot channel to tag.

type tags

dict

param tags

[REQUIRED]

A list of tag keys to add to the resource. If a tag key already exists, the existing value is replaced with the new value.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DescribeBot (new) Link ¶

Provides metadata information about a bot.

See also: AWS API Documentation

Request Syntax

client.describe_bot(
    botId='string'
)
type botId

string

param botId

[REQUIRED]

The unique identifier of the bot to describe.

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botName': 'string',
    'description': 'string',
    'roleArn': 'string',
    'dataPrivacy': {
        'childDirected': True|False
    },
    'idleSessionTTLInSeconds': 123,
    'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning',
    'creationDateTime': datetime(2015, 1, 1),
    'lastUpdatedDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • botId (string) --

      The unique identifier of the bot.

    • botName (string) --

      The name of the bot.

    • description (string) --

      The description of the bot.

    • roleArn (string) --

      The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot.

    • dataPrivacy (dict) --

      Settings for managing data privacy of the bot and its conversations with users.

      • childDirected (boolean) --

        For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children's Online Privacy Protection Act (COPPA) by specifying true or false in the childDirected field. By specifying true in the childDirected field, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying false in the childDirected field, you confirm that your use of Amazon Lex is not related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the childDirected field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the Amazon Lex FAQ .

    • idleSessionTTLInSeconds (integer) --

      The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.

    • botStatus (string) --

      The current status of the bot. When the status is Available the bot is ready to be used in conversations with users.

    • creationDateTime (datetime) --

      A timestamp of the date and time that the bot was created.

    • lastUpdatedDateTime (datetime) --

      A timestamp of the date and time that the bot was last updated.

ListBotVersions (new) Link ¶

Gets information about all of the versions of a bot.

The ListBotVersions operation returns a summary of each version of a bot. For example, if a bot has three numbered versions, the ListBotVersions operation returns for summaries, one for each numbered version and one for the DRAFT version.

The ListBotVersions operation always returns at least one version, the DRAFT version.

See also: AWS API Documentation

Request Syntax

client.list_bot_versions(
    botId='string',
    sortBy={
        'attribute': 'BotVersion',
        'order': 'Ascending'|'Descending'
    },
    maxResults=123,
    nextToken='string'
)
type botId

string

param botId

[REQUIRED]

The identifier of the bot to list versions for.

type sortBy

dict

param sortBy

Specifies sorting parameters for the list of versions. You can specify that the list be sorted by version name in either ascending or descending order.

  • attribute (string) -- [REQUIRED]

    The attribute to use to sort the list of versions.

  • order (string) -- [REQUIRED]

    The order to sort the list. You can specify ascending or descending order.

type maxResults

integer

param maxResults

The maximum number of versions to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

type nextToken

string

param nextToken

If the response to the ListBotVersion operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botVersionSummaries': [
        {
            'botName': 'string',
            'botVersion': 'string',
            'description': 'string',
            'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning',
            'creationDateTime': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • botId (string) --

      The identifier of the bot to list versions for.

    • botVersionSummaries (list) --

      Summary information for the bot versions that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more versions available, the nextToken field contains a token to get the next page of results.

      • (dict) --

        Summary information about a bot version returned by the ListBotVersions operation.

        • botName (string) --

          The name of the bot associated with the version.

        • botVersion (string) --

          The numeric version of the bot, or DRAFT to indicate that this is the version of the bot that can be updated..

        • description (string) --

          The description of the version.

        • botStatus (string) --

          The status of the bot. When the status is available, the version of the bot is ready for use.

        • creationDateTime (datetime) --

          A timestamp of the date and time that the version was created.

    • nextToken (string) --

      A token that indicates whether there are more results to return in a response to the ListBotVersions operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListBotAliases operation request to get the next page of results.

DeleteSlot (new) Link ¶

Deletes the specified slot from an intent.

See also: AWS API Documentation

Request Syntax

client.delete_slot(
    slotId='string',
    botId='string',
    botVersion='string',
    localeId='string',
    intentId='string'
)
type slotId

string

param slotId

[REQUIRED]

The identifier of the slot to delete.

type botId

string

param botId

[REQUIRED]

The identifier of the bot associated with the slot to delete.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot associated with the slot to delete.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale that the slot will be deleted from. The string must match one of the supported locales. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

type intentId

string

param intentId

[REQUIRED]

The identifier of the intent associated with the slot.

returns

None

DescribeBotVersion (new) Link ¶

Provides metadata about a version of a bot.

See also: AWS API Documentation

Request Syntax

client.describe_bot_version(
    botId='string',
    botVersion='string'
)
type botId

string

param botId

[REQUIRED]

The identifier of the bot containing the version to return metadata for.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot to return metadata for.

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botName': 'string',
    'botVersion': 'string',
    'description': 'string',
    'roleArn': 'string',
    'dataPrivacy': {
        'childDirected': True|False
    },
    'idleSessionTTLInSeconds': 123,
    'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning',
    'failureReasons': [
        'string',
    ],
    'creationDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • botId (string) --

      The identifier of the bot that contains the version.

    • botName (string) --

      The name of the bot that contains the version.

    • botVersion (string) --

      The version of the bot to describe.

    • description (string) --

      The description specified for the bot.

    • roleArn (string) --

      The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot version.

    • dataPrivacy (dict) --

      Data privacy settings for the bot version.

      • childDirected (boolean) --

        For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children's Online Privacy Protection Act (COPPA) by specifying true or false in the childDirected field. By specifying true in the childDirected field, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying false in the childDirected field, you confirm that your use of Amazon Lex is not related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the childDirected field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the Amazon Lex FAQ .

    • idleSessionTTLInSeconds (integer) --

      The number of seconds that a session with the bot remains active before it is discarded by Amazon Lex.

    • botStatus (string) --

      The current status of the bot. When the status is Available , the bot version is ready for use.

    • failureReasons (list) --

      If the botStatus is Failed , this contains a list of reasons that the version couldn't be built.

      • (string) --

    • creationDateTime (datetime) --

      A timestamp of the date and time that the bot version was created.

ListSlots (new) Link ¶

Gets a list of slots that match the specified criteria.

See also: AWS API Documentation

Request Syntax

client.list_slots(
    botId='string',
    botVersion='string',
    localeId='string',
    intentId='string',
    sortBy={
        'attribute': 'SlotName'|'LastUpdatedDateTime',
        'order': 'Ascending'|'Descending'
    },
    filters=[
        {
            'name': 'SlotName',
            'values': [
                'string',
            ],
            'operator': 'CO'|'EQ'
        },
    ],
    maxResults=123,
    nextToken='string'
)
type botId

string

param botId

[REQUIRED]

The identifier of the bot that contains the slot.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot that contains the slot.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale of the slots to list. The string must match one of the supported locales. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

type intentId

string

param intentId

[REQUIRED]

The unique identifier of the intent that contains the slot.

type sortBy

dict

param sortBy

Determines the sort order for the response from the ListSlots operation. You can choose to sort by the slot name or last updated date in either ascending or descending order.

  • attribute (string) -- [REQUIRED]

    The attribute to use to sort the list.

  • order (string) -- [REQUIRED]

    The order to sort the list. You can choose ascending or descending.

type filters

list

param filters

Provides the specification of a filter used to limit the slots in the response to only those that match the filter specification. You can only specify one filter and only one string to filter on.

  • (dict) --

    Filters the response from the ListSlots operation.

    • name (string) -- [REQUIRED]

      The name of the field to use for filtering.

    • values (list) -- [REQUIRED]

      The value to use to filter the response.

      • (string) --

    • operator (string) -- [REQUIRED]

      The operator to use for the filter. Specify EQ when the ListSlots operation should return only aliases that equal the specified value. Specify CO when the ListSlots operation should return aliases that contain the specified value.

type maxResults

integer

param maxResults

The maximum number of slots to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

type nextToken

string

param nextToken

If the response from the ListSlots operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'intentId': 'string',
    'slotSummaries': [
        {
            'slotId': 'string',
            'slotName': 'string',
            'description': 'string',
            'slotConstraint': 'Required'|'Optional',
            'slotTypeId': 'string',
            'valueElicitationPromptSpecification': {
                'messageGroups': [
                    {
                        'message': {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                        'variations': [
                            {
                                'plainTextMessage': {
                                    'value': 'string'
                                },
                                'customPayload': {
                                    'value': 'string'
                                },
                                'ssmlMessage': {
                                    'value': 'string'
                                },
                                'imageResponseCard': {
                                    'title': 'string',
                                    'subtitle': 'string',
                                    'imageUrl': 'string',
                                    'buttons': [
                                        {
                                            'text': 'string',
                                            'value': 'string'
                                        },
                                    ]
                                }
                            },
                        ]
                    },
                ],
                'maxRetries': 123,
                'allowInterrupt': True|False
            },
            'lastUpdatedDateTime': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • botId (string) --

      The identifier of the bot that contains the slots.

    • botVersion (string) --

      The version of the bot that contains the slots.

    • localeId (string) --

      The language and locale of the slots in the list.

    • intentId (string) --

      The identifier of the intent that contains the slots.

    • slotSummaries (list) --

      Summary information for the slots that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more slots available, the nextToken field contains a token to get the next page of results.

      • (dict) --

        Summary information about a slot, a value that the bot elicits from the user.

        • slotId (string) --

          The unique identifier of the slot.

        • slotName (string) --

          The name given to the slot.

        • description (string) --

          The description of the slot.

        • slotConstraint (string) --

          Whether the slot is required or optional. An intent is complete when all required slots are filled.

        • slotTypeId (string) --

          The unique identifier for the slot type that defines the values for the slot.

        • valueElicitationPromptSpecification (dict) --

          Prompts that are sent to the user to elicit a value for the slot.

          • messageGroups (list) --

            A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.

            • (dict) --

              Provides one or more messages that Amazon Lex should send to the user.

              • message (dict) --

                The primary message that Amazon Lex should send to the user.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

              • variations (list) --

                Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

                • (dict) --

                  The object that provides message text and it's type.

                  • plainTextMessage (dict) --

                    A message in plain text format.

                    • value (string) --

                      The message to send to the user.

                  • customPayload (dict) --

                    A message in a custom format defined by the client application.

                    • value (string) --

                      The string that is sent to your application.

                  • ssmlMessage (dict) --

                    A message in Speech Synthesis Markup Language (SSML).

                    • value (string) --

                      The SSML text that defines the prompt.

                  • imageResponseCard (dict) --

                    A message that defines a response card that the client application can show to the user.

                    • title (string) --

                      The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                    • subtitle (string) --

                      The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                    • imageUrl (string) --

                      The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                    • buttons (list) --

                      A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                      • (dict) --

                        Describes a button to use on a response card used to gather slot values from a user.

                        • text (string) --

                          The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                        • value (string) --

                          The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

          • maxRetries (integer) --

            The maximum number of times the bot tries to elicit a resonse from the user using this prompt.

          • allowInterrupt (boolean) --

            Indicates whether the user can interrupt a speech prompt from the bot.

        • lastUpdatedDateTime (datetime) --

          The timestamp of the last date and time that the slot was updated.

    • nextToken (string) --

      A token that indicates whether there are more results to return in a response to the ListSlots operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListSlots operation request to get the next page of results.

UpdateIntent (new) Link ¶

Updates the settings for an intent.

See also: AWS API Documentation

Request Syntax

client.update_intent(
    intentId='string',
    intentName='string',
    description='string',
    parentIntentSignature='string',
    sampleUtterances=[
        {
            'utterance': 'string'
        },
    ],
    dialogCodeHook={
        'enabled': True|False
    },
    fulfillmentCodeHook={
        'enabled': True|False
    },
    slotPriorities=[
        {
            'priority': 123,
            'slotId': 'string'
        },
    ],
    intentConfirmationSetting={
        'promptSpecification': {
            'messageGroups': [
                {
                    'message': {
                        'plainTextMessage': {
                            'value': 'string'
                        },
                        'customPayload': {
                            'value': 'string'
                        },
                        'ssmlMessage': {
                            'value': 'string'
                        },
                        'imageResponseCard': {
                            'title': 'string',
                            'subtitle': 'string',
                            'imageUrl': 'string',
                            'buttons': [
                                {
                                    'text': 'string',
                                    'value': 'string'
                                },
                            ]
                        }
                    },
                    'variations': [
                        {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                    ]
                },
            ],
            'maxRetries': 123,
            'allowInterrupt': True|False
        },
        'declinationResponse': {
            'messageGroups': [
                {
                    'message': {
                        'plainTextMessage': {
                            'value': 'string'
                        },
                        'customPayload': {
                            'value': 'string'
                        },
                        'ssmlMessage': {
                            'value': 'string'
                        },
                        'imageResponseCard': {
                            'title': 'string',
                            'subtitle': 'string',
                            'imageUrl': 'string',
                            'buttons': [
                                {
                                    'text': 'string',
                                    'value': 'string'
                                },
                            ]
                        }
                    },
                    'variations': [
                        {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                    ]
                },
            ],
            'allowInterrupt': True|False
        }
    },
    intentClosingSetting={
        'closingResponse': {
            'messageGroups': [
                {
                    'message': {
                        'plainTextMessage': {
                            'value': 'string'
                        },
                        'customPayload': {
                            'value': 'string'
                        },
                        'ssmlMessage': {
                            'value': 'string'
                        },
                        'imageResponseCard': {
                            'title': 'string',
                            'subtitle': 'string',
                            'imageUrl': 'string',
                            'buttons': [
                                {
                                    'text': 'string',
                                    'value': 'string'
                                },
                            ]
                        }
                    },
                    'variations': [
                        {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                    ]
                },
            ],
            'allowInterrupt': True|False
        }
    },
    inputContexts=[
        {
            'name': 'string'
        },
    ],
    outputContexts=[
        {
            'name': 'string',
            'timeToLiveInSeconds': 123,
            'turnsToLive': 123
        },
    ],
    kendraConfiguration={
        'kendraIndex': 'string',
        'queryFilterStringEnabled': True|False,
        'queryFilterString': 'string'
    },
    botId='string',
    botVersion='string',
    localeId='string'
)
type intentId

string

param intentId

[REQUIRED]

The unique identifier of the intent to update.

type intentName

string

param intentName

[REQUIRED]

The new name for the intent.

type description

string

param description

The new description of the intent.

type parentIntentSignature

string

param parentIntentSignature

The signature of the new built-in intent to use as the parent of this intent.

type sampleUtterances

list

param sampleUtterances

New utterances used to invoke the intent.

  • (dict) --

    A sample utterance that invokes an intent or respond to a slot elicitation prompt.

    • utterance (string) -- [REQUIRED]

      The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.

type dialogCodeHook

dict

param dialogCodeHook

The new Lambda function to use between each turn of the conversation with the bot.

  • enabled (boolean) -- [REQUIRED]

    Enables the dialog code hook so that it processes user requests.

type fulfillmentCodeHook

dict

param fulfillmentCodeHook

The new Lambda function to call when all of the intents required slots are provided and the intent is ready for fulfillment.

  • enabled (boolean) -- [REQUIRED]

    Indicates whether a Lambda function should be invoked to fulfill a specific intent.

type slotPriorities

list

param slotPriorities

A new list of slots and their priorities that are contained by the intent.

  • (dict) --

    Sets the priority that Amazon Lex should use when eliciting slot values from a user.

    • priority (integer) -- [REQUIRED]

      The priority that a slot should be elicited.

    • slotId (string) -- [REQUIRED]

      The unique identifier of the slot.

type intentConfirmationSetting

dict

param intentConfirmationSetting

New prompts that Amazon Lex sends to the user to confirm the completion of an intent.

  • promptSpecification (dict) -- [REQUIRED]

    Prompts the user to confirm the intent. This question should have a yes or no answer.

    Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the OrderPizza intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information.

    • messageGroups (list) -- [REQUIRED]

      A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.

      • (dict) --

        Provides one or more messages that Amazon Lex should send to the user.

        • message (dict) -- [REQUIRED]

          The primary message that Amazon Lex should send to the user.

          • plainTextMessage (dict) --

            A message in plain text format.

            • value (string) -- [REQUIRED]

              The message to send to the user.

          • customPayload (dict) --

            A message in a custom format defined by the client application.

            • value (string) -- [REQUIRED]

              The string that is sent to your application.

          • ssmlMessage (dict) --

            A message in Speech Synthesis Markup Language (SSML).

            • value (string) -- [REQUIRED]

              The SSML text that defines the prompt.

          • imageResponseCard (dict) --

            A message that defines a response card that the client application can show to the user.

            • title (string) -- [REQUIRED]

              The title to display on the response card. The format of the title is determined by the platform displaying the response card.

            • subtitle (string) --

              The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

            • imageUrl (string) --

              The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

            • buttons (list) --

              A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

              • (dict) --

                Describes a button to use on a response card used to gather slot values from a user.

                • text (string) -- [REQUIRED]

                  The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                • value (string) -- [REQUIRED]

                  The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

        • variations (list) --

          Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

          • (dict) --

            The object that provides message text and it's type.

            • plainTextMessage (dict) --

              A message in plain text format.

              • value (string) -- [REQUIRED]

                The message to send to the user.

            • customPayload (dict) --

              A message in a custom format defined by the client application.

              • value (string) -- [REQUIRED]

                The string that is sent to your application.

            • ssmlMessage (dict) --

              A message in Speech Synthesis Markup Language (SSML).

              • value (string) -- [REQUIRED]

                The SSML text that defines the prompt.

            • imageResponseCard (dict) --

              A message that defines a response card that the client application can show to the user.

              • title (string) -- [REQUIRED]

                The title to display on the response card. The format of the title is determined by the platform displaying the response card.

              • subtitle (string) --

                The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

              • imageUrl (string) --

                The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

              • buttons (list) --

                A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                • (dict) --

                  Describes a button to use on a response card used to gather slot values from a user.

                  • text (string) -- [REQUIRED]

                    The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                  • value (string) -- [REQUIRED]

                    The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

    • maxRetries (integer) -- [REQUIRED]

      The maximum number of times the bot tries to elicit a resonse from the user using this prompt.

    • allowInterrupt (boolean) --

      Indicates whether the user can interrupt a speech prompt from the bot.

  • declinationResponse (dict) -- [REQUIRED]

    When the user answers "no" to the question defined in promptSpecification , Amazon Lex responds with this response to acknowledge that the intent was canceled.

    • messageGroups (list) -- [REQUIRED]

      A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.

      • (dict) --

        Provides one or more messages that Amazon Lex should send to the user.

        • message (dict) -- [REQUIRED]

          The primary message that Amazon Lex should send to the user.

          • plainTextMessage (dict) --

            A message in plain text format.

            • value (string) -- [REQUIRED]

              The message to send to the user.

          • customPayload (dict) --

            A message in a custom format defined by the client application.

            • value (string) -- [REQUIRED]

              The string that is sent to your application.

          • ssmlMessage (dict) --

            A message in Speech Synthesis Markup Language (SSML).

            • value (string) -- [REQUIRED]

              The SSML text that defines the prompt.

          • imageResponseCard (dict) --

            A message that defines a response card that the client application can show to the user.

            • title (string) -- [REQUIRED]

              The title to display on the response card. The format of the title is determined by the platform displaying the response card.

            • subtitle (string) --

              The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

            • imageUrl (string) --

              The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

            • buttons (list) --

              A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

              • (dict) --

                Describes a button to use on a response card used to gather slot values from a user.

                • text (string) -- [REQUIRED]

                  The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                • value (string) -- [REQUIRED]

                  The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

        • variations (list) --

          Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

          • (dict) --

            The object that provides message text and it's type.

            • plainTextMessage (dict) --

              A message in plain text format.

              • value (string) -- [REQUIRED]

                The message to send to the user.

            • customPayload (dict) --

              A message in a custom format defined by the client application.

              • value (string) -- [REQUIRED]

                The string that is sent to your application.

            • ssmlMessage (dict) --

              A message in Speech Synthesis Markup Language (SSML).

              • value (string) -- [REQUIRED]

                The SSML text that defines the prompt.

            • imageResponseCard (dict) --

              A message that defines a response card that the client application can show to the user.

              • title (string) -- [REQUIRED]

                The title to display on the response card. The format of the title is determined by the platform displaying the response card.

              • subtitle (string) --

                The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

              • imageUrl (string) --

                The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

              • buttons (list) --

                A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                • (dict) --

                  Describes a button to use on a response card used to gather slot values from a user.

                  • text (string) -- [REQUIRED]

                    The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                  • value (string) -- [REQUIRED]

                    The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

    • allowInterrupt (boolean) --

      Indicates whether the user can interrupt a speech response from Amazon Lex.

type intentClosingSetting

dict

param intentClosingSetting

The new response that Amazon Lex sends the user when the intent is closed.

  • closingResponse (dict) -- [REQUIRED]

    The response that Amazon Lex sends to the user when the intent is complete.

    • messageGroups (list) -- [REQUIRED]

      A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.

      • (dict) --

        Provides one or more messages that Amazon Lex should send to the user.

        • message (dict) -- [REQUIRED]

          The primary message that Amazon Lex should send to the user.

          • plainTextMessage (dict) --

            A message in plain text format.

            • value (string) -- [REQUIRED]

              The message to send to the user.

          • customPayload (dict) --

            A message in a custom format defined by the client application.

            • value (string) -- [REQUIRED]

              The string that is sent to your application.

          • ssmlMessage (dict) --

            A message in Speech Synthesis Markup Language (SSML).

            • value (string) -- [REQUIRED]

              The SSML text that defines the prompt.

          • imageResponseCard (dict) --

            A message that defines a response card that the client application can show to the user.

            • title (string) -- [REQUIRED]

              The title to display on the response card. The format of the title is determined by the platform displaying the response card.

            • subtitle (string) --

              The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

            • imageUrl (string) --

              The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

            • buttons (list) --

              A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

              • (dict) --

                Describes a button to use on a response card used to gather slot values from a user.

                • text (string) -- [REQUIRED]

                  The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                • value (string) -- [REQUIRED]

                  The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

        • variations (list) --

          Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

          • (dict) --

            The object that provides message text and it's type.

            • plainTextMessage (dict) --

              A message in plain text format.

              • value (string) -- [REQUIRED]

                The message to send to the user.

            • customPayload (dict) --

              A message in a custom format defined by the client application.

              • value (string) -- [REQUIRED]

                The string that is sent to your application.

            • ssmlMessage (dict) --

              A message in Speech Synthesis Markup Language (SSML).

              • value (string) -- [REQUIRED]

                The SSML text that defines the prompt.

            • imageResponseCard (dict) --

              A message that defines a response card that the client application can show to the user.

              • title (string) -- [REQUIRED]

                The title to display on the response card. The format of the title is determined by the platform displaying the response card.

              • subtitle (string) --

                The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

              • imageUrl (string) --

                The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

              • buttons (list) --

                A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                • (dict) --

                  Describes a button to use on a response card used to gather slot values from a user.

                  • text (string) -- [REQUIRED]

                    The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                  • value (string) -- [REQUIRED]

                    The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

    • allowInterrupt (boolean) --

      Indicates whether the user can interrupt a speech response from Amazon Lex.

type inputContexts

list

param inputContexts

A new list of contexts that must be active in order for Amazon Lex to consider the intent.

  • (dict) --

    The name of a context that must be active for an intent to be selected by Amazon Lex.

    • name (string) -- [REQUIRED]

      The name of the context.

type outputContexts

list

param outputContexts

A new list of contexts that Amazon Lex activates when the intent is fulfilled.

  • (dict) --

    Describes a session context that is activated when an intent is fulfilled.

    • name (string) -- [REQUIRED]

      The name of the output context.

    • timeToLiveInSeconds (integer) -- [REQUIRED]

      The amount of time, in seconds, that the output context should remain active. The time is figured from the first time the context is sent to the user.

    • turnsToLive (integer) -- [REQUIRED]

      The number of conversation turns that the output context should remain active. The number of turns is counted from the first time that the context is sent to the user.

type kendraConfiguration

dict

param kendraConfiguration

New configuration settings for connecting to an Amazon Kendra index.

  • kendraIndex (string) -- [REQUIRED]

    The Amazon Resource Name (ARN) of the Amazon Kendra index that you want the AMAZON.KendraSearchIntent intent to search. The index must be in the same account and Region as the Amazon Lex bot.

  • queryFilterStringEnabled (boolean) --

    Determines whether the AMAZON.KendraSearchIntent intent uses a custom query string to query the Amazon Kendra index.

  • queryFilterString (string) --

    A query filter that Amazon Lex sends to Amazon Kendra to filter the response from a query. The filter is in the format defined by Amazon Kendra. For more information, see Filtering queries .

type botId

string

param botId

[REQUIRED]

The identifier of the bot that contains the intent.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot that contains the intent. Must be DRAFT .

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale where this intent is used. The string must match one of the supported locales. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

rtype

dict

returns

Response Syntax

{
    'intentId': 'string',
    'intentName': 'string',
    'description': 'string',
    'parentIntentSignature': 'string',
    'sampleUtterances': [
        {
            'utterance': 'string'
        },
    ],
    'dialogCodeHook': {
        'enabled': True|False
    },
    'fulfillmentCodeHook': {
        'enabled': True|False
    },
    'slotPriorities': [
        {
            'priority': 123,
            'slotId': 'string'
        },
    ],
    'intentConfirmationSetting': {
        'promptSpecification': {
            'messageGroups': [
                {
                    'message': {
                        'plainTextMessage': {
                            'value': 'string'
                        },
                        'customPayload': {
                            'value': 'string'
                        },
                        'ssmlMessage': {
                            'value': 'string'
                        },
                        'imageResponseCard': {
                            'title': 'string',
                            'subtitle': 'string',
                            'imageUrl': 'string',
                            'buttons': [
                                {
                                    'text': 'string',
                                    'value': 'string'
                                },
                            ]
                        }
                    },
                    'variations': [
                        {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                    ]
                },
            ],
            'maxRetries': 123,
            'allowInterrupt': True|False
        },
        'declinationResponse': {
            'messageGroups': [
                {
                    'message': {
                        'plainTextMessage': {
                            'value': 'string'
                        },
                        'customPayload': {
                            'value': 'string'
                        },
                        'ssmlMessage': {
                            'value': 'string'
                        },
                        'imageResponseCard': {
                            'title': 'string',
                            'subtitle': 'string',
                            'imageUrl': 'string',
                            'buttons': [
                                {
                                    'text': 'string',
                                    'value': 'string'
                                },
                            ]
                        }
                    },
                    'variations': [
                        {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                    ]
                },
            ],
            'allowInterrupt': True|False
        }
    },
    'intentClosingSetting': {
        'closingResponse': {
            'messageGroups': [
                {
                    'message': {
                        'plainTextMessage': {
                            'value': 'string'
                        },
                        'customPayload': {
                            'value': 'string'
                        },
                        'ssmlMessage': {
                            'value': 'string'
                        },
                        'imageResponseCard': {
                            'title': 'string',
                            'subtitle': 'string',
                            'imageUrl': 'string',
                            'buttons': [
                                {
                                    'text': 'string',
                                    'value': 'string'
                                },
                            ]
                        }
                    },
                    'variations': [
                        {
                            'plainTextMessage': {
                                'value': 'string'
                            },
                            'customPayload': {
                                'value': 'string'
                            },
                            'ssmlMessage': {
                                'value': 'string'
                            },
                            'imageResponseCard': {
                                'title': 'string',
                                'subtitle': 'string',
                                'imageUrl': 'string',
                                'buttons': [
                                    {
                                        'text': 'string',
                                        'value': 'string'
                                    },
                                ]
                            }
                        },
                    ]
                },
            ],
            'allowInterrupt': True|False
        }
    },
    'inputContexts': [
        {
            'name': 'string'
        },
    ],
    'outputContexts': [
        {
            'name': 'string',
            'timeToLiveInSeconds': 123,
            'turnsToLive': 123
        },
    ],
    'kendraConfiguration': {
        'kendraIndex': 'string',
        'queryFilterStringEnabled': True|False,
        'queryFilterString': 'string'
    },
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'creationDateTime': datetime(2015, 1, 1),
    'lastUpdatedDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • intentId (string) --

      The identifier of the intent that was updated.

    • intentName (string) --

      The updated name of the intent.

    • description (string) --

      The updated description of the intent.

    • parentIntentSignature (string) --

      The updated built-in intent that is the parent of this intent.

    • sampleUtterances (list) --

      The updated list of sample utterances for the intent.

      • (dict) --

        A sample utterance that invokes an intent or respond to a slot elicitation prompt.

        • utterance (string) --

          The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.

    • dialogCodeHook (dict) --

      The updated Lambda function called during each turn of the conversation with the user.

      • enabled (boolean) --

        Enables the dialog code hook so that it processes user requests.

    • fulfillmentCodeHook (dict) --

      The updated Lambda function called when the intent is ready for fulfillment.

      • enabled (boolean) --

        Indicates whether a Lambda function should be invoked to fulfill a specific intent.

    • slotPriorities (list) --

      The updated list of slots and their priorities that are elicited from the user for the intent.

      • (dict) --

        Sets the priority that Amazon Lex should use when eliciting slot values from a user.

        • priority (integer) --

          The priority that a slot should be elicited.

        • slotId (string) --

          The unique identifier of the slot.

    • intentConfirmationSetting (dict) --

      The updated prompts that Amazon Lex sends to the user to confirm the completion of an intent.

      • promptSpecification (dict) --

        Prompts the user to confirm the intent. This question should have a yes or no answer.

        Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the OrderPizza intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information.

        • messageGroups (list) --

          A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.

          • (dict) --

            Provides one or more messages that Amazon Lex should send to the user.

            • message (dict) --

              The primary message that Amazon Lex should send to the user.

              • plainTextMessage (dict) --

                A message in plain text format.

                • value (string) --

                  The message to send to the user.

              • customPayload (dict) --

                A message in a custom format defined by the client application.

                • value (string) --

                  The string that is sent to your application.

              • ssmlMessage (dict) --

                A message in Speech Synthesis Markup Language (SSML).

                • value (string) --

                  The SSML text that defines the prompt.

              • imageResponseCard (dict) --

                A message that defines a response card that the client application can show to the user.

                • title (string) --

                  The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                • subtitle (string) --

                  The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                • imageUrl (string) --

                  The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                • buttons (list) --

                  A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                  • (dict) --

                    Describes a button to use on a response card used to gather slot values from a user.

                    • text (string) --

                      The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                    • value (string) --

                      The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

            • variations (list) --

              Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

              • (dict) --

                The object that provides message text and it's type.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

        • maxRetries (integer) --

          The maximum number of times the bot tries to elicit a resonse from the user using this prompt.

        • allowInterrupt (boolean) --

          Indicates whether the user can interrupt a speech prompt from the bot.

      • declinationResponse (dict) --

        When the user answers "no" to the question defined in promptSpecification , Amazon Lex responds with this response to acknowledge that the intent was canceled.

        • messageGroups (list) --

          A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.

          • (dict) --

            Provides one or more messages that Amazon Lex should send to the user.

            • message (dict) --

              The primary message that Amazon Lex should send to the user.

              • plainTextMessage (dict) --

                A message in plain text format.

                • value (string) --

                  The message to send to the user.

              • customPayload (dict) --

                A message in a custom format defined by the client application.

                • value (string) --

                  The string that is sent to your application.

              • ssmlMessage (dict) --

                A message in Speech Synthesis Markup Language (SSML).

                • value (string) --

                  The SSML text that defines the prompt.

              • imageResponseCard (dict) --

                A message that defines a response card that the client application can show to the user.

                • title (string) --

                  The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                • subtitle (string) --

                  The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                • imageUrl (string) --

                  The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                • buttons (list) --

                  A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                  • (dict) --

                    Describes a button to use on a response card used to gather slot values from a user.

                    • text (string) --

                      The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                    • value (string) --

                      The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

            • variations (list) --

              Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

              • (dict) --

                The object that provides message text and it's type.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

        • allowInterrupt (boolean) --

          Indicates whether the user can interrupt a speech response from Amazon Lex.

    • intentClosingSetting (dict) --

      The updated response that Amazon Lex sends the user when the intent is closed.

      • closingResponse (dict) --

        The response that Amazon Lex sends to the user when the intent is complete.

        • messageGroups (list) --

          A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.

          • (dict) --

            Provides one or more messages that Amazon Lex should send to the user.

            • message (dict) --

              The primary message that Amazon Lex should send to the user.

              • plainTextMessage (dict) --

                A message in plain text format.

                • value (string) --

                  The message to send to the user.

              • customPayload (dict) --

                A message in a custom format defined by the client application.

                • value (string) --

                  The string that is sent to your application.

              • ssmlMessage (dict) --

                A message in Speech Synthesis Markup Language (SSML).

                • value (string) --

                  The SSML text that defines the prompt.

              • imageResponseCard (dict) --

                A message that defines a response card that the client application can show to the user.

                • title (string) --

                  The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                • subtitle (string) --

                  The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                • imageUrl (string) --

                  The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                • buttons (list) --

                  A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                  • (dict) --

                    Describes a button to use on a response card used to gather slot values from a user.

                    • text (string) --

                      The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                    • value (string) --

                      The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

            • variations (list) --

              Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.

              • (dict) --

                The object that provides message text and it's type.

                • plainTextMessage (dict) --

                  A message in plain text format.

                  • value (string) --

                    The message to send to the user.

                • customPayload (dict) --

                  A message in a custom format defined by the client application.

                  • value (string) --

                    The string that is sent to your application.

                • ssmlMessage (dict) --

                  A message in Speech Synthesis Markup Language (SSML).

                  • value (string) --

                    The SSML text that defines the prompt.

                • imageResponseCard (dict) --

                  A message that defines a response card that the client application can show to the user.

                  • title (string) --

                    The title to display on the response card. The format of the title is determined by the platform displaying the response card.

                  • subtitle (string) --

                    The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.

                  • imageUrl (string) --

                    The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.

                  • buttons (list) --

                    A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.

                    • (dict) --

                      Describes a button to use on a response card used to gather slot values from a user.

                      • text (string) --

                        The text that appears on the button. Use this to tell the user what value is returned when they choose this button.

                      • value (string) --

                        The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.

        • allowInterrupt (boolean) --

          Indicates whether the user can interrupt a speech response from Amazon Lex.

    • inputContexts (list) --

      The updated list of contexts that must be active for the intent to be considered by Amazon Lex.

      • (dict) --

        The name of a context that must be active for an intent to be selected by Amazon Lex.

        • name (string) --

          The name of the context.

    • outputContexts (list) --

      The updated list of contexts that Amazon Lex activates when the intent is fulfilled.

      • (dict) --

        Describes a session context that is activated when an intent is fulfilled.

        • name (string) --

          The name of the output context.

        • timeToLiveInSeconds (integer) --

          The amount of time, in seconds, that the output context should remain active. The time is figured from the first time the context is sent to the user.

        • turnsToLive (integer) --

          The number of conversation turns that the output context should remain active. The number of turns is counted from the first time that the context is sent to the user.

    • kendraConfiguration (dict) --

      The updated configuration for connecting to an Amazon Kendra index with the AMAZON.KendraSearchIntent intent.

      • kendraIndex (string) --

        The Amazon Resource Name (ARN) of the Amazon Kendra index that you want the AMAZON.KendraSearchIntent intent to search. The index must be in the same account and Region as the Amazon Lex bot.

      • queryFilterStringEnabled (boolean) --

        Determines whether the AMAZON.KendraSearchIntent intent uses a custom query string to query the Amazon Kendra index.

      • queryFilterString (string) --

        A query filter that Amazon Lex sends to Amazon Kendra to filter the response from a query. The filter is in the format defined by Amazon Kendra. For more information, see Filtering queries .

    • botId (string) --

      The identifier of the bot that contains the intent.

    • botVersion (string) --

      The version of the bot that contains the intent. Will always be DRAFT .

    • localeId (string) --

      The updated language and locale of the intent.

    • creationDateTime (datetime) --

      A timestamp of when the intent was created.

    • lastUpdatedDateTime (datetime) --

      A timestamp of the last time that the intent was modified.

ListBuiltInIntents (new) Link ¶

Gets a list of built-in intents provided by Amazon Lex that you can use in your bot.

To use a built-in intent as a the base for your own intent, include the built-in intent signature in the parentIntentSignature parameter when you call the CreateIntent operation. For more information, see CreateIntent .

See also: AWS API Documentation

Request Syntax

client.list_built_in_intents(
    localeId='string',
    sortBy={
        'attribute': 'IntentSignature',
        'order': 'Ascending'|'Descending'
    },
    maxResults=123,
    nextToken='string'
)
type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale of the intents to list. The string must match one of the supported locales. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

type sortBy

dict

param sortBy

Specifies sorting parameters for the list of built-in intents. You can specify that the list be sorted by the built-in intent signature in either ascending or descending order.

  • attribute (string) -- [REQUIRED]

    The attribute to use to sort the list of built-in intents.

  • order (string) -- [REQUIRED]

    The order to sort the list. You can specify ascending or descending order.

type maxResults

integer

param maxResults

The maximum number of built-in intents to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

type nextToken

string

param nextToken

If the response from the ListBuiltInIntents operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

rtype

dict

returns

Response Syntax

{
    'builtInIntentSummaries': [
        {
            'intentSignature': 'string',
            'description': 'string'
        },
    ],
    'nextToken': 'string',
    'localeId': 'string'
}

Response Structure

  • (dict) --

    • builtInIntentSummaries (list) --

      Summary information for the built-in intents that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more intents available, the nextToken field contains a token to get the next page of results.

      • (dict) --

        Provides summary information about a built-in intent for the ListBuiltInIntents operation.

        • intentSignature (string) --

          The signature of the built-in intent. Use this to specify the parent intent of a derived intent.

        • description (string) --

          The description of the intent.

    • nextToken (string) --

      A token that indicates whether there are more results to return in a response to the ListBuiltInIntents operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListBotAliases operation request to get the next page of results.

    • localeId (string) --

      The language and locale of the intents in the list.

CreateBotAlias (new) Link ¶

Creates an alias for the specified version of a bot. Use an alias to enable you to change the version of a bot without updating applications that use the bot.

For example, you can create an alias called "PROD" that your applications use to call the Amazon Lex bot.

See also: AWS API Documentation

Request Syntax

client.create_bot_alias(
    botAliasName='string',
    description='string',
    botVersion='string',
    botAliasLocaleSettings={
        'string': {
            'enabled': True|False,
            'codeHookSpecification': {
                'lambdaCodeHook': {
                    'lambdaARN': 'string',
                    'codeHookInterfaceVersion': 'string'
                }
            }
        }
    },
    conversationLogSettings={
        'textLogSettings': [
            {
                'enabled': True|False,
                'destination': {
                    'cloudWatch': {
                        'cloudWatchLogGroupArn': 'string',
                        'logPrefix': 'string'
                    }
                }
            },
        ],
        'audioLogSettings': [
            {
                'enabled': True|False,
                'destination': {
                    's3Bucket': {
                        'kmsKeyArn': 'string',
                        's3BucketArn': 'string',
                        'logPrefix': 'string'
                    }
                }
            },
        ]
    },
    sentimentAnalysisSettings={
        'detectSentiment': True|False
    },
    botId='string',
    tags={
        'string': 'string'
    }
)
type botAliasName

string

param botAliasName

[REQUIRED]

The alias to create. The name must be unique for the bot.

type description

string

param description

A description of the alias. Use this description to help identify the alias.

type botVersion

string

param botVersion

The version of the bot that this alias points to. You can use the operation to change the bot version associated with the alias.

type botAliasLocaleSettings

dict

param botAliasLocaleSettings

Maps configuration information to a specific locale. You can use this parameter to specify a specific Lambda function to run different functions in different locales.

  • (string) --

    • (dict) --

      Specifies settings that are unique to a locale. For example, you can use different Lambda function depending on the bot's locale.

      • enabled (boolean) -- [REQUIRED]

        Determines whether the locale is enabled for the bot. If the value is false , the locale isn't available for use.

      • codeHookSpecification (dict) --

        Specifies the Lambda function that should be used in the locale.

        • lambdaCodeHook (dict) -- [REQUIRED]

          Specifies a Lambda function that verifies requests to a bot or fulfilles the user's request to a bot.

          • lambdaARN (string) -- [REQUIRED]

            The Amazon Resource Name (ARN) of the Lambda function.

          • codeHookInterfaceVersion (string) -- [REQUIRED]

            The version of the request-response that you want Amazon Lex to use to invoke your Lambda function.

type conversationLogSettings

dict

param conversationLogSettings

Specifies whether Amazon Lex logs text and audio for a conversation with the bot. When you enable conversation logs, text logs store text input, transcripts of audio input, and associated metadata in Amazon CloudWatch Logs. Audio logs store audio input in Amazon S3.

  • textLogSettings (list) --

    The Amazon CloudWatch Logs settings for logging text and metadata.

    • (dict) --

      Defines settings to enable text conversation logs.

      • enabled (boolean) -- [REQUIRED]

        Determines whether conversation logs should be stored for an alias.

      • destination (dict) -- [REQUIRED]

        Defines the Amazon CloudWatch Logs destination log group for conversation text logs.

        • cloudWatch (dict) -- [REQUIRED]

          Defines the Amazon CloudWatch Logs log group where text and metadata logs are delivered.

          • cloudWatchLogGroupArn (string) -- [REQUIRED]

            The Amazon Resource Name (ARN) of the log group where text and metadata logs are delivered.

          • logPrefix (string) -- [REQUIRED]

            The prefix of the log stream name within the log group that you specified

  • audioLogSettings (list) --

    The Amazon S3 settings for logging audio to an S3 bucket.

    • (dict) --

      Settings for logging audio of conversations between Amazon Lex and a user. You specify whether to log audio and the Amazon S3 bucket where the audio file is stored.

      • enabled (boolean) -- [REQUIRED]

        Determines whether audio logging in enabled for the bot.

      • destination (dict) -- [REQUIRED]

        The location of audio log files collected when conversation logging is enabled for a bot.

        • s3Bucket (dict) -- [REQUIRED]

          The Amazon S3 bucket where the audio log files are stored. The IAM role specified in the roleArn parameter of the CreateBot operation must have permission to write to this bucket.

          • kmsKeyArn (string) --

            The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key for encrypting audio log files stored in an S3 bucket.

          • s3BucketArn (string) -- [REQUIRED]

            The Amazon Resource Name (ARN) of an Amazon S3 bucket where audio log files are stored.

          • logPrefix (string) -- [REQUIRED]

            The S3 prefix to assign to audio log files.

type sentimentAnalysisSettings

dict

param sentimentAnalysisSettings

Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.

  • detectSentiment (boolean) -- [REQUIRED]

    Sets whether Amazon Lex uses Amazon Comprehend to detect the sentiment of user utterances.

type botId

string

param botId

[REQUIRED]

The unique identifier of the bot that the alias applies to.

type tags

dict

param tags

A list of tags to add to the bot alias. You can only add tags when you create an alias, you can't use the UpdateBotAlias operation to update the tags on a bot alias. To update tags, use the TagResource operation.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'botAliasId': 'string',
    'botAliasName': 'string',
    'description': 'string',
    'botVersion': 'string',
    'botAliasLocaleSettings': {
        'string': {
            'enabled': True|False,
            'codeHookSpecification': {
                'lambdaCodeHook': {
                    'lambdaARN': 'string',
                    'codeHookInterfaceVersion': 'string'
                }
            }
        }
    },
    'conversationLogSettings': {
        'textLogSettings': [
            {
                'enabled': True|False,
                'destination': {
                    'cloudWatch': {
                        'cloudWatchLogGroupArn': 'string',
                        'logPrefix': 'string'
                    }
                }
            },
        ],
        'audioLogSettings': [
            {
                'enabled': True|False,
                'destination': {
                    's3Bucket': {
                        'kmsKeyArn': 'string',
                        's3BucketArn': 'string',
                        'logPrefix': 'string'
                    }
                }
            },
        ]
    },
    'sentimentAnalysisSettings': {
        'detectSentiment': True|False
    },
    'botAliasStatus': 'Creating'|'Available'|'Deleting'|'Failed',
    'botId': 'string',
    'creationDateTime': datetime(2015, 1, 1),
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • botAliasId (string) --

      The unique identifier of the bot alias.

    • botAliasName (string) --

      The name specified for the bot alias.

    • description (string) --

      The description specified for the bot alias.

    • botVersion (string) --

      The version of the bot associated with this alias.

    • botAliasLocaleSettings (dict) --

      Configuration information for a specific locale.

      • (string) --

        • (dict) --

          Specifies settings that are unique to a locale. For example, you can use different Lambda function depending on the bot's locale.

          • enabled (boolean) --

            Determines whether the locale is enabled for the bot. If the value is false , the locale isn't available for use.

          • codeHookSpecification (dict) --

            Specifies the Lambda function that should be used in the locale.

            • lambdaCodeHook (dict) --

              Specifies a Lambda function that verifies requests to a bot or fulfilles the user's request to a bot.

              • lambdaARN (string) --

                The Amazon Resource Name (ARN) of the Lambda function.

              • codeHookInterfaceVersion (string) --

                The version of the request-response that you want Amazon Lex to use to invoke your Lambda function.

    • conversationLogSettings (dict) --

      The conversation log settings specified for the alias.

      • textLogSettings (list) --

        The Amazon CloudWatch Logs settings for logging text and metadata.

        • (dict) --

          Defines settings to enable text conversation logs.

          • enabled (boolean) --

            Determines whether conversation logs should be stored for an alias.

          • destination (dict) --

            Defines the Amazon CloudWatch Logs destination log group for conversation text logs.

            • cloudWatch (dict) --

              Defines the Amazon CloudWatch Logs log group where text and metadata logs are delivered.

              • cloudWatchLogGroupArn (string) --

                The Amazon Resource Name (ARN) of the log group where text and metadata logs are delivered.

              • logPrefix (string) --

                The prefix of the log stream name within the log group that you specified

      • audioLogSettings (list) --

        The Amazon S3 settings for logging audio to an S3 bucket.

        • (dict) --

          Settings for logging audio of conversations between Amazon Lex and a user. You specify whether to log audio and the Amazon S3 bucket where the audio file is stored.

          • enabled (boolean) --

            Determines whether audio logging in enabled for the bot.

          • destination (dict) --

            The location of audio log files collected when conversation logging is enabled for a bot.

            • s3Bucket (dict) --

              The Amazon S3 bucket where the audio log files are stored. The IAM role specified in the roleArn parameter of the CreateBot operation must have permission to write to this bucket.

              • kmsKeyArn (string) --

                The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key for encrypting audio log files stored in an S3 bucket.

              • s3BucketArn (string) --

                The Amazon Resource Name (ARN) of an Amazon S3 bucket where audio log files are stored.

              • logPrefix (string) --

                The S3 prefix to assign to audio log files.

    • sentimentAnalysisSettings (dict) --

      Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.

      • detectSentiment (boolean) --

        Sets whether Amazon Lex uses Amazon Comprehend to detect the sentiment of user utterances.

    • botAliasStatus (string) --

      The current status of the alias. The alias is first put into the Creating state. When the alias is ready to be used, it is put into the Available state. You can use the DescribeBotAlias operation to get the current state of an alias.

    • botId (string) --

      The unique identifier of the bot that this alias applies to.

    • creationDateTime (datetime) --

      A Unix timestamp indicating the date and time that the bot alias was created.

    • tags (dict) --

      A list of tags associated with the bot alias.

      • (string) --

        • (string) --

CreateSlotType (new) Link ¶

Creates a custom slot type

To create a custom slot type, specify a name for the slot type and a set of enumeration values, the values that a slot of this type can assume.

See also: AWS API Documentation

Request Syntax

client.create_slot_type(
    slotTypeName='string',
    description='string',
    slotTypeValues=[
        {
            'sampleValue': {
                'value': 'string'
            },
            'synonyms': [
                {
                    'value': 'string'
                },
            ]
        },
    ],
    valueSelectionSetting={
        'resolutionStrategy': 'OriginalValue'|'TopResolution',
        'regexFilter': {
            'pattern': 'string'
        }
    },
    parentSlotTypeSignature='string',
    botId='string',
    botVersion='string',
    localeId='string'
)
type slotTypeName

string

param slotTypeName

[REQUIRED]

The name for the slot. A slot type name must be unique within the account.

type description

string

param description

A description of the slot type. Use the description to help identify the slot type in lists.

type slotTypeValues

list

param slotTypeValues

A list of SlotTypeValue objects that defines the values that the slot type can take. Each value can have a list of synonyms, additional values that help train the machine learning model about the values that it resolves for a slot.

  • (dict) --

    Each slot type can have a set of values. Each SlotTypeValue represents a value that the slot type can take.

    • sampleValue (dict) --

      The value of the slot type entry.

      • value (string) -- [REQUIRED]

        The value that can be used for a slot type.

    • synonyms (list) --

      Additional values releated to the slot type entry.

      • (dict) --

        Defines one of the values for a slot type.

        • value (string) -- [REQUIRED]

          The value that can be used for a slot type.

type valueSelectionSetting

dict

param valueSelectionSetting

[REQUIRED]

Determines the strategy that Amazon Lex uses to select a value from the list of possible values. The field can be set to one of the following values:

  • OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.

  • TopResolution - If there is a resolution list for the slot, return the first value in the resolution list. If there is no resolution list, return null.

If you don't specify the valueSelectionSetting parameter, the default is OriginalValue .

  • resolutionStrategy (string) -- [REQUIRED]

    Determines the slot resolution strategy that Amazon Lex uses to return slot type values. The field can be set to one of the following values:

    • OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.

    • TopResolution - If there is a resolution list for the slot, return the first value in the resolution list as the slot type value. If there is no resolution list, null is returned.

    If you don't specify the valueSelectionStrategy, the default is OriginalValue.

  • regexFilter (dict) --

    A regular expression used to validate the value of a slot.

    • pattern (string) -- [REQUIRED]

      A regular expression used to validate the value of a slot.

      Use a standard regular expression. Amazon Lex supports the following characters in the regular expression:

      • A-Z, a-z

      • 0-9

      • Unicode characters ("u<Unicode>")

      Represent Unicode characters with four digits, for example "u0041" or "u005A".

      The following regular expression operators are not supported:

      • Infinite repeaters: *, +, or {x,} with no upper bound.

      • Wild card (.)

type parentSlotTypeSignature

string

param parentSlotTypeSignature

The built-in slot type used as a parent of this slot type. When you define a parent slot type, the new slot type has the configuration of the parent slot type.

Only AMAZON.AlphaNumeric is supported.

type botId

string

param botId

[REQUIRED]

The identifier of the bot associated with this slot type.

type botVersion

string

param botVersion

[REQUIRED]

The identifier of the bot version associated with this slot type.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale that the slot type will be used in. The string must match one of the supported locales. All of the bots, intents, and slots used by the slot type must have the same locale. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

rtype

dict

returns

Response Syntax

{
    'slotTypeId': 'string',
    'slotTypeName': 'string',
    'description': 'string',
    'slotTypeValues': [
        {
            'sampleValue': {
                'value': 'string'
            },
            'synonyms': [
                {
                    'value': 'string'
                },
            ]
        },
    ],
    'valueSelectionSetting': {
        'resolutionStrategy': 'OriginalValue'|'TopResolution',
        'regexFilter': {
            'pattern': 'string'
        }
    },
    'parentSlotTypeSignature': 'string',
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'creationDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • slotTypeId (string) --

      The unique identifier assigned to the slot type. Use this to identify the slot type in the UpdateSlotType and DeleteSlotType operations.

    • slotTypeName (string) --

      The name specified for the slot type.

    • description (string) --

      The description specified for the slot type.

    • slotTypeValues (list) --

      The list of values that the slot type can assume.

      • (dict) --

        Each slot type can have a set of values. Each SlotTypeValue represents a value that the slot type can take.

        • sampleValue (dict) --

          The value of the slot type entry.

          • value (string) --

            The value that can be used for a slot type.

        • synonyms (list) --

          Additional values releated to the slot type entry.

          • (dict) --

            Defines one of the values for a slot type.

            • value (string) --

              The value that can be used for a slot type.

    • valueSelectionSetting (dict) --

      The strategy that Amazon Lex uses to select a value from the list of possible values.

      • resolutionStrategy (string) --

        Determines the slot resolution strategy that Amazon Lex uses to return slot type values. The field can be set to one of the following values:

        • OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.

        • TopResolution - If there is a resolution list for the slot, return the first value in the resolution list as the slot type value. If there is no resolution list, null is returned.

        If you don't specify the valueSelectionStrategy, the default is OriginalValue.

      • regexFilter (dict) --

        A regular expression used to validate the value of a slot.

        • pattern (string) --

          A regular expression used to validate the value of a slot.

          Use a standard regular expression. Amazon Lex supports the following characters in the regular expression:

          • A-Z, a-z

          • 0-9

          • Unicode characters ("u<Unicode>")

          Represent Unicode characters with four digits, for example "u0041" or "u005A".

          The following regular expression operators are not supported:

          • Infinite repeaters: *, +, or {x,} with no upper bound.

          • Wild card (.)

    • parentSlotTypeSignature (string) --

      The signature of the base slot type specified for the slot type.

    • botId (string) --

      The identifier for the bot associated with the slot type.

    • botVersion (string) --

      The version of the bot associated with the slot type.

    • localeId (string) --

      The specified language and local specified for the slot type.

    • creationDateTime (datetime) --

      A timestamp of the date and time that the slot type was created.

DeleteBot (new) Link ¶

Deletes all versions of a bot, including the Draft version. To delete a specific version, use the DeleteBotVersion operation.

When you delete a bot, all of the resources contained in the bot are also deleted. Deleting a bot removes all locales, intents, slot, and slot types defined for the bot.

If a bot has an alias, the DeleteBot operation returns a ResourceInUseException exception. If you want to delete the bot and the alias, set the skipResourceInUseCheck parameter to true .

See also: AWS API Documentation

Request Syntax

client.delete_bot(
    botId='string',
    skipResourceInUseCheck=True|False
)
type botId

string

param botId

[REQUIRED]

The identifier of the bot to delete.

type skipResourceInUseCheck

boolean

param skipResourceInUseCheck

When true , Amazon Lex doesn't check to see if another resource, such as an alias, is using the bot before it is deleted.

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning'
}

Response Structure

  • (dict) --

    • botId (string) --

      The unique identifier of the bot that Amazon Lex is deleting.

    • botStatus (string) --

      The current status of the bot. The status is Deleting while the bot and its associated resources are being deleted.

CreateBot (new) Link ¶

Creates an Amazon Lex conversational bot.

See also: AWS API Documentation

Request Syntax

client.create_bot(
    botName='string',
    description='string',
    roleArn='string',
    dataPrivacy={
        'childDirected': True|False
    },
    idleSessionTTLInSeconds=123,
    botTags={
        'string': 'string'
    },
    testBotAliasTags={
        'string': 'string'
    }
)
type botName

string

param botName

[REQUIRED]

The name of the bot. The bot name must be unique in the account that creates the bot.

type description

string

param description

A description of the bot. It appears in lists to help you identify a particular bot.

type roleArn

string

param roleArn

[REQUIRED]

The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot.

type dataPrivacy

dict

param dataPrivacy

[REQUIRED]

Provides information on additional privacy protections Amazon Lex should use with the bot's data.

  • childDirected (boolean) -- [REQUIRED]

    For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children's Online Privacy Protection Act (COPPA) by specifying true or false in the childDirected field. By specifying true in the childDirected field, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying false in the childDirected field, you confirm that your use of Amazon Lex is not related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the childDirected field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the Amazon Lex FAQ .

type idleSessionTTLInSeconds

integer

param idleSessionTTLInSeconds

[REQUIRED]

The time, in seconds, that Amazon Lex should keep information about a user's conversation with the bot.

A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout.

You can specify between 60 (1 minute) and 86,400 (24 hours) seconds.

type botTags

dict

param botTags

A list of tags to add to the bot. You can only add tags when you create a bot. You can't use the UpdateBot operation to update tags. To update tags, use the TagResource operation.

  • (string) --

    • (string) --

type testBotAliasTags

dict

param testBotAliasTags

A list of tags to add to the test alias for a bot. You can only add tags when you create a bot. You can't use the UpdateAlias operation to update tags. To update tags on the test alias, use the TagResource operation.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botName': 'string',
    'description': 'string',
    'roleArn': 'string',
    'dataPrivacy': {
        'childDirected': True|False
    },
    'idleSessionTTLInSeconds': 123,
    'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning',
    'creationDateTime': datetime(2015, 1, 1),
    'botTags': {
        'string': 'string'
    },
    'testBotAliasTags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • botId (string) --

      A unique identifier for a particular bot. You use this to identify the bot when you call other Amazon Lex API operations.

    • botName (string) --

      The name specified for the bot.

    • description (string) --

      The description specified for the bot.

    • roleArn (string) --

      The IAM role specified for the bot.

    • dataPrivacy (dict) --

      The data privacy settings specified for the bot.

      • childDirected (boolean) --

        For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children's Online Privacy Protection Act (COPPA) by specifying true or false in the childDirected field. By specifying true in the childDirected field, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying false in the childDirected field, you confirm that your use of Amazon Lex is not related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the childDirected field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the Amazon Lex FAQ .

    • idleSessionTTLInSeconds (integer) --

      The session idle time specified for the bot.

    • botStatus (string) --

      Shows the current status of the bot. The bot is first in the Creating status. Once the bot is read for use, it changes to the Available status. After the bot is created, you can use the Draft version of the bot.

    • creationDateTime (datetime) --

      A timestamp indicating the date and time that the bot was created.

    • botTags (dict) --

      A list of tags associated with the bot.

      • (string) --

        • (string) --

    • testBotAliasTags (dict) --

      A list of tags associated with the test alias for the bot.

      • (string) --

        • (string) --

DescribeSlotType (new) Link ¶

Gets metadata information about a slot type.

See also: AWS API Documentation

Request Syntax

client.describe_slot_type(
    slotTypeId='string',
    botId='string',
    botVersion='string',
    localeId='string'
)
type slotTypeId

string

param slotTypeId

[REQUIRED]

The identifier of the slot type.

type botId

string

param botId

[REQUIRED]

The identifier of the bot associated with the slot type.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot associated with the slot type.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale of the slot type to describe. The string must match one of the supported locales. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

rtype

dict

returns

Response Syntax

{
    'slotTypeId': 'string',
    'slotTypeName': 'string',
    'description': 'string',
    'slotTypeValues': [
        {
            'sampleValue': {
                'value': 'string'
            },
            'synonyms': [
                {
                    'value': 'string'
                },
            ]
        },
    ],
    'valueSelectionSetting': {
        'resolutionStrategy': 'OriginalValue'|'TopResolution',
        'regexFilter': {
            'pattern': 'string'
        }
    },
    'parentSlotTypeSignature': 'string',
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'creationDateTime': datetime(2015, 1, 1),
    'lastUpdatedDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • slotTypeId (string) --

      The unique identifier for the slot type.

    • slotTypeName (string) --

      The name specified for the slot type.

    • description (string) --

      The description specified for the slot type.

    • slotTypeValues (list) --

      The values that the slot type can take. Includes any synonyms for the slot type values.

      • (dict) --

        Each slot type can have a set of values. Each SlotTypeValue represents a value that the slot type can take.

        • sampleValue (dict) --

          The value of the slot type entry.

          • value (string) --

            The value that can be used for a slot type.

        • synonyms (list) --

          Additional values releated to the slot type entry.

          • (dict) --

            Defines one of the values for a slot type.

            • value (string) --

              The value that can be used for a slot type.

    • valueSelectionSetting (dict) --

      The strategy that Amazon Lex uses to choose a value from a list of possible values.

      • resolutionStrategy (string) --

        Determines the slot resolution strategy that Amazon Lex uses to return slot type values. The field can be set to one of the following values:

        • OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.

        • TopResolution - If there is a resolution list for the slot, return the first value in the resolution list as the slot type value. If there is no resolution list, null is returned.

        If you don't specify the valueSelectionStrategy, the default is OriginalValue.

      • regexFilter (dict) --

        A regular expression used to validate the value of a slot.

        • pattern (string) --

          A regular expression used to validate the value of a slot.

          Use a standard regular expression. Amazon Lex supports the following characters in the regular expression:

          • A-Z, a-z

          • 0-9

          • Unicode characters ("u<Unicode>")

          Represent Unicode characters with four digits, for example "u0041" or "u005A".

          The following regular expression operators are not supported:

          • Infinite repeaters: *, +, or {x,} with no upper bound.

          • Wild card (.)

    • parentSlotTypeSignature (string) --

      The built in slot type used as a parent to this slot type.

    • botId (string) --

      The identifier of the bot associated with the slot type.

    • botVersion (string) --

      The version of the bot associated with the slot type.

    • localeId (string) --

      The language and locale specified for the slot type.

    • creationDateTime (datetime) --

      A timestamp of the date and time that the slot type was created.

    • lastUpdatedDateTime (datetime) --

      A timestamp of the date and time that the slot type was last updated.

ListIntents (new) Link ¶

Get a list of intents that meet the specified criteria.

See also: AWS API Documentation

Request Syntax

client.list_intents(
    botId='string',
    botVersion='string',
    localeId='string',
    sortBy={
        'attribute': 'IntentName'|'LastUpdatedDateTime',
        'order': 'Ascending'|'Descending'
    },
    filters=[
        {
            'name': 'IntentName',
            'values': [
                'string',
            ],
            'operator': 'CO'|'EQ'
        },
    ],
    maxResults=123,
    nextToken='string'
)
type botId

string

param botId

[REQUIRED]

The unique identifier of the bot that contains the intent.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot that contains the intent.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale of the intents to list. The string must match one of the supported locales. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

type sortBy

dict

param sortBy

Determines the sort order for the response from the ListIntents operation. You can choose to sort by the intent name or last updated date in either ascending or descending order.

  • attribute (string) -- [REQUIRED]

    The attribute to use to sort the list of intents.

  • order (string) -- [REQUIRED]

    The order to sort the list. You can choose ascending or descending.

type filters

list

param filters

Provides the specification of a filter used to limit the intents in the response to only those that match the filter specification. You can only specify one filter and only one string to filter on.

  • (dict) --

    Filters the response from the ListIntents operation.

    • name (string) -- [REQUIRED]

      The name of the field to use for the filter.

    • values (list) -- [REQUIRED]

      The value to use for the filter.

      • (string) --

    • operator (string) -- [REQUIRED]

      The operator to use for the filter. Specify EQ when the ListIntents operation should return only aliases that equal the specified value. Specify CO when the ListIntents operation should return aliases that contain the specified value.

type maxResults

integer

param maxResults

The maximum number of intents to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

type nextToken

string

param nextToken

If the response from the ListIntents operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'intentSummaries': [
        {
            'intentId': 'string',
            'intentName': 'string',
            'description': 'string',
            'parentIntentSignature': 'string',
            'inputContexts': [
                {
                    'name': 'string'
                },
            ],
            'outputContexts': [
                {
                    'name': 'string',
                    'timeToLiveInSeconds': 123,
                    'turnsToLive': 123
                },
            ],
            'lastUpdatedDateTime': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • botId (string) --

      The identifier of the bot that contains the intent.

    • botVersion (string) --

      The version of the bot that contains the intent.

    • localeId (string) --

      The language and locale of the intents in the list.

    • intentSummaries (list) --

      Summary information for the intents that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more intents available, the nextToken field contains a token to get the next page of results.

      • (dict) --

        Summary information about an intent returned by the ListIntents operation.

        • intentId (string) --

          The unique identifier assigned to the intent. Use this ID to get detailed information about the intent with the DescribeIntent operation.

        • intentName (string) --

          The name of the intent.

        • description (string) --

          The description of the intent.

        • parentIntentSignature (string) --

          If this intent is derived from a built-in intent, the name of the parent intent.

        • inputContexts (list) --

          The input contexts that must be active for this intent to be considered for recognition.

          • (dict) --

            The name of a context that must be active for an intent to be selected by Amazon Lex.

            • name (string) --

              The name of the context.

        • outputContexts (list) --

          The output contexts that are activated when this intent is fulfilled.

          • (dict) --

            Describes a session context that is activated when an intent is fulfilled.

            • name (string) --

              The name of the output context.

            • timeToLiveInSeconds (integer) --

              The amount of time, in seconds, that the output context should remain active. The time is figured from the first time the context is sent to the user.

            • turnsToLive (integer) --

              The number of conversation turns that the output context should remain active. The number of turns is counted from the first time that the context is sent to the user.

        • lastUpdatedDateTime (datetime) --

          The timestamp of the date and time that the intent was last updated.

    • nextToken (string) --

      A token that indicates whether there are more results to return in a response to the ListIntents operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListIntents operation request to get the next page of results.

UpdateSlotType (new) Link ¶

Updates the configuration of an existing slot type.

See also: AWS API Documentation

Request Syntax

client.update_slot_type(
    slotTypeId='string',
    slotTypeName='string',
    description='string',
    slotTypeValues=[
        {
            'sampleValue': {
                'value': 'string'
            },
            'synonyms': [
                {
                    'value': 'string'
                },
            ]
        },
    ],
    valueSelectionSetting={
        'resolutionStrategy': 'OriginalValue'|'TopResolution',
        'regexFilter': {
            'pattern': 'string'
        }
    },
    parentSlotTypeSignature='string',
    botId='string',
    botVersion='string',
    localeId='string'
)
type slotTypeId

string

param slotTypeId

[REQUIRED]

The unique identifier of the slot type to update.

type slotTypeName

string

param slotTypeName

[REQUIRED]

The new name of the slot type.

type description

string

param description

The new description of the slot type.

type slotTypeValues

list

param slotTypeValues

A new list of values and their optional synonyms that define the values that the slot type can take.

  • (dict) --

    Each slot type can have a set of values. Each SlotTypeValue represents a value that the slot type can take.

    • sampleValue (dict) --

      The value of the slot type entry.

      • value (string) -- [REQUIRED]

        The value that can be used for a slot type.

    • synonyms (list) --

      Additional values releated to the slot type entry.

      • (dict) --

        Defines one of the values for a slot type.

        • value (string) -- [REQUIRED]

          The value that can be used for a slot type.

type valueSelectionSetting

dict

param valueSelectionSetting

[REQUIRED]

The strategy that Amazon Lex should use when deciding on a value from the list of slot type values.

  • resolutionStrategy (string) -- [REQUIRED]

    Determines the slot resolution strategy that Amazon Lex uses to return slot type values. The field can be set to one of the following values:

    • OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.

    • TopResolution - If there is a resolution list for the slot, return the first value in the resolution list as the slot type value. If there is no resolution list, null is returned.

    If you don't specify the valueSelectionStrategy, the default is OriginalValue.

  • regexFilter (dict) --

    A regular expression used to validate the value of a slot.

    • pattern (string) -- [REQUIRED]

      A regular expression used to validate the value of a slot.

      Use a standard regular expression. Amazon Lex supports the following characters in the regular expression:

      • A-Z, a-z

      • 0-9

      • Unicode characters ("u<Unicode>")

      Represent Unicode characters with four digits, for example "u0041" or "u005A".

      The following regular expression operators are not supported:

      • Infinite repeaters: *, +, or {x,} with no upper bound.

      • Wild card (.)

type parentSlotTypeSignature

string

param parentSlotTypeSignature

The new built-in slot type that should be used as the parent of this slot type.

type botId

string

param botId

[REQUIRED]

The identifier of the bot that contains the slot type.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot that contains the slot type. Must be DRAFT .

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale that contains the slot type. The string must match one of the supported locales. For more information, see https://docs.aws.amazon.com/lex/latest/dg/supported-locales.html .

rtype

dict

returns

Response Syntax

{
    'slotTypeId': 'string',
    'slotTypeName': 'string',
    'description': 'string',
    'slotTypeValues': [
        {
            'sampleValue': {
                'value': 'string'
            },
            'synonyms': [
                {
                    'value': 'string'
                },
            ]
        },
    ],
    'valueSelectionSetting': {
        'resolutionStrategy': 'OriginalValue'|'TopResolution',
        'regexFilter': {
            'pattern': 'string'
        }
    },
    'parentSlotTypeSignature': 'string',
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'creationDateTime': datetime(2015, 1, 1),
    'lastUpdatedDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • slotTypeId (string) --

      The unique identifier of the updated slot type.

    • slotTypeName (string) --

      The updated name of the slot type.

    • description (string) --

      The updated description of the slot type.

    • slotTypeValues (list) --

      The updated values that the slot type provides.

      • (dict) --

        Each slot type can have a set of values. Each SlotTypeValue represents a value that the slot type can take.

        • sampleValue (dict) --

          The value of the slot type entry.

          • value (string) --

            The value that can be used for a slot type.

        • synonyms (list) --

          Additional values releated to the slot type entry.

          • (dict) --

            Defines one of the values for a slot type.

            • value (string) --

              The value that can be used for a slot type.

    • valueSelectionSetting (dict) --

      The updated strategy that Amazon Lex uses to determine which value to select from the slot type.

      • resolutionStrategy (string) --

        Determines the slot resolution strategy that Amazon Lex uses to return slot type values. The field can be set to one of the following values:

        • OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.

        • TopResolution - If there is a resolution list for the slot, return the first value in the resolution list as the slot type value. If there is no resolution list, null is returned.

        If you don't specify the valueSelectionStrategy, the default is OriginalValue.

      • regexFilter (dict) --

        A regular expression used to validate the value of a slot.

        • pattern (string) --

          A regular expression used to validate the value of a slot.

          Use a standard regular expression. Amazon Lex supports the following characters in the regular expression:

          • A-Z, a-z

          • 0-9

          • Unicode characters ("u<Unicode>")

          Represent Unicode characters with four digits, for example "u0041" or "u005A".

          The following regular expression operators are not supported:

          • Infinite repeaters: *, +, or {x,} with no upper bound.

          • Wild card (.)

    • parentSlotTypeSignature (string) --

      The updated signature of the built-in slot type that is the parent of this slot type.

    • botId (string) --

      The identifier of the bot that contains the slot type.

    • botVersion (string) --

      The version of the bot that contains the slot type. This is always DRAFT .

    • localeId (string) --

      The language and locale of the updated slot type.

    • creationDateTime (datetime) --

      The timestamp of the date and time that the slot type was created.

    • lastUpdatedDateTime (datetime) --

      A timestamp of the date and time that the slot type was last updated.