bot_versions
Creates, updates, deletes, gets or lists a bot_versions resource.
Overview
| Name | bot_versions |
| Type | Resource |
| Id | aws.lex_models.bot_versions |
Fields
The following fields are returned by SELECT queries:
- get_bot_versions
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the bot. (pattern: <code>^([A-Za-z]_?)+$</code>) |
created_date | string (date-time) | The date that the bot was created. |
description | string | A description of the bot. |
last_updated_date | string (date-time) | The date that the bot was updated. When you create a bot, the creation date and last updated date are the same. |
status | string | The status of the bot. (BUILDING, READY, READY_BASIC_TESTING, FAILED, NOT_BUILT) |
version | string | The version of the bot. For a new bot, the version is always $LATEST. (pattern: <code>$LATEST|[0-9]+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_bot_versions | select | name, region | nextToken, maxResults | Gets information about all of the versions of a bot. The GetBotVersions operation returns a BotMetadata object for each version of a bot. For example, if a bot has three numbered versions, the GetBotVersions operation returns four BotMetadata objects in the response, one for each numbered version and one for the $LATEST version. The GetBotVersions operation always returns at least one version, the $LATEST version. This operation requires permissions for the lex:GetBotVersions action. |
create_bot_version | insert | name, region | Creates a new version of the bot based on the $LATEST version. If the $LATEST 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. You can update only the $LATEST version of the bot. You can't update the numbered versions that you create with the CreateBotVersion operation. When you create the first version of a bot, Amazon Lex sets the version to 1. Subsequent versions increment by 1. For more information, see versioning-intro. This operation requires permission for the lex:CreateBotVersion action. | |
delete_bot_version | delete | name, version, region | Deletes a specific version of a bot. To delete all versions of a bot, use the DeleteBot operation. This operation requires permissions for the lex:DeleteBotVersion action. |
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 |
|---|---|---|
name | string | The name of the bot. |
region | string | AWS region (default: us-east-1) |
version | string | The version of the bot to delete. You cannot delete the $LATEST version of the bot. To delete the $LATEST version, use the DeleteBot operation. |
maxResults | integer | The maximum number of bot versions to return in the response. The default is 10. |
nextToken | string | A pagination token for fetching the next page of bot versions. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of versions, specify the pagination token in the next request. |
SELECT examples
- get_bot_versions
Gets information about all of the versions of a bot. The GetBotVersions operation returns a BotMetadata object for each version of a bot. For example, if a bot has three numbered versions, the GetBotVersions operation returns four BotMetadata objects in the response, one for each numbered version and one for the $LATEST version. The GetBotVersions operation always returns at least one version, the $LATEST version. This operation requires permissions for the lex:GetBotVersions action.
SELECT
name,
created_date,
description,
last_updated_date,
status,
version
FROM aws.lex_models.bot_versions
WHERE name = '{{ name }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_bot_version
- Manifest
Creates a new version of the bot based on the $LATEST version. If the $LATEST 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. You can update only the $LATEST version of the bot. You can't update the numbered versions that you create with the CreateBotVersion operation. When you create the first version of a bot, Amazon Lex sets the version to 1. Subsequent versions increment by 1. For more information, see versioning-intro. This operation requires permission for the lex:CreateBotVersion action.
INSERT INTO aws.lex_models.bot_versions (
checksum,
name,
region
)
SELECT
'{{ checksum }}',
'{{ name }}',
'{{ region }}'
RETURNING
name,
abort_statement,
checksum,
child_directed,
clarification_prompt,
created_date,
description,
detect_sentiment,
enable_model_improvements,
failure_reason,
idle_session_ttl_in_seconds,
intents,
last_updated_date,
locale,
status,
version,
voice_id
;
# Description fields are for documentation purposes
- name: bot_versions
props:
- name: name
value: "{{ name }}"
description: Required parameter for the bot_versions resource.
- name: region
value: "{{ region }}"
description: Required parameter for the bot_versions resource.
- name: checksum
value: "{{ checksum }}"
DELETE examples
- delete_bot_version
Deletes a specific version of a bot. To delete all versions of a bot, use the DeleteBot operation. This operation requires permissions for the lex:DeleteBotVersion action.
DELETE FROM aws.lex_models.bot_versions
WHERE name = '{{ name }}' --required
AND version = '{{ version }}' --required
AND region = '{{ region }}' --required
;