intent_versions
Creates, updates, deletes, gets or lists an intent_versions resource.
Overview
| Name | intent_versions |
| Type | Resource |
| Id | aws.lex_models.intent_versions |
Fields
The following fields are returned by SELECT queries:
- get_intent_versions
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the intent. (pattern: <code>^([A-Za-z]_?)+$</code>) |
created_date | string (date-time) | The date that the intent was created. |
description | string | A description of the intent. |
last_updated_date | string (date-time) | The date that the intent was updated. When you create an intent, the creation date and last updated date are the same. |
version | string | The version of the intent. (pattern: <code>$LATEST|[0-9]+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_intent_versions | select | name, region | nextToken, maxResults | Gets information about all of the versions of an intent. The GetIntentVersions operation returns an IntentMetadata object for each version of an intent. For example, if an intent has three numbered versions, the GetIntentVersions operation returns four IntentMetadata objects in the response, one for each numbered version and one for the $LATEST version. The GetIntentVersions operation always returns at least one version, the $LATEST version. This operation requires permissions for the lex:GetIntentVersions action. |
create_intent_version | insert | name, region | Creates a new version of an intent based on the $LATEST version of the intent. If the $LATEST version of this intent hasn't changed since you last updated it, Amazon Lex doesn't create a new version. It returns the last version you created. You can update only the $LATEST version of the intent. You can't update the numbered versions that you create with the CreateIntentVersion operation. When you create a version of an intent, Amazon Lex sets the version to 1. Subsequent versions increment by 1. For more information, see versioning-intro. This operation requires permissions to perform the lex:CreateIntentVersion action. | |
delete_intent_version | delete | name, version, region | Deletes a specific version of an intent. To delete all versions of a intent, use the DeleteIntent operation. This operation requires permissions for the lex:DeleteIntentVersion 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 intent. |
region | string | AWS region (default: us-east-1) |
version | string | The version of the intent to delete. You cannot delete the $LATEST version of the intent. To delete the $LATEST version, use the DeleteIntent operation. |
maxResults | integer | The maximum number of intent versions to return in the response. The default is 10. |
nextToken | string | A pagination token for fetching the next page of intent 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_intent_versions
Gets information about all of the versions of an intent. The GetIntentVersions operation returns an IntentMetadata object for each version of an intent. For example, if an intent has three numbered versions, the GetIntentVersions operation returns four IntentMetadata objects in the response, one for each numbered version and one for the $LATEST version. The GetIntentVersions operation always returns at least one version, the $LATEST version. This operation requires permissions for the lex:GetIntentVersions action.
SELECT
name,
created_date,
description,
last_updated_date,
version
FROM aws.lex_models.intent_versions
WHERE name = '{{ name }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_intent_version
- Manifest
Creates a new version of an intent based on the $LATEST version of the intent. If the $LATEST version of this intent hasn't changed since you last updated it, Amazon Lex doesn't create a new version. It returns the last version you created. You can update only the $LATEST version of the intent. You can't update the numbered versions that you create with the CreateIntentVersion operation. When you create a version of an intent, Amazon Lex sets the version to 1. Subsequent versions increment by 1. For more information, see versioning-intro. This operation requires permissions to perform the lex:CreateIntentVersion action.
INSERT INTO aws.lex_models.intent_versions (
checksum,
name,
region
)
SELECT
'{{ checksum }}',
'{{ name }}',
'{{ region }}'
RETURNING
name,
checksum,
conclusion_statement,
confirmation_prompt,
created_date,
description,
dialog_code_hook,
follow_up_prompt,
fulfillment_activity,
input_contexts,
kendra_configuration,
last_updated_date,
output_contexts,
parent_intent_signature,
rejection_statement,
sample_utterances,
slots,
version
;
# Description fields are for documentation purposes
- name: intent_versions
props:
- name: name
value: "{{ name }}"
description: Required parameter for the intent_versions resource.
- name: region
value: "{{ region }}"
description: Required parameter for the intent_versions resource.
- name: checksum
value: "{{ checksum }}"
DELETE examples
- delete_intent_version
Deletes a specific version of an intent. To delete all versions of a intent, use the DeleteIntent operation. This operation requires permissions for the lex:DeleteIntentVersion action.
DELETE FROM aws.lex_models.intent_versions
WHERE name = '{{ name }}' --required
AND version = '{{ version }}' --required
AND region = '{{ region }}' --required
;