Amazon Lex Model Building V2

2021/05/18 - Amazon Lex Model Building V2 - 10 new15 updated api methods

DeleteImport (new) Link ¶

Removes a previous import and the associated file stored in an S3 bucket.

See also: AWS API Documentation

Request Syntax

client.delete_import(
    importId='string'
)
type importId:

string

param importId:

[REQUIRED]

The unique identifier of the import to delete.

rtype:

dict

returns:

Response Syntax

{
    'importId': 'string',
    'importStatus': 'InProgress'|'Completed'|'Failed'|'Deleting'
}

Response Structure

  • (dict) --

    • importId (string) --

      The unique identifier of the deleted import.

    • importStatus (string) --

      The current status of the deletion. When the deletion is complete, the import will no longer be returned by the operation and calls to the with the import identifier will fail.

UpdateExport (new) Link ¶

Updates the password used to encrypt an export zip archive.

See also: AWS API Documentation

Request Syntax

client.update_export(
    exportId='string',
    filePassword='string'
)
type exportId:

string

param exportId:

[REQUIRED]

The unique identifier Amazon Lex assigned to the export.

type filePassword:

string

param filePassword:

The new password to use to encrypt the export zip archive.

rtype:

dict

returns:

Response Syntax

{
    'exportId': 'string',
    'resourceSpecification': {
        'botExportSpecification': {
            'botId': 'string',
            'botVersion': 'string'
        },
        'botLocaleExportSpecification': {
            'botId': 'string',
            'botVersion': 'string',
            'localeId': 'string'
        }
    },
    'fileFormat': 'LexJson',
    'exportStatus': 'InProgress'|'Completed'|'Failed'|'Deleting',
    'creationDateTime': datetime(2015, 1, 1),
    'lastUpdatedDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • exportId (string) --

      The unique identifier Amazon Lex assigned to the export.

    • resourceSpecification (dict) --

      A description of the type of resource that was exported, either a bot or a bot locale.

      • botExportSpecification (dict) --

        Parameters for exporting a bot.

        • botId (string) --

          The identifier of the bot assigned by Amazon Lex.

        • botVersion (string) --

          The version of the bot that was exported. This will be either DRAFT or the version number.

      • botLocaleExportSpecification (dict) --

        Parameters for exporting a bot locale.

        • botId (string) --

          The identifier of the bot to create the locale for.

        • botVersion (string) --

          The version of the bot to export.

        • localeId (string) --

          The identifier of the language and locale to export. The string must match one of the locales in the bot.

    • fileFormat (string) --

      The file format used for the files that define the resource.

    • exportStatus (string) --

      The status of the export. When the status is Completed the export archive is available for download.

    • creationDateTime (datetime) --

      The date and time that the export was created.

    • lastUpdatedDateTime (datetime) --

      The date and time that the export was last updated.

CreateUploadUrl (new) Link ¶

Gets a pre-signed S3 write URL that you use to upload the zip archive when importing a bot or a bot locale.

See also: AWS API Documentation

Request Syntax

client.create_upload_url()
rtype:

dict

returns:

Response Syntax

{
    'importId': 'string',
    'uploadUrl': 'string'
}

Response Structure

  • (dict) --

    • importId (string) --

      An identifier for a unique import job. Use it when you call the operation.

    • uploadUrl (string) --

      A pre-signed S3 write URL. Upload the zip archive file that contains the definition of your bot or bot locale.

DescribeExport (new) Link ¶

Gets information about a specific export.

See also: AWS API Documentation

Request Syntax

client.describe_export(
    exportId='string'
)
type exportId:

string

param exportId:

[REQUIRED]

The unique identifier of the export to describe.

rtype:

dict

returns:

Response Syntax

{
    'exportId': 'string',
    'resourceSpecification': {
        'botExportSpecification': {
            'botId': 'string',
            'botVersion': 'string'
        },
        'botLocaleExportSpecification': {
            'botId': 'string',
            'botVersion': 'string',
            'localeId': 'string'
        }
    },
    'fileFormat': 'LexJson',
    'exportStatus': 'InProgress'|'Completed'|'Failed'|'Deleting',
    'failureReasons': [
        'string',
    ],
    'downloadUrl': 'string',
    'creationDateTime': datetime(2015, 1, 1),
    'lastUpdatedDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • exportId (string) --

      The unique identifier of the described export.

    • resourceSpecification (dict) --

      The bot, bot ID, and optional locale ID of the exported bot or bot locale.

      • botExportSpecification (dict) --

        Parameters for exporting a bot.

        • botId (string) --

          The identifier of the bot assigned by Amazon Lex.

        • botVersion (string) --

          The version of the bot that was exported. This will be either DRAFT or the version number.

      • botLocaleExportSpecification (dict) --

        Parameters for exporting a bot locale.

        • botId (string) --

          The identifier of the bot to create the locale for.

        • botVersion (string) --

          The version of the bot to export.

        • localeId (string) --

          The identifier of the language and locale to export. The string must match one of the locales in the bot.

    • fileFormat (string) --

      The file format used in the files that describe the bot or bot locale.

    • exportStatus (string) --

      The status of the export. When the status is Complete the export archive file is available for download.

    • failureReasons (list) --

      If the exportStatus is failed, contains one or more reasons why the export could not be completed.

      • (string) --

    • downloadUrl (string) --

      A pre-signed S3 URL that points to the bot or bot locale archive. The URL is only available for 5 minutes after calling the DescribeExport operation.

    • creationDateTime (datetime) --

      The date and time that the export was created.

    • lastUpdatedDateTime (datetime) --

      The last date and time that the export was updated.

DeleteExport (new) Link ¶

Removes a previous export and the associated files stored in an S3 bucket.

See also: AWS API Documentation

Request Syntax

client.delete_export(
    exportId='string'
)
type exportId:

string

param exportId:

[REQUIRED]

The unique identifier of the export to delete.

rtype:

dict

returns:

Response Syntax

{
    'exportId': 'string',
    'exportStatus': 'InProgress'|'Completed'|'Failed'|'Deleting'
}

Response Structure

  • (dict) --

    • exportId (string) --

      The unique identifier of the deleted export.

    • exportStatus (string) --

      The current status of the deletion. When the deletion is complete, the export will no longer be returned by the operation and calls to the with the export identifier will fail.

CreateExport (new) Link ¶

Creates a zip archive containing the contents of a bot or a bot locale. The archive contains a directory structure that contains JSON files that define the bot.

You can create an archive that contains the complete definition of a bot, or you can specify that the archive contain only the definition of a single bot locale.

For more information about exporting bots, and about the structure of the export archive, see Importing and exporting bots

See also: AWS API Documentation

Request Syntax

client.create_export(
    resourceSpecification={
        'botExportSpecification': {
            'botId': 'string',
            'botVersion': 'string'
        },
        'botLocaleExportSpecification': {
            'botId': 'string',
            'botVersion': 'string',
            'localeId': 'string'
        }
    },
    fileFormat='LexJson',
    filePassword='string'
)
type resourceSpecification:

dict

param resourceSpecification:

[REQUIRED]

Specifies the type of resource to export, either a bot or a bot locale. You can only specify one type of resource to export.

  • botExportSpecification (dict) --

    Parameters for exporting a bot.

    • botId (string) -- [REQUIRED]

      The identifier of the bot assigned by Amazon Lex.

    • botVersion (string) -- [REQUIRED]

      The version of the bot that was exported. This will be either DRAFT or the version number.

  • botLocaleExportSpecification (dict) --

    Parameters for exporting a bot locale.

    • botId (string) -- [REQUIRED]

      The identifier of the bot to create the locale for.

    • botVersion (string) -- [REQUIRED]

      The version of the bot to export.

    • localeId (string) -- [REQUIRED]

      The identifier of the language and locale to export. The string must match one of the locales in the bot.

type fileFormat:

string

param fileFormat:

[REQUIRED]

The file format of the bot or bot locale definition files.

type filePassword:

string

param filePassword:

An password to use to encrypt the exported archive. Using a password is optional, but you should encrypt the archive to protect the data in transit between Amazon Lex and your local computer.

rtype:

dict

returns:

Response Syntax

{
    'exportId': 'string',
    'resourceSpecification': {
        'botExportSpecification': {
            'botId': 'string',
            'botVersion': 'string'
        },
        'botLocaleExportSpecification': {
            'botId': 'string',
            'botVersion': 'string',
            'localeId': 'string'
        }
    },
    'fileFormat': 'LexJson',
    'exportStatus': 'InProgress'|'Completed'|'Failed'|'Deleting',
    'creationDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • exportId (string) --

      An identifier for a specific request to create an export.

    • resourceSpecification (dict) --

      A description of the type of resource that was exported, either a bot or a bot locale.

      • botExportSpecification (dict) --

        Parameters for exporting a bot.

        • botId (string) --

          The identifier of the bot assigned by Amazon Lex.

        • botVersion (string) --

          The version of the bot that was exported. This will be either DRAFT or the version number.

      • botLocaleExportSpecification (dict) --

        Parameters for exporting a bot locale.

        • botId (string) --

          The identifier of the bot to create the locale for.

        • botVersion (string) --

          The version of the bot to export.

        • localeId (string) --

          The identifier of the language and locale to export. The string must match one of the locales in the bot.

    • fileFormat (string) --

      The file format used for the bot or bot locale definition files.

    • exportStatus (string) --

      The status of the export. When the status is Completed, you can use the operation to get the pre-signed S3 URL link to your exported bot or bot locale.

    • creationDateTime (datetime) --

      The date and time that the request to export a bot was created.

ListExports (new) Link ¶

Lists the exports for a bot or bot locale. Exports are kept in the list for 7 days.

See also: AWS API Documentation

Request Syntax

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

string

param botId:

The unique identifier that Amazon Lex assigned to the bot.

type botVersion:

string

param botVersion:

The version of the bot to list exports for.

type sortBy:

dict

param sortBy:

Determines the field that the list of exports is sorted by. You can sort by the LastUpdatedDateTime field in ascending or descending order.

  • attribute (string) -- [REQUIRED]

    The export field to use for sorting.

  • order (string) -- [REQUIRED]

    The order to sort the list.

type filters:

list

param filters:

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

  • (dict) --

    Filtes the response form the operation

    • name (string) -- [REQUIRED]

      The name of the field to use for filtering.

    • values (list) -- [REQUIRED]

      The values to use to fileter the response.

      • (string) --

    • operator (string) -- [REQUIRED]

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

type maxResults:

integer

param maxResults:

The maximum number of exports 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 ListExports operation contans more results that 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',
    'exportSummaries': [
        {
            'exportId': 'string',
            'resourceSpecification': {
                'botExportSpecification': {
                    'botId': 'string',
                    'botVersion': 'string'
                },
                'botLocaleExportSpecification': {
                    'botId': 'string',
                    'botVersion': 'string',
                    'localeId': 'string'
                }
            },
            'fileFormat': 'LexJson',
            'exportStatus': 'InProgress'|'Completed'|'Failed'|'Deleting',
            'creationDateTime': datetime(2015, 1, 1),
            'lastUpdatedDateTime': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • botId (string) --

      The unique identifier assigned to the bot by Amazon Lex.

    • botVersion (string) --

      The version of the bot that was exported.

    • exportSummaries (list) --

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

      • (dict) --

        Provides summary information about an export in an export list.

        • exportId (string) --

          The unique identifier that Amazon Lex assigned to the export.

        • resourceSpecification (dict) --

          Information about the bot or bot locale that was exported.

          • botExportSpecification (dict) --

            Parameters for exporting a bot.

            • botId (string) --

              The identifier of the bot assigned by Amazon Lex.

            • botVersion (string) --

              The version of the bot that was exported. This will be either DRAFT or the version number.

          • botLocaleExportSpecification (dict) --

            Parameters for exporting a bot locale.

            • botId (string) --

              The identifier of the bot to create the locale for.

            • botVersion (string) --

              The version of the bot to export.

            • localeId (string) --

              The identifier of the language and locale to export. The string must match one of the locales in the bot.

        • fileFormat (string) --

          The file format used in the export files.

        • exportStatus (string) --

          The status of the export. When the status is Completed the export is ready to download.

        • creationDateTime (datetime) --

          The date and time that the export was created.

        • lastUpdatedDateTime (datetime) --

          The date and time that the export was last updated.

    • nextToken (string) --

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

StartImport (new) Link ¶

Starts importing a bot or bot locale from a zip archive that you uploaded to an S3 bucket.

See also: AWS API Documentation

Request Syntax

client.start_import(
    importId='string',
    resourceSpecification={
        'botImportSpecification': {
            'botName': 'string',
            'roleArn': 'string',
            'dataPrivacy': {
                'childDirected': True|False
            },
            'idleSessionTTLInSeconds': 123,
            'botTags': {
                'string': 'string'
            },
            'testBotAliasTags': {
                'string': 'string'
            }
        },
        'botLocaleImportSpecification': {
            'botId': 'string',
            'botVersion': 'string',
            'localeId': 'string',
            'nluIntentConfidenceThreshold': 123.0,
            'voiceSettings': {
                'voiceId': 'string'
            }
        }
    },
    mergeStrategy='Overwrite'|'FailOnConflict',
    filePassword='string'
)
type importId:

string

param importId:

[REQUIRED]

The unique identifier for the import. It is included in the response from the operation.

type resourceSpecification:

dict

param resourceSpecification:

[REQUIRED]

Parameters for creating the bot or bot locale.

  • botImportSpecification (dict) --

    Parameters for importing a bot.

    • botName (string) -- [REQUIRED]

      The name that Amazon Lex should use for the bot.

    • roleArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the IAM role used to build and run the bot.

    • dataPrivacy (dict) -- [REQUIRED]

      By default, data stored by Amazon Lex is encrypted. The DataPrivacy structure provides settings that determine how Amazon Lex handles special cases of securing the data for your bot.

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

    • idleSessionTTLInSeconds (integer) --

      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.

    • botTags (dict) --

      A list of tags to add to the bot. You can only add tags when you import a bot. You can't use the UpdateBot operation to update tags. To update tags, use the TagResource operation.

      • (string) --

        • (string) --

    • testBotAliasTags (dict) --

      A list of tags to add to the test alias for a bot. You can only add tags when you import 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) --

  • botLocaleImportSpecification (dict) --

    Parameters for importing a bot locale.

    • botId (string) -- [REQUIRED]

      The identifier of the bot to import the locale to.

    • botVersion (string) -- [REQUIRED]

      The version of the bot to import the locale to. This can only be the DRAFT version of the bot.

    • localeId (string) -- [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 Supported languages.

    • nluIntentConfidenceThreshold (float) --

      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

    • voiceSettings (dict) --

      Defines settings for using an Amazon Polly voice to communicate with a user.

      • voiceId (string) -- [REQUIRED]

        The identifier of the Amazon Polly voice to use.

type mergeStrategy:

string

param mergeStrategy:

[REQUIRED]

The strategy to use when there is a name conflict between the imported resource and an existing resource. When the merge strategy is FailOnConflict existing resources are not overwritten and the import fails.

type filePassword:

string

param filePassword:

The password used to encrypt the zip archive that contains the bot or bot locale definition. You should always encrypt the zip archive to protect it during transit between your site and Amazon Lex.

rtype:

dict

returns:

Response Syntax

{
    'importId': 'string',
    'resourceSpecification': {
        'botImportSpecification': {
            'botName': 'string',
            'roleArn': 'string',
            'dataPrivacy': {
                'childDirected': True|False
            },
            'idleSessionTTLInSeconds': 123,
            'botTags': {
                'string': 'string'
            },
            'testBotAliasTags': {
                'string': 'string'
            }
        },
        'botLocaleImportSpecification': {
            'botId': 'string',
            'botVersion': 'string',
            'localeId': 'string',
            'nluIntentConfidenceThreshold': 123.0,
            'voiceSettings': {
                'voiceId': 'string'
            }
        }
    },
    'mergeStrategy': 'Overwrite'|'FailOnConflict',
    'importStatus': 'InProgress'|'Completed'|'Failed'|'Deleting',
    'creationDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • importId (string) --

      A unique identifier for the import.

    • resourceSpecification (dict) --

      The parameters used when importing the bot or bot locale.

      • botImportSpecification (dict) --

        Parameters for importing a bot.

        • botName (string) --

          The name that Amazon Lex should use for the bot.

        • roleArn (string) --

          The Amazon Resource Name (ARN) of the IAM role used to build and run the bot.

        • dataPrivacy (dict) --

          By default, data stored by Amazon Lex is encrypted. The DataPrivacy structure provides settings that determine how Amazon Lex handles special cases of securing the data for your 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 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.

        • botTags (dict) --

          A list of tags to add to the bot. You can only add tags when you import a bot. You can't use the UpdateBot operation to update tags. To update tags, use the TagResource operation.

          • (string) --

            • (string) --

        • testBotAliasTags (dict) --

          A list of tags to add to the test alias for a bot. You can only add tags when you import 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) --

      • botLocaleImportSpecification (dict) --

        Parameters for importing a bot locale.

        • botId (string) --

          The identifier of the bot to import the locale to.

        • botVersion (string) --

          The version of the bot to import the locale to. This can only be the DRAFT version of the bot.

        • localeId (string) --

          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 Supported languages.

        • nluIntentConfidenceThreshold (float) --

          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

        • voiceSettings (dict) --

          Defines settings for using an Amazon Polly voice to communicate with a user.

          • voiceId (string) --

            The identifier of the Amazon Polly voice to use.

    • mergeStrategy (string) --

      The strategy used when there was a name conflict between the imported resource and an existing resource. When the merge strategy is FailOnConflict existing resources are not overwritten and the import fails.

    • importStatus (string) --

      The current status of the import. When the status is Complete the bot or bot alias is ready to use.

    • creationDateTime (datetime) --

      The date and time that the import request was created.

DescribeImport (new) Link ¶

Gets information about a specific import.

See also: AWS API Documentation

Request Syntax

client.describe_import(
    importId='string'
)
type importId:

string

param importId:

[REQUIRED]

The unique identifier of the import to describe.

rtype:

dict

returns:

Response Syntax

{
    'importId': 'string',
    'resourceSpecification': {
        'botImportSpecification': {
            'botName': 'string',
            'roleArn': 'string',
            'dataPrivacy': {
                'childDirected': True|False
            },
            'idleSessionTTLInSeconds': 123,
            'botTags': {
                'string': 'string'
            },
            'testBotAliasTags': {
                'string': 'string'
            }
        },
        'botLocaleImportSpecification': {
            'botId': 'string',
            'botVersion': 'string',
            'localeId': 'string',
            'nluIntentConfidenceThreshold': 123.0,
            'voiceSettings': {
                'voiceId': 'string'
            }
        }
    },
    'importedResourceId': 'string',
    'importedResourceName': 'string',
    'mergeStrategy': 'Overwrite'|'FailOnConflict',
    'importStatus': 'InProgress'|'Completed'|'Failed'|'Deleting',
    'failureReasons': [
        'string',
    ],
    'creationDateTime': datetime(2015, 1, 1),
    'lastUpdatedDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • importId (string) --

      The unique identifier of the described import.

    • resourceSpecification (dict) --

      The specifications of the imported bot or bot locale.

      • botImportSpecification (dict) --

        Parameters for importing a bot.

        • botName (string) --

          The name that Amazon Lex should use for the bot.

        • roleArn (string) --

          The Amazon Resource Name (ARN) of the IAM role used to build and run the bot.

        • dataPrivacy (dict) --

          By default, data stored by Amazon Lex is encrypted. The DataPrivacy structure provides settings that determine how Amazon Lex handles special cases of securing the data for your 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 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.

        • botTags (dict) --

          A list of tags to add to the bot. You can only add tags when you import a bot. You can't use the UpdateBot operation to update tags. To update tags, use the TagResource operation.

          • (string) --

            • (string) --

        • testBotAliasTags (dict) --

          A list of tags to add to the test alias for a bot. You can only add tags when you import 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) --

      • botLocaleImportSpecification (dict) --

        Parameters for importing a bot locale.

        • botId (string) --

          The identifier of the bot to import the locale to.

        • botVersion (string) --

          The version of the bot to import the locale to. This can only be the DRAFT version of the bot.

        • localeId (string) --

          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 Supported languages.

        • nluIntentConfidenceThreshold (float) --

          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

        • voiceSettings (dict) --

          Defines settings for using an Amazon Polly voice to communicate with a user.

          • voiceId (string) --

            The identifier of the Amazon Polly voice to use.

    • importedResourceId (string) --

      The unique identifier that Amazon Lex assigned to the resource created by the import.

    • importedResourceName (string) --

      The name of the imported resource.

    • mergeStrategy (string) --

      The strategy used when there was a name conflict between the imported resource and an existing resource. When the merge strategy is FailOnConflict existing resources are not overwritten and the import fails.

    • importStatus (string) --

      The status of the import process. When the status is Completed the resource is imported and ready for use.

    • failureReasons (list) --

      If the importStatus field is Failed, this provides one or more reasons for the failture.

      • (string) --

    • creationDateTime (datetime) --

      The date and time that the import was created.

    • lastUpdatedDateTime (datetime) --

      The date and time that the import was last updated.

ListImports (new) Link ¶

Lists the imports for a bot or bot locale. Imports are kept in the list for 7 days.

See also: AWS API Documentation

Request Syntax

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

string

param botId:

The unique identifier that Amazon Lex assigned to the bot.

type botVersion:

string

param botVersion:

The version of the bot to list imports for.

type sortBy:

dict

param sortBy:

Determines the field that the list of imports is sorted by. You can sort by the LastUpdatedDateTime field in ascending or descending order.

  • attribute (string) -- [REQUIRED]

    The export field to use for sorting.

  • order (string) -- [REQUIRED]

    The order to sort the list.

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 response from the operation.

    • name (string) -- [REQUIRED]

      The name of the field to use for filtering.

    • values (list) -- [REQUIRED]

      The values to use to filter the response.

      • (string) --

    • operator (string) -- [REQUIRED]

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

type maxResults:

integer

param maxResults:

The maximum number of imports 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 ListImports 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',
    'importSummaries': [
        {
            'importId': 'string',
            'importedResourceId': 'string',
            'importedResourceName': 'string',
            'importStatus': 'InProgress'|'Completed'|'Failed'|'Deleting',
            'mergeStrategy': 'Overwrite'|'FailOnConflict',
            'creationDateTime': datetime(2015, 1, 1),
            'lastUpdatedDateTime': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • botId (string) --

      The unique identifier assigned by Amazon Lex to the bot.

    • botVersion (string) --

      The version of the bot that was imported. It will always be DRAFT.

    • importSummaries (list) --

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

      • (dict) --

        Provides summary information about an import in an import list.

        • importId (string) --

          The unique identifier that Amazon Lex assigned to the import.

        • importedResourceId (string) --

          The unique identifier that Amazon Lex assigned to the imported resource.

        • importedResourceName (string) --

          The name that you gave the imported resource.

        • importStatus (string) --

          The status of the resource. When the status is Completed the resource is ready to build.

        • mergeStrategy (string) --

          The strategy used to merge existing bot or bot locale definitions with the imported definition.

        • creationDateTime (datetime) --

          The date and time that the import was created.

        • lastUpdatedDateTime (datetime) --

          The date and time that the import was last updated.

    • nextToken (string) --

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

BuildBotLocale (updated) Link ¶
Changes (response)
{'botLocaleStatus': {'Importing'}}

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 Supported languages.

rtype:

dict

returns:

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'botLocaleStatus': 'Creating'|'Building'|'Built'|'ReadyExpressTesting'|'Failed'|'Deleting'|'NotBuilt'|'Importing',
    '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.

CreateBot (updated) Link ¶
Changes (response)
{'botStatus': {'Importing'}}

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'|'Importing',
    '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) --

CreateBotLocale (updated) Link ¶
Changes (response)
{'botLocaleStatus': {'Importing'}}

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 Supported languages.

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'|'Importing',
    '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.

CreateBotVersion (updated) Link ¶
Changes (response)
{'botStatus': {'Importing'}}

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'|'Importing',
    '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.

DeleteBot (updated) Link ¶
Changes (response)
{'botStatus': {'Importing'}}

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'|'Importing'
}

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.

DeleteBotLocale (updated) Link ¶
Changes (response)
{'botLocaleStatus': {'Importing'}}

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 Supported languages.

rtype:

dict

returns:

Response Syntax

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

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.

DeleteBotVersion (updated) Link ¶
Changes (response)
{'botStatus': {'Importing'}}

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'|'Importing'
}

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.

DescribeBot (updated) Link ¶
Changes (response)
{'botStatus': {'Importing'}}

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'|'Importing',
    '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.

DescribeBotLocale (updated) Link ¶
Changes (response)
{'botLocaleStatus': {'Importing'}}

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 Supported languages.

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'|'Importing',
    '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.

DescribeBotVersion (updated) Link ¶
Changes (response)
{'botStatus': {'Importing'}}

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'|'Importing',
    '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.

ListBotLocales (updated) Link ¶
Changes (response)
{'botLocaleSummaries': {'botLocaleStatus': {'Importing'}}}

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'|'Importing',
            '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.

ListBotVersions (updated) Link ¶
Changes (response)
{'botVersionSummaries': {'botStatus': {'Importing'}}}

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'|'Importing',
            '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.

ListBots (updated) Link ¶
Changes (response)
{'botSummaries': {'botStatus': {'Importing'}}}

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'|'Importing',
            '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.

UpdateBot (updated) Link ¶
Changes (response)
{'botStatus': {'Importing'}}

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'|'Importing',
    '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.

UpdateBotLocale (updated) Link ¶
Changes (response)
{'botLocaleStatus': {'Importing'}}

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 Supported languages.

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'|'Importing',
    '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.