Skip to main content

intents

Creates, updates, deletes, gets or lists an intents resource.

Overview

Nameintents
TypeResource
Idaws.lexv2_models.intents

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
bot_idstringThe identifier of the bot associated with the intent. (pattern: <code>^[0-9a-zA-Z]+$</code>)
bot_versionstringThe version of the bot associated with the intent. (pattern: <code>^DRAFT$</code>)
creation_date_timestring (date-time)A timestamp of the date and time that the intent was created.
descriptionstringThe description of the intent.
dialog_code_hookobjectSettings that determine the Lambda function that Amazon Lex uses for processing user responses.
fulfillment_code_hookobjectDetermines if a Lambda function should be invoked for a specific intent.
initial_response_settingobjectConfiguration setting for a response sent to the user before Amazon Lex starts eliciting slots.
input_contextsarrayA list of contexts that must be active for the intent to be considered for sending to the user.
intent_closing_settingobjectProvides a statement the Amazon Lex conveys to the user when the intent is successfully fulfilled.
intent_confirmation_settingobjectProvides a prompt for making sure that the user is ready for the intent to be fulfilled.
intent_display_namestringThe display name specified for the intent.
intent_idstringThe unique identifier assigned to the intent when it was created. (pattern: <code>^[0-9a-zA-Z]+$</code>)
intent_namestringThe name specified for the intent. (pattern: <code>^([0-9a-zA-Z][_-]?){1,100}$</code>)
kendra_configurationobjectProvides configuration information for the AMAZON.KendraSearchIntent intent. When you use this intent, Amazon Lex searches the specified Amazon Kendra index and returns documents from the index that match the user's utterance.
last_updated_date_timestring (date-time)A timestamp of the date and time that the intent was last updated.
locale_idstringThe language and locale specified for the intent.
output_contextsarrayA list of contexts that are activated when the intent is fulfilled.
parent_intent_signaturestringThe identifier of the built-in intent that this intent is derived from, if any.
q_in_connect_intent_configurationobjectThe configuration details of the Qinconnect intent.
qn_a_intent_configurationobjectDetails about the the configuration of the built-in Amazon.QnAIntent.
sample_utterancesarrayUser utterances that trigger this intent.
slot_prioritiesarrayThe list that determines the priority that slots should be elicited from the user.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_intentselectintent_id, bot_id, bot_version, locale_id, regionReturns metadata about an intent.
list_intentsselectbot_id, bot_version, locale_id, regionGet a list of intents that meet the specified criteria.
create_intentinsertbot_id, bot_version, locale_id, region, intentNameCreates an intent. To define the interaction between the user and your bot, you define one or more intents. For example, for a pizza ordering bot you would create an OrderPizza intent. When you create an intent, you must provide a name. You can optionally provide the following: Sample utterances. For example, "I want to order a pizza" and "Can I order a pizza." You can't provide utterances for built-in intents. Information to be gathered. You specify slots for the information that you bot requests from the user. You can specify standard slot types, such as date and time, or custom slot types for your application. How the intent is fulfilled. You can provide a Lambda function or configure the intent to return the intent information to your client application. If you use a Lambda function, Amazon Lex invokes the function when all of the intent information is available. A confirmation prompt to send to the user to confirm an intent. For example, "Shall I order your pizza?" A conclusion statement to send to the user after the intent is fulfilled. For example, "I ordered your pizza." A follow-up prompt that asks the user for additional activity. For example, "Do you want a drink with your pizza?"
update_intentupdateintent_id, bot_id, bot_version, locale_id, region, intentNameUpdates the settings for an intent.
delete_intentdeleteintent_id, bot_id, bot_version, locale_id, regionRemoves the specified intent. Deleting an intent also deletes the slots associated with the 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 intent.
bot_versionstringThe version of the bot associated with the intent.
intent_idstringThe unique identifier of the intent to delete.
locale_idstringThe identifier of the language and locale where the bot will be deleted. The string must match one of the supported locales. For more information, see Supported languages.
regionstringAWS region (default: us-east-1)

SELECT examples

Returns metadata about an intent.

SELECT
bot_id,
bot_version,
creation_date_time,
description,
dialog_code_hook,
fulfillment_code_hook,
initial_response_setting,
input_contexts,
intent_closing_setting,
intent_confirmation_setting,
intent_display_name,
intent_id,
intent_name,
kendra_configuration,
last_updated_date_time,
locale_id,
output_contexts,
parent_intent_signature,
q_in_connect_intent_configuration,
qn_a_intent_configuration,
sample_utterances,
slot_priorities
FROM aws.lexv2_models.intents
WHERE intent_id = '{{ intent_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 an intent. To define the interaction between the user and your bot, you define one or more intents. For example, for a pizza ordering bot you would create an OrderPizza intent. When you create an intent, you must provide a name. You can optionally provide the following: Sample utterances. For example, "I want to order a pizza" and "Can I order a pizza." You can't provide utterances for built-in intents. Information to be gathered. You specify slots for the information that you bot requests from the user. You can specify standard slot types, such as date and time, or custom slot types for your application. How the intent is fulfilled. You can provide a Lambda function or configure the intent to return the intent information to your client application. If you use a Lambda function, Amazon Lex invokes the function when all of the intent information is available. A confirmation prompt to send to the user to confirm an intent. For example, "Shall I order your pizza?" A conclusion statement to send to the user after the intent is fulfilled. For example, "I ordered your pizza." A follow-up prompt that asks the user for additional activity. For example, "Do you want a drink with your pizza?"

INSERT INTO aws.lexv2_models.intents (
intentName,
intentDisplayName,
description,
parentIntentSignature,
sampleUtterances,
dialogCodeHook,
fulfillmentCodeHook,
intentConfirmationSetting,
intentClosingSetting,
inputContexts,
outputContexts,
kendraConfiguration,
initialResponseSetting,
qnAIntentConfiguration,
qInConnectIntentConfiguration,
bot_id,
bot_version,
locale_id,
region
)
SELECT
'{{ intentName }}' /* required */,
'{{ intentDisplayName }}',
'{{ description }}',
'{{ parentIntentSignature }}',
'{{ sampleUtterances }}',
'{{ dialogCodeHook }}',
'{{ fulfillmentCodeHook }}',
'{{ intentConfirmationSetting }}',
'{{ intentClosingSetting }}',
'{{ inputContexts }}',
'{{ outputContexts }}',
'{{ kendraConfiguration }}',
'{{ initialResponseSetting }}',
'{{ qnAIntentConfiguration }}',
'{{ qInConnectIntentConfiguration }}',
'{{ bot_id }}',
'{{ bot_version }}',
'{{ locale_id }}',
'{{ region }}'
RETURNING
bot_id,
bot_version,
creation_date_time,
description,
dialog_code_hook,
fulfillment_code_hook,
initial_response_setting,
input_contexts,
intent_closing_setting,
intent_confirmation_setting,
intent_display_name,
intent_id,
intent_name,
kendra_configuration,
locale_id,
output_contexts,
parent_intent_signature,
q_in_connect_intent_configuration,
qn_a_intent_configuration,
sample_utterances
;

UPDATE examples

Updates the settings for an intent.

UPDATE aws.lexv2_models.intents
SET
intentName = '{{ intentName }}',
intentDisplayName = '{{ intentDisplayName }}',
description = '{{ description }}',
parentIntentSignature = '{{ parentIntentSignature }}',
sampleUtterances = '{{ sampleUtterances }}',
dialogCodeHook = '{{ dialogCodeHook }}',
fulfillmentCodeHook = '{{ fulfillmentCodeHook }}',
slotPriorities = '{{ slotPriorities }}',
intentConfirmationSetting = '{{ intentConfirmationSetting }}',
intentClosingSetting = '{{ intentClosingSetting }}',
inputContexts = '{{ inputContexts }}',
outputContexts = '{{ outputContexts }}',
kendraConfiguration = '{{ kendraConfiguration }}',
initialResponseSetting = '{{ initialResponseSetting }}',
qnAIntentConfiguration = '{{ qnAIntentConfiguration }}',
qInConnectIntentConfiguration = '{{ qInConnectIntentConfiguration }}'
WHERE
intent_id = '{{ intent_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 intentName = '{{ intentName }}' --required
RETURNING
bot_id,
bot_version,
creation_date_time,
description,
dialog_code_hook,
fulfillment_code_hook,
initial_response_setting,
input_contexts,
intent_closing_setting,
intent_confirmation_setting,
intent_display_name,
intent_id,
intent_name,
kendra_configuration,
last_updated_date_time,
locale_id,
output_contexts,
parent_intent_signature,
q_in_connect_intent_configuration,
qn_a_intent_configuration,
sample_utterances,
slot_priorities;

DELETE examples

Removes the specified intent. Deleting an intent also deletes the slots associated with the intent.

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