StartImport - Amazon Lex

StartImport

Starts importing a bot or bot locale from a zip archive that you uploaded to an S3 bucket.

Request Syntax

PUT /imports/ HTTP/1.1 Content-type: application/json { "filePassword": "string", "importId": "string", "mergeStrategy": "string", "resourceSpecification": { "botImportSpecification": { "botName": "string", "botTags": { "string" : "string" }, "dataPrivacy": { "childDirected": boolean }, "idleSessionTTLInSeconds": number, "roleArn": "string", "testBotAliasTags": { "string" : "string" } }, "botLocaleImportSpecification": { "botId": "string", "botVersion": "string", "localeId": "string", "nluIntentConfidenceThreshold": number, "voiceSettings": { "voiceId": "string" } } } }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

filePassword

The password used to encrypt the zip archive that contains the bot or bot locale definition. You should always encrypt the zip archive to protect it during transit between your site and Amazon Lex.

Type: String

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

Required: No

importId

The unique identifier for the import. It is included in the response from the CreateUploadUrl operation.

Type: String

Length Constraints: Fixed length of 10.

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

Required: Yes

mergeStrategy

The strategy to use when there is a name conflict between the imported resource and an existing resource. When the merge strategy is FailOnConflict existing resources are not overwritten and the import fails.

Type: String

Valid Values: Overwrite | FailOnConflict

Required: Yes

resourceSpecification

Parameters for creating the bot or bot locale.

Type: ImportResourceSpecification object

Required: Yes

Response Syntax

HTTP/1.1 202 Content-type: application/json { "creationDateTime": number, "importId": "string", "importStatus": "string", "mergeStrategy": "string", "resourceSpecification": { "botImportSpecification": { "botName": "string", "botTags": { "string" : "string" }, "dataPrivacy": { "childDirected": boolean }, "idleSessionTTLInSeconds": number, "roleArn": "string", "testBotAliasTags": { "string" : "string" } }, "botLocaleImportSpecification": { "botId": "string", "botVersion": "string", "localeId": "string", "nluIntentConfidenceThreshold": number, "voiceSettings": { "voiceId": "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 import request was created.

Type: Timestamp

importId

A unique identifier for the import.

Type: String

Length Constraints: Fixed length of 10.

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

importStatus

The current status of the import. When the status is Complete the bot or bot alias is ready to use.

Type: String

Valid Values: InProgress | Completed | Failed | Deleting

mergeStrategy

The strategy used when there was a name conflict between the imported resource and an existing resource. When the merge strategy is FailOnConflict existing resources are not overwritten and the import fails.

Type: String

Valid Values: Overwrite | FailOnConflict

resourceSpecification

The parameters used when importing the bot or bot locale.

Type: ImportResourceSpecification 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: