bot_versions
Creates, updates, deletes, gets or lists a bot_versions resource.
Overview
| Name | bot_versions |
| Type | Resource |
| Id | aws.lexv2_models.bot_versions |
Fields
The following fields are returned by SELECT queries:
- describe_bot_version
- list_bot_versions
| Name | Datatype | Description |
|---|---|---|
bot_id | string | The identifier of the bot that contains the version. (pattern: <code>^[0-9a-zA-Z]+$</code>) |
bot_members | array | The members of bot network in the version that was described. |
bot_name | string | The name of the bot that contains the version. (pattern: <code>^([0-9a-zA-Z][_-]?){1,100}$</code>) |
bot_status | string | The 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_type | string | The type of the bot in the version that was described. (Bot, BotNetwork) |
bot_version | string | The version of the bot that was described. (pattern: <code>^[0-9]+$</code>) |
creation_date_time | string (date-time) | A timestamp of the date and time that the bot version was created. |
data_privacy | object | 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. |
description | string | The description specified for the bot. |
failure_reasons | array | If the botStatus is Failed, this contains a list of reasons that the version couldn't be built. |
idle_session_ttl_in_seconds | integer | The number of seconds that a session with the bot remains active before it is discarded by Amazon Lex. |
parent_bot_networks | array | A list of the networks to which the bot version you described belongs. |
role_arn | string | The 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>) |
| Name | Datatype | Description |
|---|---|---|
bot_id | string | The identifier of the bot to list versions for. (pattern: <code>^[0-9a-zA-Z]+$</code>) |
bot_version_summaries | array | 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. |
next_token | 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. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_bot_version | select | bot_id, bot_version, region | Provides metadata about a version of a bot. | |
list_bot_versions | select | bot_id, region | 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. | |
create_bot_version | insert | bot_id, region, botVersionLocaleSpecification | 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. | |
delete_bot_version | delete | bot_id, bot_version, region | skipResourceInUseCheck | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
bot_id | string | The identifier of the bot that contains the version. |
bot_version | string | The version of the bot to delete. |
region | string | AWS region (default: us-east-1) |
skipResourceInUseCheck | boolean | By 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
- describe_bot_version
- list_bot_versions
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
;
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.
SELECT
bot_id,
bot_version_summaries,
next_token
FROM aws.lexv2_models.bot_versions
WHERE bot_id = '{{ bot_id }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_bot_version
- Manifest
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
;
# Description fields are for documentation purposes
- name: bot_versions
props:
- name: bot_id
value: "{{ bot_id }}"
description: Required parameter for the bot_versions resource.
- name: region
value: "{{ region }}"
description: Required parameter for the bot_versions resource.
- name: description
value: "{{ description }}"
- name: botVersionLocaleSpecification
value: "{{ botVersionLocaleSpecification }}"
DELETE examples
- delete_bot_version
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 }}'
;