imports
Creates, updates, deletes, gets or lists an imports resource.
Overview
| Name | imports |
| Type | Resource |
| Id | aws.lexv2_models.imports |
Fields
The following fields are returned by SELECT queries:
- describe_import
- list_imports
| Name | Datatype | Description |
|---|---|---|
creation_date_time | string (date-time) | The date and time that the import was created. |
failure_reasons | array | If the importStatus field is Failed, this provides one or more reasons for the failure. |
import_id | string | The unique identifier of the described import. (pattern: <code>^[0-9a-zA-Z]+$</code>) |
import_status | string | The status of the import process. When the status is Completed the resource is imported and ready for use. (InProgress, Completed, Failed, Deleting) |
imported_resource_id | string | The unique identifier that Amazon Lex assigned to the resource created by the import. (pattern: <code>^([0-9a-zA-Z_])+$</code>) |
imported_resource_name | string | The name of the imported resource. (pattern: <code>^([0-9a-zA-Z][_-]?){1,100}$</code>) |
last_updated_date_time | string (date-time) | The date and time that the import was last updated. |
merge_strategy | string | 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. (Overwrite, FailOnConflict, Append) |
resource_specification | object | The specifications of the imported bot, bot locale, or custom vocabulary. |
| Name | Datatype | Description |
|---|---|---|
bot_id | string | The unique identifier assigned by Amazon Lex to the bot. (pattern: <code>^[0-9a-zA-Z]+$</code>) |
bot_version | string | The version of the bot that was imported. It will always be DRAFT. (pattern: <code>^DRAFT$</code>) |
import_summaries | array | Summary information for the imports that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter. If there are more imports 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 ListImports operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListImports 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_import | select | import_id, region | Gets information about a specific import. | |
list_imports | select | region | Lists the imports for a bot, bot locale, or custom vocabulary. Imports are kept in the list for 7 days. | |
delete_import | delete | import_id, region | Removes a previous import and the associated file stored in an S3 bucket. | |
start_import | exec | region, importId, resourceSpecification, mergeStrategy | Starts importing a bot, bot locale, or custom vocabulary from a zip archive that you uploaded to 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 |
|---|---|---|
import_id | string | The unique identifier of the import to delete. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_import
- list_imports
Gets information about a specific import.
SELECT
creation_date_time,
failure_reasons,
import_id,
import_status,
imported_resource_id,
imported_resource_name,
last_updated_date_time,
merge_strategy,
resource_specification
FROM aws.lexv2_models.imports
WHERE import_id = '{{ import_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists the imports for a bot, bot locale, or custom vocabulary. Imports are kept in the list for 7 days.
SELECT
bot_id,
bot_version,
import_summaries,
locale_id,
next_token
FROM aws.lexv2_models.imports
WHERE region = '{{ region }}' -- required
;
DELETE examples
- delete_import
Removes a previous import and the associated file stored in an S3 bucket.
DELETE FROM aws.lexv2_models.imports
WHERE import_id = '{{ import_id }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- start_import
Starts importing a bot, bot locale, or custom vocabulary from a zip archive that you uploaded to an S3 bucket.
EXEC aws.lexv2_models.imports.start_import
@region='{{ region }}' --required
@@json=
'{
"importId": "{{ importId }}",
"resourceSpecification": "{{ resourceSpecification }}",
"mergeStrategy": "{{ mergeStrategy }}",
"filePassword": "{{ filePassword }}"
}'
;