ListExportsCommand

Lists the exports for a bot, bot locale, or custom vocabulary. Exports are kept in the list for 7 days.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { LexModelsV2Client, ListExportsCommand } from "@aws-sdk/client-lex-models-v2"; // ES Modules import
// const { LexModelsV2Client, ListExportsCommand } = require("@aws-sdk/client-lex-models-v2"); // CommonJS import
const client = new LexModelsV2Client(config);
const input = { // ListExportsRequest
  botId: "STRING_VALUE",
  botVersion: "STRING_VALUE",
  sortBy: { // ExportSortBy
    attribute: "LastUpdatedDateTime", // required
    order: "Ascending" || "Descending", // required
  },
  filters: [ // ExportFilters
    { // ExportFilter
      name: "ExportResourceType", // required
      values: [ // FilterValues // required
        "STRING_VALUE",
      ],
      operator: "CO" || "EQ", // required
    },
  ],
  maxResults: Number("int"),
  nextToken: "STRING_VALUE",
  localeId: "STRING_VALUE",
};
const command = new ListExportsCommand(input);
const response = await client.send(command);
// { // ListExportsResponse
//   botId: "STRING_VALUE",
//   botVersion: "STRING_VALUE",
//   exportSummaries: [ // ExportSummaryList
//     { // ExportSummary
//       exportId: "STRING_VALUE",
//       resourceSpecification: { // ExportResourceSpecification
//         botExportSpecification: { // BotExportSpecification
//           botId: "STRING_VALUE", // required
//           botVersion: "STRING_VALUE", // required
//         },
//         botLocaleExportSpecification: { // BotLocaleExportSpecification
//           botId: "STRING_VALUE", // required
//           botVersion: "STRING_VALUE", // required
//           localeId: "STRING_VALUE", // required
//         },
//         customVocabularyExportSpecification: { // CustomVocabularyExportSpecification
//           botId: "STRING_VALUE", // required
//           botVersion: "STRING_VALUE", // required
//           localeId: "STRING_VALUE", // required
//         },
//         testSetExportSpecification: { // TestSetExportSpecification
//           testSetId: "STRING_VALUE", // required
//         },
//       },
//       fileFormat: "LexJson" || "TSV" || "CSV",
//       exportStatus: "InProgress" || "Completed" || "Failed" || "Deleting",
//       creationDateTime: new Date("TIMESTAMP"),
//       lastUpdatedDateTime: new Date("TIMESTAMP"),
//     },
//   ],
//   nextToken: "STRING_VALUE",
//   localeId: "STRING_VALUE",
// };

ListExportsCommand Input

See ListExportsCommandInput for more details

Parameter
Type
Description
botId
string | undefined

The unique identifier that Amazon Lex assigned to the bot.

botVersion
string | undefined

The version of the bot to list exports for.

filters
ExportFilter[] | undefined

Provides the specification of a filter used to limit the exports in the response to only those that match the filter specification. You can only specify one filter and one string to filter on.

localeId
string | undefined

Specifies the resources that should be exported. If you don't specify a resource type in the filters parameter, both bot locales and custom vocabularies are exported.

maxResults
number | undefined

The maximum number of exports to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

nextToken
string | undefined

If the response from the ListExports operation contains more results that specified in the maxResults parameter, a token is returned in the response.

Use the returned token in the nextToken parameter of a ListExports request to return the next page of results. For a complete set of results, call the ListExports operation until the nextToken returned in the response is null.

sortBy
ExportSortBy | undefined

Determines the field that the list of exports is sorted by. You can sort by the LastUpdatedDateTime field in ascending or descending order.

ListExportsCommand Output

See ListExportsCommandOutput for details

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
botId
string | undefined

The unique identifier assigned to the bot by Amazon Lex.

botVersion
string | undefined

The version of the bot that was exported.

exportSummaries
ExportSummary[] | undefined

Summary information for the exports that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter. If there are more exports available, the nextToken field contains a token to get the next page of results.

localeId
string | undefined

The locale specified in the request.

nextToken
string | undefined

A token that indicates whether there are more results to return in a response to the ListExports operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListExports operation request to get the next page of results.

Throws

Name
Fault
Details
InternalServerException
server

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

ThrottlingException
client

Your request rate is too high. Reduce the frequency of requests.

ValidationException
client

One of the input parameters in your request isn't valid. Check the parameters and try your request again.

LexModelsV2ServiceException
Base exception class for all service exceptions from LexModelsV2 service.