DeleteSession - Amazon Lex V1

If you are using Amazon Lex V2, refer to the Amazon Lex V2 guide instead.

 

If you are using Amazon Lex V1, we recommend upgrading your bots to Amazon Lex V2. We are no longer adding new features to V1 and strongly recommend using V2 for all new bots.

DeleteSession

Removes session information for a specified bot, alias, and user ID.

Request Syntax

DELETE /bot/botName/alias/botAlias/user/userId/session HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

botAlias

The alias in use for the bot that contains the session data.

Required: Yes

botName

The name of the bot that contains the session data.

Required: Yes

userId

The identifier of the user associated with the session data.

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

Pattern: [0-9a-zA-Z._:-]+

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "botAlias": "string", "botName": "string", "sessionId": "string", "userId": "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.

botAlias

The alias in use for the bot associated with the session data.

Type: String

botName

The name of the bot associated with the session data.

Type: String

sessionId

The unique identifier for the session.

Type: String

userId

The ID of the client application user.

Type: String

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

Pattern: [0-9a-zA-Z._:-]+

Errors

BadRequestException

Request validation failed, there is no usable message in the context, or the bot build failed, is still in progress, or contains unbuilt changes.

HTTP Status Code: 400

ConflictException

Two clients are using the same AWS account, Amazon Lex bot, and user ID.

HTTP Status Code: 409

InternalFailureException

Internal service error. Retry the call.

HTTP Status Code: 500

LimitExceededException

Exceeded a limit.

HTTP Status Code: 429

NotFoundException

The resource (such as the Amazon Lex bot or an alias) that is referred to is not found.

HTTP Status Code: 404

See Also

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