Skip to main content

exports

Creates, updates, deletes, gets or lists an exports resource.

Overview

Nameexports
TypeResource
Idaws.lexv2_models.exports

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_date_timestring (date-time)The date and time that the export was created.
download_urlstringA 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_idstringThe unique identifier of the described export. (pattern: <code>^[0-9a-zA-Z]+$</code>)
export_statusstringThe status of the export. When the status is Complete the export archive file is available for download. (InProgress, Completed, Failed, Deleting)
failure_reasonsarrayIf the exportStatus is failed, contains one or more reasons why the export could not be completed.
file_formatstringThe file format used in the files that describe the resource. (LexJson, TSV, CSV)
last_updated_date_timestring (date-time)The last date and time that the export was updated.
resource_specificationobjectProvides information about the bot or bot locale that you want to export. You can specify the botExportSpecification or the botLocaleExportSpecification, but not both.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_exportselectexport_id, regionGets information about a specific export.
list_exportsselectregionLists the exports for a bot, bot locale, or custom vocabulary. Exports are kept in the list for 7 days.
create_exportinsertregion, resourceSpecification, fileFormatCreates 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_exportupdateexport_id, regionUpdates 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_exportdeleteexport_id, regionRemoves 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.

NameDatatypeDescription
export_idstringThe unique identifier of the export to delete.
regionstringAWS region (default: us-east-1)

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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
;