Skip to main content

slot_type_versions

Creates, updates, deletes, gets or lists a slot_type_versions resource.

Overview

Nameslot_type_versions
TypeResource
Idaws.lex_models.slot_type_versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the slot type. (pattern: <code>^([A-Za-z]_?)+$</code>)
created_datestring (date-time)The date that the slot type was created.
descriptionstringA description of the slot type.
last_updated_datestring (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.
versionstringThe version of the slot type. (pattern: <code>$LATEST|[0-9]+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_slot_type_versionsselectname, regionnextToken, maxResultsGets 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_versioninsertname, regionCreates 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_versiondeletename, version, regionDeletes 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.

NameDatatypeDescription
namestringThe name of the slot type.
regionstringAWS region (default: us-east-1)
versionstringThe 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.
maxResultsintegerThe maximum number of slot type versions to return in the response. The default is 10.
nextTokenstringA 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

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

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
;

DELETE examples

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
;