slots
Creates, updates, deletes, gets or lists a slots resource.
Overview
| Name | slots |
| Type | Resource |
| Id | aws.lexv2_models.slots |
Fields
The following fields are returned by SELECT queries:
- describe_slot
- list_slots
| Name | Datatype | Description |
|---|---|---|
bot_id | string | The identifier of the bot associated with the slot. (pattern: <code>^[0-9a-zA-Z]+$</code>) |
bot_version | string | The version of the bot associated with the slot. (pattern: <code>^(DRAFT|[0-9]+)$</code>) |
creation_date_time | string (date-time) | A timestamp of the date and time that the slot was created. |
description | string | The description specified for the slot. |
intent_id | string | The identifier of the intent associated with the slot. (pattern: <code>^[0-9a-zA-Z]+$</code>) |
last_updated_date_time | string (date-time) | A timestamp of the date and time that the slot was last updated. |
locale_id | string | The language and locale specified for the slot. |
multiple_values_setting | object | Indicates whether a slot can return multiple values. |
obfuscation_setting | object | Determines whether Amazon Lex obscures slot values in conversation logs. |
slot_id | string | The unique identifier generated for the slot. (pattern: <code>^[0-9a-zA-Z]+$</code>) |
slot_name | string | The name specified for the slot. (pattern: <code>^([0-9a-zA-Z][_-]?){1,100}$</code>) |
slot_type_id | string | The 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_setting | object | Specifications for the constituent sub slots and the expression for the composite slot. |
value_elicitation_setting | object | Specifies the elicitation setting details eliciting a slot. |
| Name | Datatype | Description |
|---|---|---|
bot_id | string | The identifier of the bot that contains the slots. (pattern: <code>^[0-9a-zA-Z]+$</code>) |
bot_version | string | The version of the bot that contains the slots. (pattern: <code>^(DRAFT|[0-9]+)$</code>) |
intent_id | string | The identifier of the intent that contains the slots. (pattern: <code>^[0-9a-zA-Z]+$</code>) |
locale_id | string | The language and locale of the slots in the list. |
next_token | string | A token that indicates whether there are more results to return in a response to the ListSlots operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListSlots operation request to get the next page of results. |
slot_summaries | array | Summary information for the slots that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more slots available, the nextToken field contains a token to get the next page of results. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_slot | select | slot_id, bot_id, bot_version, locale_id, intent_id, region | Gets metadata information about a slot. | |
list_slots | select | bot_id, bot_version, locale_id, intent_id, region | Gets a list of slots that match the specified criteria. | |
create_slot | insert | bot_id, bot_version, locale_id, intent_id, region, slotName, valueElicitationSetting | 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. | |
update_slot | update | slot_id, bot_id, bot_version, locale_id, intent_id, region, slotName, valueElicitationSetting | Updates the settings for a slot. | |
delete_slot | delete | slot_id, bot_id, bot_version, locale_id, intent_id, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
bot_id | string | The identifier of the bot associated with the slot to delete. |
bot_version | string | The version of the bot associated with the slot to delete. |
intent_id | string | The identifier of the intent associated with the slot. |
locale_id | string | The 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. |
region | string | AWS region (default: us-east-1) |
slot_id | string | The identifier of the slot to delete. |
SELECT examples
- describe_slot
- list_slots
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
;
Gets a list of slots that match the specified criteria.
SELECT
bot_id,
bot_version,
intent_id,
locale_id,
next_token,
slot_summaries
FROM aws.lexv2_models.slots
WHERE 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
- create_slot
- Manifest
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
;
# Description fields are for documentation purposes
- name: slots
props:
- name: bot_id
value: "{{ bot_id }}"
description: Required parameter for the slots resource.
- name: bot_version
value: "{{ bot_version }}"
description: Required parameter for the slots resource.
- name: locale_id
value: "{{ locale_id }}"
description: Required parameter for the slots resource.
- name: intent_id
value: "{{ intent_id }}"
description: Required parameter for the slots resource.
- name: region
value: "{{ region }}"
description: Required parameter for the slots resource.
- name: slotName
value: "{{ slotName }}"
- name: description
value: "{{ description }}"
- name: slotTypeId
value: "{{ slotTypeId }}"
- name: valueElicitationSetting
description: |
Specifies the elicitation setting details eliciting a slot.
value:
defaultValueSpecification:
defaultValueList:
- defaultValue: "{{ defaultValue }}"
slotConstraint: "{{ slotConstraint }}"
promptSpecification:
messageGroups:
- message:
plainTextMessage:
value: "{{ value }}"
customPayload:
value: "{{ value }}"
ssmlMessage:
value: "{{ value }}"
imageResponseCard:
title_: "{{ title_ }}"
subtitle: "{{ subtitle }}"
imageUrl: "{{ imageUrl }}"
buttons: "{{ buttons }}"
variations: "{{ variations }}"
maxRetries: {{ maxRetries }}
allowInterrupt: {{ allowInterrupt }}
messageSelectionStrategy: "{{ messageSelectionStrategy }}"
promptAttemptsSpecification: "{{ promptAttemptsSpecification }}"
sampleUtterances:
- utterance: "{{ utterance }}"
waitAndContinueSpecification:
waitingResponse:
messageGroups:
- message:
plainTextMessage: "{{ plainTextMessage }}"
customPayload: "{{ customPayload }}"
ssmlMessage: "{{ ssmlMessage }}"
imageResponseCard: "{{ imageResponseCard }}"
variations: "{{ variations }}"
allowInterrupt: {{ allowInterrupt }}
continueResponse:
messageGroups:
- message:
plainTextMessage: "{{ plainTextMessage }}"
customPayload: "{{ customPayload }}"
ssmlMessage: "{{ ssmlMessage }}"
imageResponseCard: "{{ imageResponseCard }}"
variations: "{{ variations }}"
allowInterrupt: {{ allowInterrupt }}
stillWaitingResponse:
messageGroups:
- message:
plainTextMessage: "{{ plainTextMessage }}"
customPayload: "{{ customPayload }}"
ssmlMessage: "{{ ssmlMessage }}"
imageResponseCard: "{{ imageResponseCard }}"
variations: "{{ variations }}"
frequencyInSeconds: {{ frequencyInSeconds }}
timeoutInSeconds: {{ timeoutInSeconds }}
allowInterrupt: {{ allowInterrupt }}
active: {{ active }}
slotCaptureSetting:
captureResponse:
messageGroups:
- message:
plainTextMessage: "{{ plainTextMessage }}"
customPayload: "{{ customPayload }}"
ssmlMessage: "{{ ssmlMessage }}"
imageResponseCard: "{{ imageResponseCard }}"
variations: "{{ variations }}"
allowInterrupt: {{ allowInterrupt }}
captureNextStep:
dialogAction:
type_: "{{ type_ }}"
slotToElicit: "{{ slotToElicit }}"
suppressNextMessage: {{ suppressNextMessage }}
intent:
name: "{{ name }}"
slots: "{{ slots }}"
sessionAttributes: "{{ sessionAttributes }}"
captureConditional:
active: {{ active }}
conditionalBranches:
- name: "{{ name }}"
condition:
expressionString: "{{ expressionString }}"
nextStep:
dialogAction: "{{ dialogAction }}"
intent: "{{ intent }}"
sessionAttributes: "{{ sessionAttributes }}"
response:
messageGroups: "{{ messageGroups }}"
allowInterrupt: {{ allowInterrupt }}
defaultBranch:
nextStep:
dialogAction: "{{ dialogAction }}"
intent: "{{ intent }}"
sessionAttributes: "{{ sessionAttributes }}"
response:
messageGroups: "{{ messageGroups }}"
allowInterrupt: {{ allowInterrupt }}
failureResponse:
messageGroups:
- message:
plainTextMessage: "{{ plainTextMessage }}"
customPayload: "{{ customPayload }}"
ssmlMessage: "{{ ssmlMessage }}"
imageResponseCard: "{{ imageResponseCard }}"
variations: "{{ variations }}"
allowInterrupt: {{ allowInterrupt }}
failureNextStep:
dialogAction:
type_: "{{ type_ }}"
slotToElicit: "{{ slotToElicit }}"
suppressNextMessage: {{ suppressNextMessage }}
intent:
name: "{{ name }}"
slots: "{{ slots }}"
sessionAttributes: "{{ sessionAttributes }}"
failureConditional:
active: {{ active }}
conditionalBranches:
- name: "{{ name }}"
condition:
expressionString: "{{ expressionString }}"
nextStep:
dialogAction: "{{ dialogAction }}"
intent: "{{ intent }}"
sessionAttributes: "{{ sessionAttributes }}"
response:
messageGroups: "{{ messageGroups }}"
allowInterrupt: {{ allowInterrupt }}
defaultBranch:
nextStep:
dialogAction: "{{ dialogAction }}"
intent: "{{ intent }}"
sessionAttributes: "{{ sessionAttributes }}"
response:
messageGroups: "{{ messageGroups }}"
allowInterrupt: {{ allowInterrupt }}
codeHook:
enableCodeHookInvocation: {{ enableCodeHookInvocation }}
active: {{ active }}
invocationLabel: "{{ invocationLabel }}"
postCodeHookSpecification:
successResponse:
messageGroups: "{{ messageGroups }}"
allowInterrupt: {{ allowInterrupt }}
successNextStep:
dialogAction: "{{ dialogAction }}"
intent: "{{ intent }}"
sessionAttributes: "{{ sessionAttributes }}"
successConditional:
active: {{ active }}
conditionalBranches: "{{ conditionalBranches }}"
defaultBranch: "{{ defaultBranch }}"
failureResponse:
messageGroups: "{{ messageGroups }}"
allowInterrupt: {{ allowInterrupt }}
failureNextStep:
dialogAction: "{{ dialogAction }}"
intent: "{{ intent }}"
sessionAttributes: "{{ sessionAttributes }}"
failureConditional:
active: {{ active }}
conditionalBranches: "{{ conditionalBranches }}"
defaultBranch: "{{ defaultBranch }}"
timeoutResponse:
messageGroups: "{{ messageGroups }}"
allowInterrupt: {{ allowInterrupt }}
timeoutNextStep:
dialogAction: "{{ dialogAction }}"
intent: "{{ intent }}"
sessionAttributes: "{{ sessionAttributes }}"
timeoutConditional:
active: {{ active }}
conditionalBranches: "{{ conditionalBranches }}"
defaultBranch: "{{ defaultBranch }}"
elicitationCodeHook:
enableCodeHookInvocation: {{ enableCodeHookInvocation }}
invocationLabel: "{{ invocationLabel }}"
slotResolutionSetting:
slotResolutionStrategy: "{{ slotResolutionStrategy }}"
- name: obfuscationSetting
description: |
Determines whether Amazon Lex obscures slot values in conversation logs.
value:
obfuscationSettingType: "{{ obfuscationSettingType }}"
- name: multipleValuesSetting
description: |
Indicates whether a slot can return multiple values.
value:
allowMultipleValues: {{ allowMultipleValues }}
- name: subSlotSetting
description: |
Specifications for the constituent sub slots and the expression for the composite slot.
value:
expression: "{{ expression }}"
slotSpecifications: "{{ slotSpecifications }}"
UPDATE examples
- update_slot
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
- delete_slot
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
;