Cookie の設定を選択する

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

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

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

GenerateBotElement

Generates sample utterances for an intent.

Request Syntax

POST /bots/botId/botversions/botVersion/botlocales/localeId/generate HTTP/1.1 Content-type: application/json { "intentId": "string" }

URI Request Parameters

The request uses the following URI parameters.

botId

The bot unique Id for the bot request to generate utterances.

Length Constraints: Fixed length of 10.

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

Required: Yes

botVersion

The bot version for the bot request to generate utterances.

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

Pattern: ^(DRAFT|[0-9]+)$

Required: Yes

localeId

The unique locale Id for the bot request to generate utterances.

Required: Yes

Request Body

The request accepts the following data in JSON format.

intentId

The intent unique Id for the bot request to generate utterances.

Type: String

Length Constraints: Fixed length of 10.

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

Required: Yes

Response Syntax

HTTP/1.1 202 Content-type: application/json { "botId": "string", "botVersion": "string", "intentId": "string", "localeId": "string", "sampleUtterances": [ { "utterance": "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 bot Id for the bot which received the response.

Type: String

Length Constraints: Fixed length of 10.

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

botVersion

The unique bot version for the bot which received the response.

Type: String

Length Constraints: Fixed length of 5.

Pattern: ^DRAFT$

intentId

The unique intent Id for the bot which received the response.

Type: String

Length Constraints: Fixed length of 10.

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

localeId

The unique locale Id for the bot which received the response.

Type: String

sampleUtterances

The sample utterances for the bot which received the response.

Type: Array of SampleUtterance 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

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

ResourceNotFoundException

You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try again.

HTTP Status Code: 404

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

Examples

Example request

This example illustrates one usage of GenerateBotElement.

POST https://models-v2-lex.us-east-1.amazonaws.com/bots/BOT1234567/botversions/DRAFT/botlocales/en_US/generate Payload: { "intentId":"INTENT1234" }

Example response

This example illustrates one usage of GenerateBotElement.

{ "botId": "BOT1234567", "botVersion": "DRAFT", "intentId": "INTENT1234", "localeId": "en_US", "sampleUtterances": [{ "utterance": "I need to cancel my order {OrderId} due to {CancellationReason}" }, { "utterance": "Please cancel order {OrderId} as {CancellationReason}" }, { "utterance": "{OrderId} requires cancellation because of {CancellationReason}" }, { "utterance": "Cancel order {OrderId} . {CancellationReason}" }, { "utterance": "I have to cancel my order {OrderId} . The reason is {CancellationReason}" }] }

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.