Skip to main content

slot_types

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

Overview

Nameslot_types
TypeResource
Idaws.lexv2_models.slot_types

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
bot_idstringThe identifier of the bot associated with the slot type. (pattern: <code>^[0-9a-zA-Z]+$</code>)
bot_versionstringThe version of the bot associated with the slot type. (pattern: <code>^(DRAFT|[0-9]+)$</code>)
composite_slot_type_settingobjectA composite slot is a combination of two or more slots that capture multiple pieces of information in a single user input.
creation_date_timestring (date-time)A timestamp of the date and time that the slot type was created.
descriptionstringThe description specified for the slot type.
external_source_settingobjectProvides information about the external source of the slot type's definition.
last_updated_date_timestring (date-time)A timestamp of the date and time that the slot type was last updated.
locale_idstringThe language and locale specified for the slot type.
parent_slot_type_signaturestringThe built in slot type used as a parent to this slot type.
slot_type_idstringThe unique identifier for the slot type. (pattern: <code>^[0-9a-zA-Z]+$</code>)
slot_type_namestringThe name specified for the slot type. (pattern: <code>^([0-9a-zA-Z][_-]?){1,100}$</code>)
slot_type_valuesarrayThe values that the slot type can take. Includes any synonyms for the slot type values.
value_selection_settingobjectContains settings used by Amazon Lex to select a slot value.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_slot_typeselectslot_type_id, bot_id, bot_version, locale_id, regionGets metadata information about a slot type.
list_slot_typesselectbot_id, bot_version, locale_id, regionGets a list of slot types that match the specified criteria.
create_slot_typeinsertbot_id, bot_version, locale_id, region, slotTypeNameCreates a custom slot type To create a custom slot type, specify a name for the slot type and a set of enumeration values, the values that a slot of this type can assume.
update_slot_typeupdateslot_type_id, bot_id, bot_version, locale_id, region, slotTypeNameUpdates the configuration of an existing slot type.
delete_slot_typedeleteslot_type_id, bot_id, bot_version, locale_id, regionskipResourceInUseCheckDeletes a slot type from a bot locale. If a slot is using the slot type, Amazon Lex throws a ResourceInUseException exception. To avoid the exception, set the skipResourceInUseCheck parameter to true.

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
bot_idstringThe identifier of the bot associated with the slot type.
bot_versionstringThe version of the bot associated with the slot type.
locale_idstringThe identifier of the language and locale that the slot type will be deleted from. The string must match one of the supported locales. For more information, see Supported languages.
regionstringAWS region (default: us-east-1)
slot_type_idstringThe identifier of the slot type to delete.
skipResourceInUseCheckbooleanBy default, the DeleteSlotType operations throws a ResourceInUseException exception if you try to delete a slot type used by a slot. Set the skipResourceInUseCheck parameter to true to skip this check and remove the slot type even if a slot uses it.

SELECT examples

Gets metadata information about a slot type.

SELECT
bot_id,
bot_version,
composite_slot_type_setting,
creation_date_time,
description,
external_source_setting,
last_updated_date_time,
locale_id,
parent_slot_type_signature,
slot_type_id,
slot_type_name,
slot_type_values,
value_selection_setting
FROM aws.lexv2_models.slot_types
WHERE slot_type_id = '{{ slot_type_id }}' -- required
AND bot_id = '{{ bot_id }}' -- required
AND bot_version = '{{ bot_version }}' -- required
AND locale_id = '{{ locale_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a custom slot type To create a custom slot type, specify a name for the slot type and a set of enumeration values, the values that a slot of this type can assume.

INSERT INTO aws.lexv2_models.slot_types (
slotTypeName,
description,
slotTypeValues,
valueSelectionSetting,
parentSlotTypeSignature,
externalSourceSetting,
compositeSlotTypeSetting,
bot_id,
bot_version,
locale_id,
region
)
SELECT
'{{ slotTypeName }}' /* required */,
'{{ description }}',
'{{ slotTypeValues }}',
'{{ valueSelectionSetting }}',
'{{ parentSlotTypeSignature }}',
'{{ externalSourceSetting }}',
'{{ compositeSlotTypeSetting }}',
'{{ bot_id }}',
'{{ bot_version }}',
'{{ locale_id }}',
'{{ region }}'
RETURNING
bot_id,
bot_version,
composite_slot_type_setting,
creation_date_time,
description,
external_source_setting,
locale_id,
parent_slot_type_signature,
slot_type_id,
slot_type_name,
slot_type_values,
value_selection_setting
;

UPDATE examples

Updates the configuration of an existing slot type.

UPDATE aws.lexv2_models.slot_types
SET
slotTypeName = '{{ slotTypeName }}',
description = '{{ description }}',
slotTypeValues = '{{ slotTypeValues }}',
valueSelectionSetting = '{{ valueSelectionSetting }}',
parentSlotTypeSignature = '{{ parentSlotTypeSignature }}',
externalSourceSetting = '{{ externalSourceSetting }}',
compositeSlotTypeSetting = '{{ compositeSlotTypeSetting }}'
WHERE
slot_type_id = '{{ slot_type_id }}' --required
AND bot_id = '{{ bot_id }}' --required
AND bot_version = '{{ bot_version }}' --required
AND locale_id = '{{ locale_id }}' --required
AND region = '{{ region }}' --required
AND slotTypeName = '{{ slotTypeName }}' --required
RETURNING
bot_id,
bot_version,
composite_slot_type_setting,
creation_date_time,
description,
external_source_setting,
last_updated_date_time,
locale_id,
parent_slot_type_signature,
slot_type_id,
slot_type_name,
slot_type_values,
value_selection_setting;

DELETE examples

Deletes a slot type from a bot locale. If a slot is using the slot type, Amazon Lex throws a ResourceInUseException exception. To avoid the exception, set the skipResourceInUseCheck parameter to true.

DELETE FROM aws.lexv2_models.slot_types
WHERE slot_type_id = '{{ slot_type_id }}' --required
AND bot_id = '{{ bot_id }}' --required
AND bot_version = '{{ bot_version }}' --required
AND locale_id = '{{ locale_id }}' --required
AND region = '{{ region }}' --required
AND skipResourceInUseCheck = '{{ skipResourceInUseCheck }}'
;