ListBotResourceGenerations - Amazon Lex API Reference

ListBotResourceGenerations

Lists the generation requests made for a bot locale.

Request Syntax

POST /bots/botId/botversions/botVersion/botlocales/localeId/generations HTTP/1.1 Content-type: application/json { "maxResults": number, "nextToken": "string", "sortBy": { "attribute": "string", "order": "string" } }

URI Request Parameters

The request uses the following URI parameters.

botId

The unique identifier of the bot whose generation requests you want to view.

Length Constraints: Fixed length of 10.

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

Required: Yes

botVersion

The version of the bot whose generation requests you want to view.

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

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

Required: Yes

localeId

The locale of the bot whose generation requests you want to view.

Required: Yes

Request Body

The request accepts the following data in JSON format.

maxResults

The maximum number of results to return in the response.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 1000.

Required: No

nextToken

If the total number of results is greater than the number specified in the maxResults, the response returns a token in the nextToken field. Use this token when making a request to return the next batch of results.

Type: String

Required: No

sortBy

An object containing information about the attribute and the method by which to sort the results

Type: GenerationSortBy object

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "botId": "string", "botVersion": "string", "generationSummaries": [ { "creationDateTime": number, "generationId": "string", "generationStatus": "string", "lastUpdatedDateTime": number } ], "localeId": "string", "nextToken": "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 unique identifier of the bot for which the generation requests were made.

Type: String

Length Constraints: Fixed length of 10.

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

botVersion

The version of the bot for which the generation requests were made.

Type: String

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

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

generationSummaries

A list of objects, each containing information about a generation request for the bot locale.

Type: Array of GenerationSummary objects

localeId

The locale of the bot for which the generation requests were made.

Type: String

nextToken

If the total number of results is greater than the number specified in the maxResults, the response returns a token in the nextToken field. Use this token when making a request to return the next batch of results.

Type: String

Errors

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

InternalServerException

The service encountered an unexpected condition. Try your request again.

HTTP Status Code: 500

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

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

POST https://models-v2-lex.us-east-1.amazonaws.com/bots/BOT1234567/botversions/DRAFT/botlocales/en_GB/generations Payload: { "sortBy": { "attribute": "lastUpdatedTime", "order": "Descending" }, "maxResults": 1 }

Example response

This example illustrates one usage of ListBotResourceGenerations.

{ "botId": "BOT1234567", "botVersion": "DRAFT", "generationSummaries": [{ "creationDateTime": 1.699570064977E9, "generationId": "GEN1234567", "generationStatus": "Complete", "lastUpdatedDateTime": 1.699570064977E9 }], "localeId": "en_GB", "nextToken": null }

See Also

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