bot_versions
Creates, updates, deletes or gets a bot_version resource or lists bot_versions in a region
Overview
| Name | bot_versions |
| Type | Resource |
| Description | A version is a numbered snapshot of your work that you can publish for use in different parts of your workflow, such as development, beta deployment, and production. |
| Id | awscc.lex.bot_versions |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
bot_id | string | Unique ID of resource |
bot_version | object | A version is a numbered snapshot of your work that you can publish for use in different parts of your workflow, such as development, beta deployment, and production. |
description | string | A description of the version. Use the description to help identify the version in lists. |
bot_version_locale_specification | array | 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. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
bot_id | string | Unique ID of resource |
bot_version | object | A version is a numbered snapshot of your work that you can publish for use in different parts of your workflow, such as development, beta deployment, and production. |
region | string | AWS region. |
For more information, see AWS::Lex::BotVersion.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | bot_versions | INSERT | BotId, BotVersionLocaleSpecification, region |
delete_resource | bot_versions | DELETE | Identifier, region |
list_resources | bot_versions_list_only | SELECT | region |
get_resource | bot_versions | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual bot_version.
SELECT
region,
bot_id,
bot_version,
description,
bot_version_locale_specification
FROM awscc.lex.bot_versions
WHERE
region = '{{ region }}' AND
Identifier = '{{ bot_id }}|{{ bot_version }}';
Lists all bot_versions in a region.
SELECT
region,
bot_id,
bot_version
FROM awscc.lex.bot_versions_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new bot_version resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.lex.bot_versions (
BotId,
BotVersionLocaleSpecification,
region
)
SELECT
'{{ bot_id }}',
'{{ bot_version_locale_specification }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.lex.bot_versions (
BotId,
Description,
BotVersionLocaleSpecification,
region
)
SELECT
'{{ bot_id }}',
'{{ description }}',
'{{ bot_version_locale_specification }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: bot_version
props:
- name: bot_id
value: '{{ bot_id }}'
- name: description
value: '{{ description }}'
- name: bot_version_locale_specification
value:
- locale_id: '{{ locale_id }}'
bot_version_locale_details:
source_bot_version:
bot_id: null
description: null
bot_version_locale_specification: null
DELETE example
/*+ delete */
DELETE FROM awscc.lex.bot_versions
WHERE
Identifier = '{{ bot_id }}|{{ bot_version }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the bot_versions resource, the following permissions are required:
- Create
- Read
- Delete
- List
lex:CreateBotVersion,
lex:DescribeBotVersion,
lex:DescribeBot,
lex:DescribeBotLocale,
lex:BuildBotLocale
lex:DescribeBotVersion
lex:DeleteBotVersion,
lex:DescribeBotVersion
lex:ListBotVersions