- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
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
Parameter | Type | Description |
---|
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 |
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 Use the returned token in the |
sortBy | ExportSortBy | undefined | Determines the field that the list of exports is sorted by. You can sort by the |
ListExportsCommand Output
Parameter | Type | Description |
---|
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 |
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 |
Throws
Name | Fault | Details |
---|
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. |