create_bot_version

create_bot_version(**kwargs)

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

response = client.create_bot_version(
    botId='string',
    description='string',
    botVersionLocaleSpecification={
        'string': {
            'sourceBotVersion': 'string'
        }
    }
)
Parameters
  • botId (string) --

    [REQUIRED]

    The identifier of the bot to create the version for.

  • description (string) -- A description of the version. Use the description to help identify the version in lists.
  • botVersionLocaleSpecification (dict) --

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

Return type

dict

Returns

Response Syntax

{
    'botId': 'string',
    'description': 'string',
    'botVersion': 'string',
    'botVersionLocaleSpecification': {
        'string': {
            'sourceBotVersion': 'string'
        }
    },
    'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning'|'Importing'|'Updating',
    '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.

Exceptions

  • LexModelsV2.Client.exceptions.ThrottlingException
  • LexModelsV2.Client.exceptions.ServiceQuotaExceededException
  • LexModelsV2.Client.exceptions.ValidationException
  • LexModelsV2.Client.exceptions.PreconditionFailedException
  • LexModelsV2.Client.exceptions.ConflictException
  • LexModelsV2.Client.exceptions.InternalServerException