UpdateBot - Amazon Lex API Reference

UpdateBot

Updates the configuration of an existing bot.

Request Syntax

PUT /bots/botId/ HTTP/1.1 Content-type: application/json { "botMembers": [ { "botMemberAliasId": "string", "botMemberAliasName": "string", "botMemberId": "string", "botMemberName": "string", "botMemberVersion": "string" } ], "botName": "string", "botType": "string", "dataPrivacy": { "childDirected": boolean }, "description": "string", "idleSessionTTLInSeconds": number, "roleArn": "string" }

URI Request Parameters

The request uses the following URI parameters.

botId

The unique identifier of the bot to update. This identifier is returned by the CreateBot operation.

Length Constraints: Fixed length of 10.

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

Required: Yes

Request Body

The request accepts the following data in JSON format.

botMembers

The list of bot members in the network associated with the update action.

Type: Array of BotMember objects

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

Required: No

botName

The new name of the bot. The name must be unique in the account that creates the bot.

Type: String

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

Pattern: ^([0-9a-zA-Z][_-]?){1,100}$

Required: Yes

botType

The type of the bot to be updated.

Type: String

Valid Values: Bot | BotNetwork

Required: No

dataPrivacy

Provides information on additional privacy protections Amazon Lex should use with the bot's data.

Type: DataPrivacy object

Required: Yes

description

A description of the bot.

Type: String

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

Required: No

idleSessionTTLInSeconds

The time, in seconds, that Amazon Lex should keep information about a user's conversation with the bot.

A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout.

You can specify between 60 (1 minute) and 86,400 (24 hours) seconds.

Type: Integer

Valid Range: Minimum value of 60. Maximum value of 86400.

Required: Yes

roleArn

The Amazon Resource Name (ARN) of an IAM role that has permissions to access the bot.

Type: String

Length Constraints: Minimum length of 32. Maximum length of 2048.

Pattern: ^arn:aws:iam::[0-9]{12}:role/.*$

Required: Yes

Response Syntax

HTTP/1.1 202 Content-type: application/json { "botId": "string", "botMembers": [ { "botMemberAliasId": "string", "botMemberAliasName": "string", "botMemberId": "string", "botMemberName": "string", "botMemberVersion": "string" } ], "botName": "string", "botStatus": "string", "botType": "string", "creationDateTime": number, "dataPrivacy": { "childDirected": boolean }, "description": "string", "idleSessionTTLInSeconds": number, "lastUpdatedDateTime": number, "roleArn": "string" }

Response Elements

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

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

botId

The unique identifier of the bot that was updated.

Type: String

Length Constraints: Fixed length of 10.

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

botMembers

The list of bot members in the network that was updated.

Type: Array of BotMember objects

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

botName

The name of the bot after the update.

Type: String

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

Pattern: ^([0-9a-zA-Z][_-]?){1,100}$

botStatus

Shows the current status of the bot. The bot is first in the Creating status. Once the bot is read for use, it changes to the Available status. After the bot is created, you can use the DRAFT version of the bot.

Type: String

Valid Values: Creating | Available | Inactive | Deleting | Failed | Versioning | Importing | Updating

botType

The type of the bot that was updated.

Type: String

Valid Values: Bot | BotNetwork

creationDateTime

A timestamp of the date and time that the bot was created.

Type: Timestamp

dataPrivacy

The data privacy settings for the bot after the update.

Type: DataPrivacy object

description

The description of the bot after the update.

Type: String

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

idleSessionTTLInSeconds

The session timeout, in seconds, for the bot after the update.

Type: Integer

Valid Range: Minimum value of 60. Maximum value of 86400.

lastUpdatedDateTime

A timestamp of the date and time that the bot was last updated.

Type: Timestamp

roleArn

The Amazon Resource Name (ARN) of the IAM role used by the bot after the update.

Type: String

Length Constraints: Minimum length of 32. Maximum length of 2048.

Pattern: ^arn:aws:iam::[0-9]{12}:role/.*$

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: