Cookie の設定を選択する

当社は、当社のサイトおよびサービスを提供するために必要な必須 Cookie および類似のツールを使用しています。当社は、パフォーマンス Cookie を使用して匿名の統計情報を収集することで、お客様が当社のサイトをどのように利用しているかを把握し、改善に役立てています。必須 Cookie は無効化できませんが、[カスタマイズ] または [拒否] をクリックしてパフォーマンス Cookie を拒否することはできます。

お客様が同意した場合、AWS および承認された第三者は、Cookie を使用して便利なサイト機能を提供したり、お客様の選択を記憶したり、関連する広告を含む関連コンテンツを表示したりします。すべての必須ではない Cookie を受け入れるか拒否するには、[受け入れる] または [拒否] をクリックしてください。より詳細な選択を行うには、[カスタマイズ] をクリックしてください。

GetSession - Amazon Lex API Reference
このページはお客様の言語に翻訳されていません。 翻訳のリクエスト

GetSession

Returns session information for a specified bot, alias, and user.

For example, you can use this operation to retrieve session information for a user that has left a long-running session in use.

If the bot, alias, or session identifier doesn't exist, Amazon Lex V2 returns a BadRequestException. If the locale doesn't exist or is not enabled for the alias, you receive a BadRequestException.

Request Syntax

GET /bots/botId/botAliases/botAliasId/botLocales/localeId/sessions/sessionId HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

botAliasId

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

Required: Yes

botId

The identifier of the bot that contains the session data.

Length Constraints: Fixed length of 10.

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

Required: Yes

localeId

The locale where the session is in use.

Length Constraints: Minimum length of 1.

Required: Yes

sessionId

The identifier of the session to return.

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 { "interpretations": [ { "intent": { "confirmationState": "string", "name": "string", "slots": { "string" : { "shape": "string", "subSlots": { "string" : "Slot" }, "value": { "interpretedValue": "string", "originalValue": "string", "resolvedValues": [ "string" ] }, "values": [ "Slot" ] } }, "state": "string" }, "interpretationSource": "string", "nluConfidence": { "score": number }, "sentimentResponse": { "sentiment": "string", "sentimentScore": { "mixed": number, "negative": number, "neutral": number, "positive": number } } } ], "messages": [ { "content": "string", "contentType": "string", "imageResponseCard": { "buttons": [ { "text": "string", "value": "string" } ], "imageUrl": "string", "subtitle": "string", "title": "string" } } ], "sessionId": "string", "sessionState": { "activeContexts": [ { "contextAttributes": { "string" : "string" }, "name": "string", "timeToLive": { "timeToLiveInSeconds": number, "turnsToLive": number } } ], "dialogAction": { "slotElicitationStyle": "string", "slotToElicit": "string", "subSlotToElicit": { "name": "string", "subSlotToElicit": "ElicitSubSlot" }, "type": "string" }, "intent": { "confirmationState": "string", "name": "string", "slots": { "string" : { "shape": "string", "subSlots": { "string" : "Slot" }, "value": { "interpretedValue": "string", "originalValue": "string", "resolvedValues": [ "string" ] }, "values": [ "Slot" ] } }, "state": "string" }, "originatingRequestId": "string", "runtimeHints": { "slotHints": { "string" : { "string" : { "runtimeHintValues": [ { "phrase": "string" } ], "subSlotHints": { "string" : "RuntimeHintDetails" } } } } }, "sessionAttributes": { "string" : "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.

interpretations

A list of intents that Amazon Lex V2 determined might satisfy the user's utterance.

Each interpretation includes the intent, a score that indicates how confident Amazon Lex V2 is that the interpretation is the correct one, and an optional sentiment response that indicates the sentiment expressed in the utterance.

Type: Array of Interpretation objects

Array Members: Maximum number of 5 items.

messages

A list of messages that were last sent to the user. The messages are ordered based on the order that your returned the messages from your Lambda function or the order that messages are defined in the bot.

Type: Array of Message objects

Array Members: Maximum number of 10 items.

sessionId

The identifier of the returned session.

Type: String

Length Constraints: Minimum length of 1.

sessionState

Represents the current state of the dialog between the user and the bot.

You can use this to determine the progress of the conversation and what the next action might be.

Type: SessionState object

Errors

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

AccessDeniedException

HTTP Status Code: 403

InternalServerException

HTTP Status Code: 500

ResourceNotFoundException

HTTP Status Code: 404

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:

プライバシーサイト規約Cookie の設定
© 2025, Amazon Web Services, Inc. or its affiliates.All rights reserved.