Skip to main content

slots

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

Overview

Nameslots
TypeResource
Idaws.lexv2_models.slots

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
bot_idstringThe identifier of the bot associated with the slot. (pattern: <code>^[0-9a-zA-Z]+$</code>)
bot_versionstringThe version of the bot associated with the slot. (pattern: <code>^(DRAFT|[0-9]+)$</code>)
creation_date_timestring (date-time)A timestamp of the date and time that the slot was created.
descriptionstringThe description specified for the slot.
intent_idstringThe identifier of the intent associated with the slot. (pattern: <code>^[0-9a-zA-Z]+$</code>)
last_updated_date_timestring (date-time)A timestamp of the date and time that the slot was last updated.
locale_idstringThe language and locale specified for the slot.
multiple_values_settingobjectIndicates whether a slot can return multiple values.
obfuscation_settingobjectDetermines whether Amazon Lex obscures slot values in conversation logs.
slot_idstringThe unique identifier generated for the slot. (pattern: <code>^[0-9a-zA-Z]+$</code>)
slot_namestringThe name specified for the slot. (pattern: <code>^([0-9a-zA-Z][_-]?){1,100}$</code>)
slot_type_idstringThe identifier of the slot type that determines the values entered into the slot. (pattern: <code>^((AMAZON.)[a-zA-Z_]+?|[0-9a-zA-Z]+)$</code>)
sub_slot_settingobjectSpecifications for the constituent sub slots and the expression for the composite slot.
value_elicitation_settingobjectSpecifies the elicitation setting details eliciting a slot.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_slotselectslot_id, bot_id, bot_version, locale_id, intent_id, regionGets metadata information about a slot.
list_slotsselectbot_id, bot_version, locale_id, intent_id, regionGets a list of slots that match the specified criteria.
create_slotinsertbot_id, bot_version, locale_id, intent_id, region, slotName, valueElicitationSettingCreates a slot in an intent. A slot is a variable needed to fulfill an intent. For example, an OrderPizza intent might need slots for size, crust, and number of pizzas. For each slot, you define one or more utterances that Amazon Lex uses to elicit a response from the user.
update_slotupdateslot_id, bot_id, bot_version, locale_id, intent_id, region, slotName, valueElicitationSettingUpdates the settings for a slot.
delete_slotdeleteslot_id, bot_id, bot_version, locale_id, intent_id, regionDeletes the specified slot from an intent.

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 to delete.
bot_versionstringThe version of the bot associated with the slot to delete.
intent_idstringThe identifier of the intent associated with the slot.
locale_idstringThe identifier of the language and locale that the slot 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_idstringThe identifier of the slot to delete.

SELECT examples

Gets metadata information about a slot.

SELECT
bot_id,
bot_version,
creation_date_time,
description,
intent_id,
last_updated_date_time,
locale_id,
multiple_values_setting,
obfuscation_setting,
slot_id,
slot_name,
slot_type_id,
sub_slot_setting,
value_elicitation_setting
FROM aws.lexv2_models.slots
WHERE slot_id = '{{ slot_id }}' -- required
AND bot_id = '{{ bot_id }}' -- required
AND bot_version = '{{ bot_version }}' -- required
AND locale_id = '{{ locale_id }}' -- required
AND intent_id = '{{ intent_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a slot in an intent. A slot is a variable needed to fulfill an intent. For example, an OrderPizza intent might need slots for size, crust, and number of pizzas. For each slot, you define one or more utterances that Amazon Lex uses to elicit a response from the user.

INSERT INTO aws.lexv2_models.slots (
slotName,
description,
slotTypeId,
valueElicitationSetting,
obfuscationSetting,
multipleValuesSetting,
subSlotSetting,
bot_id,
bot_version,
locale_id,
intent_id,
region
)
SELECT
'{{ slotName }}' /* required */,
'{{ description }}',
'{{ slotTypeId }}',
'{{ valueElicitationSetting }}' /* required */,
'{{ obfuscationSetting }}',
'{{ multipleValuesSetting }}',
'{{ subSlotSetting }}',
'{{ bot_id }}',
'{{ bot_version }}',
'{{ locale_id }}',
'{{ intent_id }}',
'{{ region }}'
RETURNING
bot_id,
bot_version,
creation_date_time,
description,
intent_id,
locale_id,
multiple_values_setting,
obfuscation_setting,
slot_id,
slot_name,
slot_type_id,
sub_slot_setting,
value_elicitation_setting
;

UPDATE examples

Updates the settings for a slot.

UPDATE aws.lexv2_models.slots
SET
slotName = '{{ slotName }}',
description = '{{ description }}',
slotTypeId = '{{ slotTypeId }}',
valueElicitationSetting = '{{ valueElicitationSetting }}',
obfuscationSetting = '{{ obfuscationSetting }}',
multipleValuesSetting = '{{ multipleValuesSetting }}',
subSlotSetting = '{{ subSlotSetting }}'
WHERE
slot_id = '{{ slot_id }}' --required
AND bot_id = '{{ bot_id }}' --required
AND bot_version = '{{ bot_version }}' --required
AND locale_id = '{{ locale_id }}' --required
AND intent_id = '{{ intent_id }}' --required
AND region = '{{ region }}' --required
AND slotName = '{{ slotName }}' --required
AND valueElicitationSetting = '{{ valueElicitationSetting }}' --required
RETURNING
bot_id,
bot_version,
creation_date_time,
description,
intent_id,
last_updated_date_time,
locale_id,
multiple_values_setting,
obfuscation_setting,
slot_id,
slot_name,
slot_type_id,
sub_slot_setting,
value_elicitation_setting;

DELETE examples

Deletes the specified slot from an intent.

DELETE FROM aws.lexv2_models.slots
WHERE slot_id = '{{ slot_id }}' --required
AND bot_id = '{{ bot_id }}' --required
AND bot_version = '{{ bot_version }}' --required
AND locale_id = '{{ locale_id }}' --required
AND intent_id = '{{ intent_id }}' --required
AND region = '{{ region }}' --required
;