CreateExport - Amazon Lex

CreateExport

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

Request Syntax

PUT /exports/ HTTP/1.1 Content-type: application/json { "fileFormat": "string", "filePassword": "string", "resourceSpecification": { "botExportSpecification": { "botId": "string", "botVersion": "string" }, "botLocaleExportSpecification": { "botId": "string", "botVersion": "string", "localeId": "string" } } }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

fileFormat

The file format of the bot or bot locale definition files.

Type: String

Valid Values: LexJson

Required: Yes

filePassword

An password to use to encrypt the exported archive. Using a password is optional, but you should encrypt the archive to protect the data in transit between Amazon Lex and your local computer.

Type: String

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

Required: No

resourceSpecification

Specifies the type of resource to export, either a bot or a bot locale. You can only specify one type of resource to export.

Type: ExportResourceSpecification object

Required: Yes

Response Syntax

HTTP/1.1 202 Content-type: application/json { "creationDateTime": number, "exportId": "string", "exportStatus": "string", "fileFormat": "string", "resourceSpecification": { "botExportSpecification": { "botId": "string", "botVersion": "string" }, "botLocaleExportSpecification": { "botId": "string", "botVersion": "string", "localeId": "string" } } }

Response Elements

If the action is successful, the service sends back an HTTP 202 response.

The following data is returned in JSON format by the service.

creationDateTime

The date and time that the request to export a bot was created.

Type: Timestamp

exportId

An identifier for a specific request to create an export.

Type: String

Length Constraints: Fixed length of 10.

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

exportStatus

The status of the export. When the status is Completed, you can use the DescribeExport operation to get the pre-signed S3 URL link to your exported bot or bot locale.

Type: String

Valid Values: InProgress | Completed | Failed | Deleting

fileFormat

The file format used for the bot or bot locale definition files.

Type: String

Valid Values: LexJson

resourceSpecification

A description of the type of resource that was exported, either a bot or a bot locale.

Type: ExportResourceSpecification object

Errors

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

ConflictException

HTTP Status Code: 409

InternalServerException

HTTP Status Code: 500

ResourceNotFoundException

HTTP Status Code: 404

ServiceQuotaExceededException

HTTP Status Code: 402

ThrottlingException

HTTP Status Code: 429

ValidationException

HTTP Status Code: 400

See Also

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