UpdateIntent - Amazon Lex

UpdateIntent

Updates the settings for an intent.

Request Syntax

PUT /bots/botId/botversions/botVersion/botlocales/localeId/intents/intentId/ HTTP/1.1 Content-type: application/json { "description": "string", "dialogCodeHook": { "enabled": boolean }, "fulfillmentCodeHook": { "enabled": boolean }, "inputContexts": [ { "name": "string" } ], "intentClosingSetting": { "active": boolean, "closingResponse": { "allowInterrupt": boolean, "messageGroups": [ { "message": { "customPayload": { "value": "string" }, "imageResponseCard": { "buttons": [ { "text": "string", "value": "string" } ], "imageUrl": "string", "subtitle": "string", "title": "string" }, "plainTextMessage": { "value": "string" }, "ssmlMessage": { "value": "string" } }, "variations": [ { "customPayload": { "value": "string" }, "imageResponseCard": { "buttons": [ { "text": "string", "value": "string" } ], "imageUrl": "string", "subtitle": "string", "title": "string" }, "plainTextMessage": { "value": "string" }, "ssmlMessage": { "value": "string" } } ] } ] } }, "intentConfirmationSetting": { "active": boolean, "declinationResponse": { "allowInterrupt": boolean, "messageGroups": [ { "message": { "customPayload": { "value": "string" }, "imageResponseCard": { "buttons": [ { "text": "string", "value": "string" } ], "imageUrl": "string", "subtitle": "string", "title": "string" }, "plainTextMessage": { "value": "string" }, "ssmlMessage": { "value": "string" } }, "variations": [ { "customPayload": { "value": "string" }, "imageResponseCard": { "buttons": [ { "text": "string", "value": "string" } ], "imageUrl": "string", "subtitle": "string", "title": "string" }, "plainTextMessage": { "value": "string" }, "ssmlMessage": { "value": "string" } } ] } ] }, "promptSpecification": { "allowInterrupt": boolean, "maxRetries": number, "messageGroups": [ { "message": { "customPayload": { "value": "string" }, "imageResponseCard": { "buttons": [ { "text": "string", "value": "string" } ], "imageUrl": "string", "subtitle": "string", "title": "string" }, "plainTextMessage": { "value": "string" }, "ssmlMessage": { "value": "string" } }, "variations": [ { "customPayload": { "value": "string" }, "imageResponseCard": { "buttons": [ { "text": "string", "value": "string" } ], "imageUrl": "string", "subtitle": "string", "title": "string" }, "plainTextMessage": { "value": "string" }, "ssmlMessage": { "value": "string" } } ] } ] } }, "intentName": "string", "kendraConfiguration": { "kendraIndex": "string", "queryFilterString": "string", "queryFilterStringEnabled": boolean }, "outputContexts": [ { "name": "string", "timeToLiveInSeconds": number, "turnsToLive": number } ], "parentIntentSignature": "string", "sampleUtterances": [ { "utterance": "string" } ], "slotPriorities": [ { "priority": number, "slotId": "string" } ] }

URI Request Parameters

The request uses the following URI parameters.

botId

The identifier of the bot that contains the intent.

Length Constraints: Fixed length of 10.

Pattern: ^[0-9a-zA-Z]+$

Required: Yes

botVersion

The version of the bot that contains the intent. Must be DRAFT.

Length Constraints: Fixed length of 5.

Pattern: ^DRAFT$

Required: Yes

intentId

The unique identifier of the intent to update.

Length Constraints: Fixed length of 10.

Pattern: ^[0-9a-zA-Z]+$

Required: Yes

localeId

The identifier of the language and locale where this intent is used. The string must match one of the supported locales. For more information, see Supported languages.

Required: Yes

Request Body

The request accepts the following data in JSON format.

description

The new description of the intent.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 200.

Required: No

dialogCodeHook

The new Lambda function to use between each turn of the conversation with the bot.

Type: DialogCodeHookSettings object

Required: No

fulfillmentCodeHook

The new Lambda function to call when all of the intents required slots are provided and the intent is ready for fulfillment.

Type: FulfillmentCodeHookSettings object

Required: No

inputContexts

A new list of contexts that must be active in order for Amazon Lex to consider the intent.

Type: Array of InputContext objects

Array Members: Minimum number of 0 items. Maximum number of 5 items.

Required: No

intentClosingSetting

The new response that Amazon Lex sends the user when the intent is closed.

Type: IntentClosingSetting object

Required: No

intentConfirmationSetting

New prompts that Amazon Lex sends to the user to confirm the completion of an intent.

Type: IntentConfirmationSetting object

Required: No

intentName

The new name for the intent.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: ^([0-9a-zA-Z][_-]?)+$

Required: Yes

kendraConfiguration

New configuration settings for connecting to an Amazon Kendra index.

Type: KendraConfiguration object

Required: No

outputContexts

A new list of contexts that Amazon Lex activates when the intent is fulfilled.

Type: Array of OutputContext objects

Array Members: Minimum number of 0 items. Maximum number of 10 items.

Required: No

parentIntentSignature

The signature of the new built-in intent to use as the parent of this intent.

Type: String

Required: No

sampleUtterances

New utterances used to invoke the intent.

Type: Array of SampleUtterance objects

Required: No

slotPriorities

A new list of slots and their priorities that are contained by the intent.

Type: Array of SlotPriority objects

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "botId": "string", "botVersion": "string", "creationDateTime": number, "description": "string", "dialogCodeHook": { "enabled": boolean }, "fulfillmentCodeHook": { "enabled": boolean }, "inputContexts": [ { "name": "string" } ], "intentClosingSetting": { "active": boolean, "closingResponse": { "allowInterrupt": boolean, "messageGroups": [ { "message": { "customPayload": { "value": "string" }, "imageResponseCard": { "buttons": [ { "text": "string", "value": "string" } ], "imageUrl": "string", "subtitle": "string", "title": "string" }, "plainTextMessage": { "value": "string" }, "ssmlMessage": { "value": "string" } }, "variations": [ { "customPayload": { "value": "string" }, "imageResponseCard": { "buttons": [ { "text": "string", "value": "string" } ], "imageUrl": "string", "subtitle": "string", "title": "string" }, "plainTextMessage": { "value": "string" }, "ssmlMessage": { "value": "string" } } ] } ] } }, "intentConfirmationSetting": { "active": boolean, "declinationResponse": { "allowInterrupt": boolean, "messageGroups": [ { "message": { "customPayload": { "value": "string" }, "imageResponseCard": { "buttons": [ { "text": "string", "value": "string" } ], "imageUrl": "string", "subtitle": "string", "title": "string" }, "plainTextMessage": { "value": "string" }, "ssmlMessage": { "value": "string" } }, "variations": [ { "customPayload": { "value": "string" }, "imageResponseCard": { "buttons": [ { "text": "string", "value": "string" } ], "imageUrl": "string", "subtitle": "string", "title": "string" }, "plainTextMessage": { "value": "string" }, "ssmlMessage": { "value": "string" } } ] } ] }, "promptSpecification": { "allowInterrupt": boolean, "maxRetries": number, "messageGroups": [ { "message": { "customPayload": { "value": "string" }, "imageResponseCard": { "buttons": [ { "text": "string", "value": "string" } ], "imageUrl": "string", "subtitle": "string", "title": "string" }, "plainTextMessage": { "value": "string" }, "ssmlMessage": { "value": "string" } }, "variations": [ { "customPayload": { "value": "string" }, "imageResponseCard": { "buttons": [ { "text": "string", "value": "string" } ], "imageUrl": "string", "subtitle": "string", "title": "string" }, "plainTextMessage": { "value": "string" }, "ssmlMessage": { "value": "string" } } ] } ] } }, "intentId": "string", "intentName": "string", "kendraConfiguration": { "kendraIndex": "string", "queryFilterString": "string", "queryFilterStringEnabled": boolean }, "lastUpdatedDateTime": number, "localeId": "string", "outputContexts": [ { "name": "string", "timeToLiveInSeconds": number, "turnsToLive": number } ], "parentIntentSignature": "string", "sampleUtterances": [ { "utterance": "string" } ], "slotPriorities": [ { "priority": number, "slotId": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

botId

The identifier of the bot that contains the intent.

Type: String

Length Constraints: Fixed length of 10.

Pattern: ^[0-9a-zA-Z]+$

botVersion

The version of the bot that contains the intent. Will always be DRAFT.

Type: String

Length Constraints: Fixed length of 5.

Pattern: ^DRAFT$

creationDateTime

A timestamp of when the intent was created.

Type: Timestamp

description

The updated description of the intent.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 200.

dialogCodeHook

The updated Lambda function called during each turn of the conversation with the user.

Type: DialogCodeHookSettings object

fulfillmentCodeHook

The updated Lambda function called when the intent is ready for fulfillment.

Type: FulfillmentCodeHookSettings object

inputContexts

The updated list of contexts that must be active for the intent to be considered by Amazon Lex.

Type: Array of InputContext objects

Array Members: Minimum number of 0 items. Maximum number of 5 items.

intentClosingSetting

The updated response that Amazon Lex sends the user when the intent is closed.

Type: IntentClosingSetting object

intentConfirmationSetting

The updated prompts that Amazon Lex sends to the user to confirm the completion of an intent.

Type: IntentConfirmationSetting object

intentId

The identifier of the intent that was updated.

Type: String

Length Constraints: Fixed length of 10.

Pattern: ^[0-9a-zA-Z]+$

intentName

The updated name of the intent.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: ^([0-9a-zA-Z][_-]?)+$

kendraConfiguration

The updated configuration for connecting to an Amazon Kendra index with the AMAZON.KendraSearchIntent intent.

Type: KendraConfiguration object

lastUpdatedDateTime

A timestamp of the last time that the intent was modified.

Type: Timestamp

localeId

The updated language and locale of the intent.

Type: String

outputContexts

The updated list of contexts that Amazon Lex activates when the intent is fulfilled.

Type: Array of OutputContext objects

Array Members: Minimum number of 0 items. Maximum number of 10 items.

parentIntentSignature

The updated built-in intent that is the parent of this intent.

Type: String

sampleUtterances

The updated list of sample utterances for the intent.

Type: Array of SampleUtterance objects

slotPriorities

The updated list of slots and their priorities that are elicited from the user for the intent.

Type: Array of SlotPriority objects

Errors

For information about the errors that are common to all actions, see Common Errors.

ConflictException

The action that you tried to perform couldn't be completed because the resource is in a conflicting state. For example, deleting a bot that is in the CREATING state. Try your request again.

HTTP Status Code: 409

InternalServerException

The service encountered an unexpected condition. Try your request again.

HTTP Status Code: 500

PreconditionFailedException

Your request couldn't be completed because one or more request fields aren't valid. Check the fields in your request and try again.

HTTP Status Code: 412

ServiceQuotaExceededException

You have reached a quota for your bot.

HTTP Status Code: 402

ThrottlingException

Your request rate is too high. Reduce the frequency of requests.

HTTP Status Code: 429

ValidationException

One of the input parameters in your request isn't valid. Check the parameters and try your request again.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: