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