Amazon Lex Model Building V2

2021/12/01 - Amazon Lex Model Building V2 - 6 new 9 updated api methods

Changes  This release introduces a new feature, Automated Chatbot Designer, that helps customers automatically create a bot design from existing conversation transcripts. The feature uses machine learning to discover most common intents and the information needed to fulfill them.

ListRecommendedIntents (new) Link ¶

Gets a list of recommended intents provided by the bot recommendation that you can use in your bot.

See also: AWS API Documentation

Request Syntax

client.list_recommended_intents(
    botId='string',
    botVersion='string',
    localeId='string',
    botRecommendationId='string',
    nextToken='string',
    maxResults=123
)
type botId

string

param botId

[REQUIRED]

The unique identifier of the bot associated with the recommended intents.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot that contains the recommended intents.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale of the recommended intents.

type botRecommendationId

string

param botRecommendationId

[REQUIRED]

The identifier of the bot recommendation that contains the recommended intents.

type nextToken

string

param nextToken

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

type maxResults

integer

param maxResults

The maximum number of bot recommendations 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.

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'botRecommendationId': 'string',
    'summaryList': [
        {
            'intentId': 'string',
            'intentName': 'string',
            'sampleUtterancesCount': 123
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • botId (string) --

      The unique identifier of the bot associated with the recommended intent.

    • botVersion (string) --

      The version of the bot that contains the intent.

    • localeId (string) --

      The identifier of the language and locale of the intents to list. The string must match one of the supported locales. For more information, see Supported languages .

    • botRecommendationId (string) --

      The identifier of the bot recommendation that contains the recommended intent.

    • summaryList (list) --

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

      • (dict) --

        An object that contains a summary of a recommended intent.

        • intentId (string) --

          The unique identifier of a recommended intent associated with the bot recommendation.

        • intentName (string) --

          The name of a recommended intent associated with the bot recommendation.

        • sampleUtterancesCount (integer) --

          The count of sample utterances of a recommended intent that is associated with a bot recommendation.

    • nextToken (string) --

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

DescribeBotRecommendation (new) Link ¶

Provides metadata information about a bot recommendation. This information will enable you to get a description on the request inputs, to download associated transcripts after processing is complete, and to download intents and slot-types generated by the bot recommendation.

See also: AWS API Documentation

Request Syntax

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

string

param botId

[REQUIRED]

The unique identifier of the bot associated with the bot recommendation.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot associated with the bot recommendation.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale of the bot recommendation to describe. The string must match one of the supported locales. For more information, see Supported languages .

type botRecommendationId

string

param botRecommendationId

[REQUIRED]

The identifier of the bot recommendation to describe.

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'botRecommendationStatus': 'Processing'|'Deleting'|'Deleted'|'Downloading'|'Updating'|'Available'|'Failed',
    'botRecommendationId': 'string',
    'failureReasons': [
        'string',
    ],
    'creationDateTime': datetime(2015, 1, 1),
    'lastUpdatedDateTime': datetime(2015, 1, 1),
    'transcriptSourceSetting': {
        's3BucketTranscriptSource': {
            's3BucketName': 'string',
            'pathFormat': {
                'objectPrefixes': [
                    'string',
                ]
            },
            'transcriptFormat': 'Lex',
            'transcriptFilter': {
                'lexTranscriptFilter': {
                    'dateRangeFilter': {
                        'startDateTime': datetime(2015, 1, 1),
                        'endDateTime': datetime(2015, 1, 1)
                    }
                }
            },
            'kmsKeyArn': 'string'
        }
    },
    'encryptionSetting': {
        'kmsKeyArn': 'string',
        'botLocaleExportPassword': 'string',
        'associatedTranscriptsPassword': 'string'
    },
    'botRecommendationResults': {
        'botLocaleExportUrl': 'string',
        'associatedTranscriptsUrl': 'string',
        'statistics': {
            'intents': {
                'discoveredIntentCount': 123
            },
            'slotTypes': {
                'discoveredSlotTypeCount': 123
            }
        }
    }
}

Response Structure

  • (dict) --

    • botId (string) --

      The identifier of the bot associated with the bot recommendation.

    • botVersion (string) --

      The version of the bot associated with the bot recommendation.

    • localeId (string) --

      The identifier of the language and locale of the bot recommendation to describe.

    • botRecommendationStatus (string) --

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

    • botRecommendationId (string) --

      The identifier of the bot recommendation being described.

    • failureReasons (list) --

      If botRecommendationStatus is Failed, Amazon Lex explains why.

      • (string) --

    • creationDateTime (datetime) --

      The date and time that the bot recommendation was created.

    • lastUpdatedDateTime (datetime) --

      The date and time that the bot recommendation was last updated.

    • transcriptSourceSetting (dict) --

      The object representing the Amazon S3 bucket containing the transcript, as well as the associated metadata.

      • s3BucketTranscriptSource (dict) --

        Indicates the setting of the Amazon S3 bucket where the transcript is stored.

        • s3BucketName (string) --

          The name of the bucket containing the transcript and the associated metadata.

        • pathFormat (dict) --

          The object that contains a path format that will be applied when Amazon Lex reads the transcript file in the bucket you provide. Specify this object if you only want Lex to read a subset of files in your Amazon S3 bucket.

          • objectPrefixes (list) --

            A list of Amazon S3 prefixes that points to sub-folders in the Amazon S3 bucket. Specify this list if you only want Lex to read the files under this set of sub-folders.

            • (string) --

        • transcriptFormat (string) --

          The format of the transcript content. Currently, Genie only supports the Amazon Lex transcript format.

        • transcriptFilter (dict) --

          The object that contains the filter which will be applied when Amazon Lex reads through the Amazon S3 bucket. Specify this object if you want Amazon Lex to read only a subset of the Amazon S3 bucket based on the filter you provide.

          • lexTranscriptFilter (dict) --

            The object representing the filter that Amazon Lex will use to select the appropriate transcript when the transcript format is the Amazon Lex format.

            • dateRangeFilter (dict) --

              The object that contains a date range filter that will be applied to the transcript. Specify this object if you want Amazon Lex to only read the files that are within the date range.

              • startDateTime (datetime) --

                A timestamp indicating the start date for the date range filter.

              • endDateTime (datetime) --

                A timestamp indicating the end date for the date range filter.

        • kmsKeyArn (string) --

          The ARN of the KMS key that customer use to encrypt their Amazon S3 bucket. Only use this field if your bucket is encrypted using a customer managed KMS key.

    • encryptionSetting (dict) --

      The object representing the passwords that were used to encrypt the data related to the bot recommendation results, as well as the KMS key ARN used to encrypt the associated metadata.

      • kmsKeyArn (string) --

        The KMS key ARN used to encrypt the metadata associated with the bot recommendation.

      • botLocaleExportPassword (string) --

        The password used to encrypt the recommended bot recommendation file.

      • associatedTranscriptsPassword (string) --

        The password used to encrypt the associated transcript file.

    • botRecommendationResults (dict) --

      The object representing the URL of the bot definition, the URL of the associated transcript and a statistical summary of the bot recommendation results.

      • botLocaleExportUrl (string) --

        The presigned URL link of the recommended bot definition.

      • associatedTranscriptsUrl (string) --

        The presigned url link of the associated transcript.

      • statistics (dict) --

        The statistical summary of the bot recommendation results.

        • intents (dict) --

          Statistical information about about the intents associated with the bot recommendation results.

          • discoveredIntentCount (integer) --

            The number of recommended intents associated with the bot recommendation.

        • slotTypes (dict) --

          Statistical information about the slot types associated with the bot recommendation results.

          • discoveredSlotTypeCount (integer) --

            The number of recommended slot types associated with the bot recommendation.

StartBotRecommendation (new) Link ¶

Use this to provide your transcript data, and to start the bot recommendation process.

See also: AWS API Documentation

Request Syntax

client.start_bot_recommendation(
    botId='string',
    botVersion='string',
    localeId='string',
    transcriptSourceSetting={
        's3BucketTranscriptSource': {
            's3BucketName': 'string',
            'pathFormat': {
                'objectPrefixes': [
                    'string',
                ]
            },
            'transcriptFormat': 'Lex',
            'transcriptFilter': {
                'lexTranscriptFilter': {
                    'dateRangeFilter': {
                        'startDateTime': datetime(2015, 1, 1),
                        'endDateTime': datetime(2015, 1, 1)
                    }
                }
            },
            'kmsKeyArn': 'string'
        }
    },
    encryptionSetting={
        'kmsKeyArn': 'string',
        'botLocaleExportPassword': 'string',
        'associatedTranscriptsPassword': 'string'
    }
)
type botId

string

param botId

[REQUIRED]

The unique identifier of the bot containing the bot recommendation.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot containing the bot recommendation.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale of the bot recommendation to start. The string must match one of the supported locales. For more information, see Supported languages

type transcriptSourceSetting

dict

param transcriptSourceSetting

[REQUIRED]

The object representing the Amazon S3 bucket containing the transcript, as well as the associated metadata.

  • s3BucketTranscriptSource (dict) --

    Indicates the setting of the Amazon S3 bucket where the transcript is stored.

    • s3BucketName (string) -- [REQUIRED]

      The name of the bucket containing the transcript and the associated metadata.

    • pathFormat (dict) --

      The object that contains a path format that will be applied when Amazon Lex reads the transcript file in the bucket you provide. Specify this object if you only want Lex to read a subset of files in your Amazon S3 bucket.

      • objectPrefixes (list) --

        A list of Amazon S3 prefixes that points to sub-folders in the Amazon S3 bucket. Specify this list if you only want Lex to read the files under this set of sub-folders.

        • (string) --

    • transcriptFormat (string) -- [REQUIRED]

      The format of the transcript content. Currently, Genie only supports the Amazon Lex transcript format.

    • transcriptFilter (dict) --

      The object that contains the filter which will be applied when Amazon Lex reads through the Amazon S3 bucket. Specify this object if you want Amazon Lex to read only a subset of the Amazon S3 bucket based on the filter you provide.

      • lexTranscriptFilter (dict) --

        The object representing the filter that Amazon Lex will use to select the appropriate transcript when the transcript format is the Amazon Lex format.

        • dateRangeFilter (dict) --

          The object that contains a date range filter that will be applied to the transcript. Specify this object if you want Amazon Lex to only read the files that are within the date range.

          • startDateTime (datetime) -- [REQUIRED]

            A timestamp indicating the start date for the date range filter.

          • endDateTime (datetime) -- [REQUIRED]

            A timestamp indicating the end date for the date range filter.

    • kmsKeyArn (string) --

      The ARN of the KMS key that customer use to encrypt their Amazon S3 bucket. Only use this field if your bucket is encrypted using a customer managed KMS key.

type encryptionSetting

dict

param encryptionSetting

The object representing the passwords that will be used to encrypt the data related to the bot recommendation results, as well as the KMS key ARN used to encrypt the associated metadata.

  • kmsKeyArn (string) --

    The KMS key ARN used to encrypt the metadata associated with the bot recommendation.

  • botLocaleExportPassword (string) --

    The password used to encrypt the recommended bot recommendation file.

  • associatedTranscriptsPassword (string) --

    The password used to encrypt the associated transcript file.

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'botRecommendationStatus': 'Processing'|'Deleting'|'Deleted'|'Downloading'|'Updating'|'Available'|'Failed',
    'botRecommendationId': 'string',
    'creationDateTime': datetime(2015, 1, 1),
    'transcriptSourceSetting': {
        's3BucketTranscriptSource': {
            's3BucketName': 'string',
            'pathFormat': {
                'objectPrefixes': [
                    'string',
                ]
            },
            'transcriptFormat': 'Lex',
            'transcriptFilter': {
                'lexTranscriptFilter': {
                    'dateRangeFilter': {
                        'startDateTime': datetime(2015, 1, 1),
                        'endDateTime': datetime(2015, 1, 1)
                    }
                }
            },
            'kmsKeyArn': 'string'
        }
    },
    'encryptionSetting': {
        'kmsKeyArn': 'string',
        'botLocaleExportPassword': 'string',
        'associatedTranscriptsPassword': 'string'
    }
}

Response Structure

  • (dict) --

    • botId (string) --

      The unique identifier of the bot containing the bot recommendation.

    • botVersion (string) --

      The version of the bot containing the bot recommendation.

    • localeId (string) --

      The identifier of the language and locale of the bot recommendation to start. The string must match one of the supported locales. For more information, see Supported languages

    • botRecommendationStatus (string) --

      The status of the bot recommendation.

      If the status is Failed, then the reasons for the failure are listed in the failureReasons field.

    • botRecommendationId (string) --

      The identifier of the bot recommendation that you have created.

    • creationDateTime (datetime) --

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

    • transcriptSourceSetting (dict) --

      The object representing the Amazon S3 bucket containing the transcript, as well as the associated metadata.

      • s3BucketTranscriptSource (dict) --

        Indicates the setting of the Amazon S3 bucket where the transcript is stored.

        • s3BucketName (string) --

          The name of the bucket containing the transcript and the associated metadata.

        • pathFormat (dict) --

          The object that contains a path format that will be applied when Amazon Lex reads the transcript file in the bucket you provide. Specify this object if you only want Lex to read a subset of files in your Amazon S3 bucket.

          • objectPrefixes (list) --

            A list of Amazon S3 prefixes that points to sub-folders in the Amazon S3 bucket. Specify this list if you only want Lex to read the files under this set of sub-folders.

            • (string) --

        • transcriptFormat (string) --

          The format of the transcript content. Currently, Genie only supports the Amazon Lex transcript format.

        • transcriptFilter (dict) --

          The object that contains the filter which will be applied when Amazon Lex reads through the Amazon S3 bucket. Specify this object if you want Amazon Lex to read only a subset of the Amazon S3 bucket based on the filter you provide.

          • lexTranscriptFilter (dict) --

            The object representing the filter that Amazon Lex will use to select the appropriate transcript when the transcript format is the Amazon Lex format.

            • dateRangeFilter (dict) --

              The object that contains a date range filter that will be applied to the transcript. Specify this object if you want Amazon Lex to only read the files that are within the date range.

              • startDateTime (datetime) --

                A timestamp indicating the start date for the date range filter.

              • endDateTime (datetime) --

                A timestamp indicating the end date for the date range filter.

        • kmsKeyArn (string) --

          The ARN of the KMS key that customer use to encrypt their Amazon S3 bucket. Only use this field if your bucket is encrypted using a customer managed KMS key.

    • encryptionSetting (dict) --

      The object representing the passwords that were used to encrypt the data related to the bot recommendation results, as well as the KMS key ARN used to encrypt the associated metadata.

      • kmsKeyArn (string) --

        The KMS key ARN used to encrypt the metadata associated with the bot recommendation.

      • botLocaleExportPassword (string) --

        The password used to encrypt the recommended bot recommendation file.

      • associatedTranscriptsPassword (string) --

        The password used to encrypt the associated transcript file.

UpdateBotRecommendation (new) Link ¶

Updates an existing bot recommendation request.

See also: AWS API Documentation

Request Syntax

client.update_bot_recommendation(
    botId='string',
    botVersion='string',
    localeId='string',
    botRecommendationId='string',
    encryptionSetting={
        'kmsKeyArn': 'string',
        'botLocaleExportPassword': 'string',
        'associatedTranscriptsPassword': 'string'
    }
)
type botId

string

param botId

[REQUIRED]

The unique identifier of the bot containing the bot recommendation to be updated.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot containing the bot recommendation to be updated.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale of the bot recommendation to update. The string must match one of the supported locales. For more information, see Supported languages

type botRecommendationId

string

param botRecommendationId

[REQUIRED]

The unique identifier of the bot recommendation to be updated.

type encryptionSetting

dict

param encryptionSetting

[REQUIRED]

The object representing the passwords that will be used to encrypt the data related to the bot recommendation results, as well as the KMS key ARN used to encrypt the associated metadata.

  • kmsKeyArn (string) --

    The KMS key ARN used to encrypt the metadata associated with the bot recommendation.

  • botLocaleExportPassword (string) --

    The password used to encrypt the recommended bot recommendation file.

  • associatedTranscriptsPassword (string) --

    The password used to encrypt the associated transcript file.

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'botRecommendationStatus': 'Processing'|'Deleting'|'Deleted'|'Downloading'|'Updating'|'Available'|'Failed',
    'botRecommendationId': 'string',
    'creationDateTime': datetime(2015, 1, 1),
    'lastUpdatedDateTime': datetime(2015, 1, 1),
    'transcriptSourceSetting': {
        's3BucketTranscriptSource': {
            's3BucketName': 'string',
            'pathFormat': {
                'objectPrefixes': [
                    'string',
                ]
            },
            'transcriptFormat': 'Lex',
            'transcriptFilter': {
                'lexTranscriptFilter': {
                    'dateRangeFilter': {
                        'startDateTime': datetime(2015, 1, 1),
                        'endDateTime': datetime(2015, 1, 1)
                    }
                }
            },
            'kmsKeyArn': 'string'
        }
    },
    'encryptionSetting': {
        'kmsKeyArn': 'string',
        'botLocaleExportPassword': 'string',
        'associatedTranscriptsPassword': 'string'
    }
}

Response Structure

  • (dict) --

    • botId (string) --

      The unique identifier of the bot containing the bot recommendation that has been updated.

    • botVersion (string) --

      The version of the bot containing the bot recommendation that has been updated.

    • localeId (string) --

      The identifier of the language and locale of the bot recommendation to update. The string must match one of the supported locales. For more information, see Supported languages

    • botRecommendationStatus (string) --

      The status of the bot recommendation.

      If the status is Failed, then the reasons for the failure are listed in the failureReasons field.

    • botRecommendationId (string) --

      The unique identifier of the bot recommendation to be updated.

    • creationDateTime (datetime) --

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

    • lastUpdatedDateTime (datetime) --

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

    • transcriptSourceSetting (dict) --

      The object representing the Amazon S3 bucket containing the transcript, as well as the associated metadata.

      • s3BucketTranscriptSource (dict) --

        Indicates the setting of the Amazon S3 bucket where the transcript is stored.

        • s3BucketName (string) --

          The name of the bucket containing the transcript and the associated metadata.

        • pathFormat (dict) --

          The object that contains a path format that will be applied when Amazon Lex reads the transcript file in the bucket you provide. Specify this object if you only want Lex to read a subset of files in your Amazon S3 bucket.

          • objectPrefixes (list) --

            A list of Amazon S3 prefixes that points to sub-folders in the Amazon S3 bucket. Specify this list if you only want Lex to read the files under this set of sub-folders.

            • (string) --

        • transcriptFormat (string) --

          The format of the transcript content. Currently, Genie only supports the Amazon Lex transcript format.

        • transcriptFilter (dict) --

          The object that contains the filter which will be applied when Amazon Lex reads through the Amazon S3 bucket. Specify this object if you want Amazon Lex to read only a subset of the Amazon S3 bucket based on the filter you provide.

          • lexTranscriptFilter (dict) --

            The object representing the filter that Amazon Lex will use to select the appropriate transcript when the transcript format is the Amazon Lex format.

            • dateRangeFilter (dict) --

              The object that contains a date range filter that will be applied to the transcript. Specify this object if you want Amazon Lex to only read the files that are within the date range.

              • startDateTime (datetime) --

                A timestamp indicating the start date for the date range filter.

              • endDateTime (datetime) --

                A timestamp indicating the end date for the date range filter.

        • kmsKeyArn (string) --

          The ARN of the KMS key that customer use to encrypt their Amazon S3 bucket. Only use this field if your bucket is encrypted using a customer managed KMS key.

    • encryptionSetting (dict) --

      The object representing the passwords that were used to encrypt the data related to the bot recommendation results, as well as the KMS key ARN used to encrypt the associated metadata.

      • kmsKeyArn (string) --

        The KMS key ARN used to encrypt the metadata associated with the bot recommendation.

      • botLocaleExportPassword (string) --

        The password used to encrypt the recommended bot recommendation file.

      • associatedTranscriptsPassword (string) --

        The password used to encrypt the associated transcript file.

SearchAssociatedTranscripts (new) Link ¶

Search for associated transcripts that meet the specified criteria.

See also: AWS API Documentation

Request Syntax

client.search_associated_transcripts(
    botId='string',
    botVersion='string',
    localeId='string',
    botRecommendationId='string',
    searchOrder='Ascending'|'Descending',
    filters=[
        {
            'name': 'IntentId'|'SlotTypeId',
            'values': [
                'string',
            ]
        },
    ],
    maxResults=123,
    nextIndex=123
)
type botId

string

param botId

[REQUIRED]

The unique identifier of the bot associated with the transcripts that you are searching.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot containing the transcripts that you are searching.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale of the transcripts to search. The string must match one of the supported locales. For more information, see Supported languages

type botRecommendationId

string

param botRecommendationId

[REQUIRED]

The unique identifier of the bot recommendation associated with the transcripts to search.

type searchOrder

string

param searchOrder

How SearchResults are ordered. Valid values are Ascending or Descending. The default is Descending.

type filters

list

param filters

[REQUIRED]

A list of filter objects.

  • (dict) --

    Filters to search for the associated transcript.

    • name (string) -- [REQUIRED]

      The name of the field to use for filtering. The allowed names are IntentId and SlotTypeId.

    • values (list) -- [REQUIRED]

      The values to use to filter the transcript.

      • (string) --

type maxResults

integer

param maxResults

The maximum number of bot recommendations 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 nextIndex

integer

param nextIndex

If the response from the SearchAssociatedTranscriptsRequest operation contains more results than specified in the maxResults parameter, an index is returned in the response. Use that index in the nextIndex parameter to return the next page of results.

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'botRecommendationId': 'string',
    'nextIndex': 123,
    'associatedTranscripts': [
        {
            'transcript': 'string'
        },
    ],
    'totalResults': 123
}

Response Structure

  • (dict) --

    • botId (string) --

      The unique identifier of the bot associated with the transcripts that you are searching.

    • botVersion (string) --

      The version of the bot containing the transcripts that you are searching.

    • localeId (string) --

      The identifier of the language and locale of the transcripts to search. The string must match one of the supported locales. For more information, see Supported languages

    • botRecommendationId (string) --

      The unique identifier of the bot recommendation associated with the transcripts to search.

    • nextIndex (integer) --

      A index that indicates whether there are more results to return in a response to the SearchAssociatedTranscripts operation. If the nextIndex field is present, you send the contents as the nextIndex parameter of a SearchAssociatedTranscriptsRequest operation to get the next page of results.

    • associatedTranscripts (list) --

      The object that contains the associated transcript that meet the criteria you specified.

      • (dict) --

        The object containing information that associates the recommended intent/slot type with a conversation.

        • transcript (string) --

          The content of the transcript that meets the search filter criteria. For the JSON format of the transcript, see Output transcript format .

    • totalResults (integer) --

      The total number of transcripts returned by the search.

ListBotRecommendations (new) Link ¶

Get a list of bot recommendations that meet the specified criteria.

See also: AWS API Documentation

Request Syntax

client.list_bot_recommendations(
    botId='string',
    botVersion='string',
    localeId='string',
    maxResults=123,
    nextToken='string'
)
type botId

string

param botId

[REQUIRED]

The unique identifier of the bot that contains the bot recommendation list.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot that contains the bot recommendation list.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale of the bot recommendation list.

type maxResults

integer

param maxResults

The maximum number of bot recommendations 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 ListBotRecommendation operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'botRecommendationSummaries': [
        {
            'botRecommendationStatus': 'Processing'|'Deleting'|'Deleted'|'Downloading'|'Updating'|'Available'|'Failed',
            'botRecommendationId': 'string',
            'creationDateTime': datetime(2015, 1, 1),
            'lastUpdatedDateTime': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • botId (string) --

      The unique identifier of the bot that contains the bot recommendation list.

    • botVersion (string) --

      The version of the bot that contains the bot recommendation list.

    • localeId (string) --

      The identifier of the language and locale of the bot recommendation list.

    • botRecommendationSummaries (list) --

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

      • (dict) --

        A summary of the bot recommendation.

        • botRecommendationStatus (string) --

          The status of the bot recommendation.

          If the status is Failed, then the reasons for the failure are listed in the failureReasons field.

        • botRecommendationId (string) --

          The unique identifier of the bot recommendation to be updated.

        • creationDateTime (datetime) --

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

        • lastUpdatedDateTime (datetime) --

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

    • nextToken (string) --

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

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

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 CreateBot 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'|'Processing',
    '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.

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

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',
        'engine': 'standard'|'neural'
    }
)
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 RecognizeText 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.

  • engine (string) --

    Indicates the type of Amazon Polly voice that Amazon Lex should use for voice interaction with the user. For more information, see Voices in Amazon Polly .

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeName': 'string',
    'localeId': 'string',
    'description': 'string',
    'nluIntentConfidenceThreshold': 123.0,
    'voiceSettings': {
        'voiceId': 'string',
        'engine': 'standard'|'neural'
    },
    'botLocaleStatus': 'Creating'|'Building'|'Built'|'ReadyExpressTesting'|'Failed'|'Deleting'|'NotBuilt'|'Importing'|'Processing',
    '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.

      • engine (string) --

        Indicates the type of Amazon Polly voice that Amazon Lex should use for voice interaction with the user. For more information, see Voices in Amazon Polly .

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

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

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

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.

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

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',
        'engine': 'standard'|'neural'
    },
    'intentsCount': 123,
    'slotTypesCount': 123,
    'botLocaleStatus': 'Creating'|'Building'|'Built'|'ReadyExpressTesting'|'Failed'|'Deleting'|'NotBuilt'|'Importing'|'Processing',
    '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.

      • engine (string) --

        Indicates the type of Amazon Polly voice that Amazon Lex should use for voice interaction with the user. For more information, see Voices in Amazon Polly .

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

DescribeImport (updated) Link ¶
Changes (response)
{'mergeStrategy': {'Append'}}

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',
                'engine': 'standard'|'neural'
            }
        }
    },
    'importedResourceId': 'string',
    'importedResourceName': 'string',
    'mergeStrategy': 'Overwrite'|'FailOnConflict'|'Append',
    '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.

          • engine (string) --

            Indicates the type of Amazon Polly voice that Amazon Lex should use for voice interaction with the user. For more information, see Voices in Amazon Polly .

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

      • (string) --

    • creationDateTime (datetime) --

      The date and time that the import was created.

    • lastUpdatedDateTime (datetime) --

      The date and time that the import was last updated.

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

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

ListImports (updated) Link ¶
Changes (response)
{'importSummaries': {'mergeStrategy': {'Append'}}}

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 ListImports 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'|'Append',
            '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.

StartImport (updated) Link ¶
Changes (both)
{'mergeStrategy': {'Append'}}

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',
                'engine': 'standard'|'neural'
            }
        }
    },
    mergeStrategy='Overwrite'|'FailOnConflict'|'Append',
    filePassword='string'
)
type importId

string

param importId

[REQUIRED]

The unique identifier for the import. It is included in the response from the CreateUploadUrl 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.

      • engine (string) --

        Indicates the type of Amazon Polly voice that Amazon Lex should use for voice interaction with the user. For more information, see Voices in Amazon Polly .

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',
                'engine': 'standard'|'neural'
            }
        }
    },
    'mergeStrategy': 'Overwrite'|'FailOnConflict'|'Append',
    '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.

          • engine (string) --

            Indicates the type of Amazon Polly voice that Amazon Lex should use for voice interaction with the user. For more information, see Voices in Amazon Polly .

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

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

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',
        'engine': 'standard'|'neural'
    }
)
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.

  • engine (string) --

    Indicates the type of Amazon Polly voice that Amazon Lex should use for voice interaction with the user. For more information, see Voices in Amazon Polly .

rtype

dict

returns

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'localeName': 'string',
    'description': 'string',
    'nluIntentConfidenceThreshold': 123.0,
    'voiceSettings': {
        'voiceId': 'string',
        'engine': 'standard'|'neural'
    },
    'botLocaleStatus': 'Creating'|'Building'|'Built'|'ReadyExpressTesting'|'Failed'|'Deleting'|'NotBuilt'|'Importing'|'Processing',
    '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.

      • engine (string) --

        Indicates the type of Amazon Polly voice that Amazon Lex should use for voice interaction with the user. For more information, see Voices in Amazon Polly .

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