exports
Creates, updates, deletes, gets or lists an exports resource.
Overview
| Name | exports |
| Type | Resource |
| Id | aws.lexv2_models.exports |
Fields
The following fields are returned by SELECT queries:
- describe_export
- list_exports
| Name | Datatype | Description |
|---|---|---|
creation_date_time | string (date-time) | The date and time that the export was created. |
download_url | string | A pre-signed S3 URL that points to the bot or bot locale archive. The URL is only available for 5 minutes after calling the DescribeExport operation. |
export_id | string | The unique identifier of the described export. (pattern: <code>^[0-9a-zA-Z]+$</code>) |
export_status | string | The status of the export. When the status is Complete the export archive file is available for download. (InProgress, Completed, Failed, Deleting) |
failure_reasons | array | If the exportStatus is failed, contains one or more reasons why the export could not be completed. |
file_format | string | The file format used in the files that describe the resource. (LexJson, TSV, CSV) |
last_updated_date_time | string (date-time) | The last date and time that the export was updated. |
resource_specification | object | Provides information about the bot or bot locale that you want to export. You can specify the botExportSpecification or the botLocaleExportSpecification, but not both. |
| Name | Datatype | Description |
|---|---|---|
bot_id | string | The unique identifier assigned to the bot by Amazon Lex. (pattern: <code>^[0-9a-zA-Z]+$</code>) |
bot_version | string | The version of the bot that was exported. (pattern: <code>^(DRAFT|[0-9]+)$</code>) |
export_summaries | array | 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. |
locale_id | string | The locale specified in the request. |
next_token | string | 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. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_export | select | export_id, region | Gets information about a specific export. | |
list_exports | select | region | Lists the exports for a bot, bot locale, or custom vocabulary. Exports are kept in the list for 7 days. | |
create_export | insert | region, resourceSpecification, fileFormat | Creates a zip archive containing the contents of a bot or a bot locale. The archive contains a directory structure that contains JSON files that define the bot. You can create an archive that contains the complete definition of a bot, or you can specify that the archive contain only the definition of a single bot locale. For more information about exporting bots, and about the structure of the export archive, see Importing and exporting bots | |
update_export | update | export_id, region | Updates the password used to protect an export zip archive. The password is not required. If you don't supply a password, Amazon Lex generates a zip file that is not protected by a password. This is the archive that is available at the pre-signed S3 URL provided by the DescribeExport operation. | |
delete_export | delete | export_id, region | Removes a previous export and the associated files stored in an S3 bucket. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
export_id | string | The unique identifier of the export to delete. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_export
- list_exports
Gets information about a specific export.
SELECT
creation_date_time,
download_url,
export_id,
export_status,
failure_reasons,
file_format,
last_updated_date_time,
resource_specification
FROM aws.lexv2_models.exports
WHERE export_id = '{{ export_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists the exports for a bot, bot locale, or custom vocabulary. Exports are kept in the list for 7 days.
SELECT
bot_id,
bot_version,
export_summaries,
locale_id,
next_token
FROM aws.lexv2_models.exports
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_export
- Manifest
Creates a zip archive containing the contents of a bot or a bot locale. The archive contains a directory structure that contains JSON files that define the bot. You can create an archive that contains the complete definition of a bot, or you can specify that the archive contain only the definition of a single bot locale. For more information about exporting bots, and about the structure of the export archive, see Importing and exporting bots
INSERT INTO aws.lexv2_models.exports (
resourceSpecification,
fileFormat,
filePassword,
region
)
SELECT
'{{ resourceSpecification }}' /* required */,
'{{ fileFormat }}' /* required */,
'{{ filePassword }}',
'{{ region }}'
RETURNING
creation_date_time,
export_id,
export_status,
file_format,
resource_specification
;
# Description fields are for documentation purposes
- name: exports
props:
- name: region
value: "{{ region }}"
description: Required parameter for the exports resource.
- name: resourceSpecification
description: |
Provides information about the bot or bot locale that you want to export. You can specify the botExportSpecification or the botLocaleExportSpecification, but not both.
value:
botExportSpecification:
botId: "{{ botId }}"
botVersion: "{{ botVersion }}"
botLocaleExportSpecification:
botId: "{{ botId }}"
botVersion: "{{ botVersion }}"
localeId: "{{ localeId }}"
customVocabularyExportSpecification:
botId: "{{ botId }}"
botVersion: "{{ botVersion }}"
localeId: "{{ localeId }}"
testSetExportSpecification:
testSetId: "{{ testSetId }}"
- name: fileFormat
value: "{{ fileFormat }}"
valid_values: ['LexJson', 'TSV', 'CSV']
- name: filePassword
value: "{{ filePassword }}"
UPDATE examples
- update_export
Updates the password used to protect an export zip archive. The password is not required. If you don't supply a password, Amazon Lex generates a zip file that is not protected by a password. This is the archive that is available at the pre-signed S3 URL provided by the DescribeExport operation.
UPDATE aws.lexv2_models.exports
SET
filePassword = '{{ filePassword }}'
WHERE
export_id = '{{ export_id }}' --required
AND region = '{{ region }}' --required
RETURNING
creation_date_time,
export_id,
export_status,
file_format,
last_updated_date_time,
resource_specification;
DELETE examples
- delete_export
Removes a previous export and the associated files stored in an S3 bucket.
DELETE FROM aws.lexv2_models.exports
WHERE export_id = '{{ export_id }}' --required
AND region = '{{ region }}' --required
;