UpdateSlot - Amazon Lex

UpdateSlot

Updates the settings for a slot.

Request Syntax

PUT /bots/botId/botversions/botVersion/botlocales/localeId/intents/intentId/slots/slotId/ HTTP/1.1 Content-type: application/json { "description": "string", "obfuscationSetting": { "obfuscationSettingType": "string" }, "slotName": "string", "slotTypeId": "string", "valueElicitationSetting": { "defaultValueSpecification": { "defaultValueList": [ { "defaultValue": "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" } } ] } ] }, "sampleUtterances": [ { "utterance": "string" } ], "slotConstraint": "string", "waitAndContinueSpecification": { "continueResponse": { "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" } } ] } ] }, "stillWaitingResponse": { "allowInterrupt": boolean, "frequencyInSeconds": 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" } } ] } ], "timeoutInSeconds": number }, "waitingResponse": { "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" } } ] } ] } } } }

URI Request Parameters

The request uses the following URI parameters.

botId

The unique identifier of the bot that contains the slot.

Length Constraints: Fixed length of 10.

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

Required: Yes

botVersion

The version of the bot that contains the slot. Must always be DRAFT.

Length Constraints: Fixed length of 5.

Pattern: ^DRAFT$

Required: Yes

intentId

The identifier of the intent that contains the slot.

Length Constraints: Fixed length of 10.

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

Required: Yes

localeId

The identifier of the language and locale that contains the slot. The string must match one of the supported locales. For more information, see Supported languages.

Required: Yes

slotId

The unique identifier for the slot to update.

Length Constraints: Fixed length of 10.

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

Required: Yes

Request Body

The request accepts the following data in JSON format.

description

The new description for the slot.

Type: String

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

Required: No

obfuscationSetting

New settings that determine how slot values are formatted in Amazon CloudWatch logs.

Type: ObfuscationSetting object

Required: No

slotName

The new name for the slot.

Type: String

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

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

Required: Yes

slotTypeId

The unique identifier of the new slot type to associate with this slot.

Type: String

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

Pattern: ^((AMAZON\.)[a-zA-Z_]+?|[0-9a-zA-Z]+)$

Required: Yes

valueElicitationSetting

A new set of prompts that Amazon Lex sends to the user to elicit a response the provides a value for the slot.

Type: SlotValueElicitationSetting object

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "botId": "string", "botVersion": "string", "creationDateTime": number, "description": "string", "intentId": "string", "lastUpdatedDateTime": number, "localeId": "string", "obfuscationSetting": { "obfuscationSettingType": "string" }, "slotId": "string", "slotName": "string", "slotTypeId": "string", "valueElicitationSetting": { "defaultValueSpecification": { "defaultValueList": [ { "defaultValue": "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" } } ] } ] }, "sampleUtterances": [ { "utterance": "string" } ], "slotConstraint": "string", "waitAndContinueSpecification": { "continueResponse": { "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" } } ] } ] }, "stillWaitingResponse": { "allowInterrupt": boolean, "frequencyInSeconds": 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" } } ] } ], "timeoutInSeconds": number }, "waitingResponse": { "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" } } ] } ] } } } }

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 slot.

Type: String

Length Constraints: Fixed length of 10.

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

botVersion

The identifier of the slot version that contains the slot. Will always be DRAFT.

Type: String

Length Constraints: Fixed length of 5.

Pattern: ^DRAFT$

creationDateTime

The timestamp of the date and time that the slot was created.

Type: Timestamp

description

The updated description of the bot.

Type: String

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

intentId

The intent that contains the slot.

Type: String

Length Constraints: Fixed length of 10.

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

lastUpdatedDateTime

The timestamp of the date and time that the slot was last updated.

Type: Timestamp

localeId

The locale that contains the slot.

Type: String

obfuscationSetting

The updated setting that determines whether the slot value is obfuscated in the Amazon CloudWatch logs.

Type: ObfuscationSetting object

slotId

The unique identifier of the slot that was updated.

Type: String

Length Constraints: Fixed length of 10.

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

slotName

The updated name of the slot.

Type: String

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

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

slotTypeId

The updated identifier of the slot type that provides values for the slot.

Type: String

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

Pattern: ^((AMAZON\.)[a-zA-Z_]+?|[0-9a-zA-Z]+)$

valueElicitationSetting

The updated prompts that Amazon Lex sends to the user to elicit a response that provides a value for the slot.

Type: SlotValueElicitationSetting object

Errors

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

ConflictException

HTTP Status Code: 409

InternalServerException

HTTP Status Code: 500

PreconditionFailedException

HTTP Status Code: 412

ServiceQuotaExceededException

HTTP Status Code: 402

ThrottlingException

HTTP Status Code: 429

ValidationException

HTTP Status Code: 400

See Also

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