slot_types
Creates, updates, deletes, gets or lists a slot_types resource.
Overview
| Name | slot_types |
| Type | Resource |
| Id | aws.lexv2_models.slot_types |
Fields
The following fields are returned by SELECT queries:
- describe_slot_type
- list_slot_types
| Name | Datatype | Description |
|---|---|---|
bot_id | string | The identifier of the bot associated with the slot type. (pattern: <code>^[0-9a-zA-Z]+$</code>) |
bot_version | string | The version of the bot associated with the slot type. (pattern: <code>^(DRAFT|[0-9]+)$</code>) |
composite_slot_type_setting | object | A composite slot is a combination of two or more slots that capture multiple pieces of information in a single user input. |
creation_date_time | string (date-time) | A timestamp of the date and time that the slot type was created. |
description | string | The description specified for the slot type. |
external_source_setting | object | Provides information about the external source of the slot type's definition. |
last_updated_date_time | string (date-time) | A timestamp of the date and time that the slot type was last updated. |
locale_id | string | The language and locale specified for the slot type. |
parent_slot_type_signature | string | The built in slot type used as a parent to this slot type. |
slot_type_id | string | The unique identifier for the slot type. (pattern: <code>^[0-9a-zA-Z]+$</code>) |
slot_type_name | string | The name specified for the slot type. (pattern: <code>^([0-9a-zA-Z][_-]?){1,100}$</code>) |
slot_type_values | array | The values that the slot type can take. Includes any synonyms for the slot type values. |
value_selection_setting | object | Contains settings used by Amazon Lex to select a slot value. |
| Name | Datatype | Description |
|---|---|---|
bot_id | string | The identifier of the bot that contains the slot types. (pattern: <code>^[0-9a-zA-Z]+$</code>) |
bot_version | string | The version of the bot that contains the slot types. (pattern: <code>^(DRAFT|[0-9]+)$</code>) |
locale_id | string | The language and local of the slot types in the list. |
next_token | string | A token that indicates whether there are more results to return in a response to the ListSlotTypes operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListSlotTypes operation request to get the next page of results. |
slot_type_summaries | array | Summary information for the slot types 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 slot types 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_type | select | slot_type_id, bot_id, bot_version, locale_id, region | Gets metadata information about a slot type. | |
list_slot_types | select | bot_id, bot_version, locale_id, region | Gets a list of slot types that match the specified criteria. | |
create_slot_type | insert | bot_id, bot_version, locale_id, region, slotTypeName | 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. | |
update_slot_type | update | slot_type_id, bot_id, bot_version, locale_id, region, slotTypeName | Updates the configuration of an existing slot type. | |
delete_slot_type | delete | slot_type_id, bot_id, bot_version, locale_id, region | skipResourceInUseCheck | 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. |
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 type. |
bot_version | string | The version of the bot associated with the slot type. |
locale_id | string | The 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. |
region | string | AWS region (default: us-east-1) |
slot_type_id | string | The identifier of the slot type to delete. |
skipResourceInUseCheck | boolean | By 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
- describe_slot_type
- list_slot_types
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
;
Gets a list of slot types that match the specified criteria.
SELECT
bot_id,
bot_version,
locale_id,
next_token,
slot_type_summaries
FROM aws.lexv2_models.slot_types
WHERE bot_id = '{{ bot_id }}' -- required
AND bot_version = '{{ bot_version }}' -- required
AND locale_id = '{{ locale_id }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_slot_type
- Manifest
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
;
# Description fields are for documentation purposes
- name: slot_types
props:
- name: bot_id
value: "{{ bot_id }}"
description: Required parameter for the slot_types resource.
- name: bot_version
value: "{{ bot_version }}"
description: Required parameter for the slot_types resource.
- name: locale_id
value: "{{ locale_id }}"
description: Required parameter for the slot_types resource.
- name: region
value: "{{ region }}"
description: Required parameter for the slot_types resource.
- name: slotTypeName
value: "{{ slotTypeName }}"
- name: description
value: "{{ description }}"
- name: slotTypeValues
value:
- sampleValue:
value: "{{ value }}"
synonyms: "{{ synonyms }}"
- name: valueSelectionSetting
description: |
Contains settings used by Amazon Lex to select a slot value.
value:
resolutionStrategy: "{{ resolutionStrategy }}"
regexFilter:
pattern_: "{{ pattern_ }}"
advancedRecognitionSetting:
audioRecognitionStrategy: "{{ audioRecognitionStrategy }}"
- name: parentSlotTypeSignature
value: "{{ parentSlotTypeSignature }}"
- name: externalSourceSetting
description: |
Provides information about the external source of the slot type's definition.
value:
grammarSlotTypeSetting:
source:
s3BucketName: "{{ s3BucketName }}"
s3ObjectKey: "{{ s3ObjectKey }}"
kmsKeyArn: "{{ kmsKeyArn }}"
- name: compositeSlotTypeSetting
description: |
A composite slot is a combination of two or more slots that capture multiple pieces of information in a single user input.
value:
subSlots:
- name: "{{ name }}"
slotTypeId: "{{ slotTypeId }}"
UPDATE examples
- update_slot_type
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
- delete_slot_type
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 }}'
;