Skip to main content

bot_versions

Creates, updates, deletes, gets or lists a bot_versions resource.

Overview

Namebot_versions
TypeResource
Idaws.lexv2_models.bot_versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
bot_idstringThe identifier of the bot that contains the version. (pattern: <code>^[0-9a-zA-Z]+$</code>)
bot_membersarrayThe members of bot network in the version that was described.
bot_namestringThe name of the bot that contains the version. (pattern: <code>^([0-9a-zA-Z][_-]?){1,100}$</code>)
bot_statusstringThe current status of the bot. When the status is Available, the bot version is ready for use. (Creating, Available, Inactive, Deleting, Failed, Versioning, Importing, Updating)
bot_typestringThe type of the bot in the version that was described. (Bot, BotNetwork)
bot_versionstringThe version of the bot that was described. (pattern: <code>^[0-9]+$</code>)
creation_date_timestring (date-time)A timestamp of the date and time that the bot version was created.
data_privacyobjectBy 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.
descriptionstringThe description specified for the bot.
failure_reasonsarrayIf the botStatus is Failed, this contains a list of reasons that the version couldn't be built.
idle_session_ttl_in_secondsintegerThe number of seconds that a session with the bot remains active before it is discarded by Amazon Lex.
parent_bot_networksarrayA list of the networks to which the bot version you described belongs.
role_arnstringThe Amazon Resource Name (ARN) of an IAM role that has permission to access the bot version. (pattern: <code>^arn:aws:iam::[0-9]{12}:role/.*$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_bot_versionselectbot_id, bot_version, regionProvides metadata about a version of a bot.
list_bot_versionsselectbot_id, regionGets 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.
create_bot_versioninsertbot_id, region, botVersionLocaleSpecificationCreates an immutable version of the bot. When you create the first version of a bot, Amazon Lex sets the version number to 1. Subsequent bot versions increase in an increment of 1. The version number will always represent the total number of versions created of the bot, not the current number of versions. If a bot version is deleted, that bot version number will not be reused.
delete_bot_versiondeletebot_id, bot_version, regionskipResourceInUseCheckDeletes a specific version of a bot. To delete all versions of a bot, use the DeleteBot operation.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
bot_idstringThe identifier of the bot that contains the version.
bot_versionstringThe version of the bot to delete.
regionstringAWS region (default: us-east-1)
skipResourceInUseCheckbooleanBy default, Amazon Lex checks if any other resource, such as an alias or bot network, is using the bot version before it is deleted and throws a ResourceInUseException exception if the version is being used by another resource. Set this parameter to true to skip this check and remove the version even if it is being used by another resource.

SELECT examples

Provides metadata about a version of a bot.

SELECT
bot_id,
bot_members,
bot_name,
bot_status,
bot_type,
bot_version,
creation_date_time,
data_privacy,
description,
failure_reasons,
idle_session_ttl_in_seconds,
parent_bot_networks,
role_arn
FROM aws.lexv2_models.bot_versions
WHERE bot_id = '{{ bot_id }}' -- required
AND bot_version = '{{ bot_version }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates an immutable version of the bot. When you create the first version of a bot, Amazon Lex sets the version number to 1. Subsequent bot versions increase in an increment of 1. The version number will always represent the total number of versions created of the bot, not the current number of versions. If a bot version is deleted, that bot version number will not be reused.

INSERT INTO aws.lexv2_models.bot_versions (
description,
botVersionLocaleSpecification,
bot_id,
region
)
SELECT
'{{ description }}',
'{{ botVersionLocaleSpecification }}' /* required */,
'{{ bot_id }}',
'{{ region }}'
RETURNING
bot_id,
bot_status,
bot_version,
bot_version_locale_specification,
creation_date_time,
description
;

DELETE examples

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

DELETE FROM aws.lexv2_models.bot_versions
WHERE bot_id = '{{ bot_id }}' --required
AND bot_version = '{{ bot_version }}' --required
AND region = '{{ region }}' --required
AND skipResourceInUseCheck = '{{ skipResourceInUseCheck }}'
;