import_tasks
Creates, updates, deletes, gets or lists an import_tasks resource.
Overview
| Name | import_tasks |
| Type | Resource |
| Id | aws.discovery.import_tasks |
Fields
The following fields are returned by SELECT queries:
- describe_import_tasks
| Name | Datatype | Description |
|---|---|---|
name | string | A descriptive name for an import task. You can use this name to filter future requests related to this import task, such as identifying applications and servers that were included in this import task. We recommend that you use a meaningful name for each import task. (pattern: <code>[\s\S]\S[\s\S]</code>) |
application_import_failure | integer | The total number of application records in the import file that failed to be imported. |
application_import_success | integer | The total number of application records in the import file that were successfully imported. |
client_request_token | string | A unique token used to prevent the same import request from occurring more than once. If you didn't provide a token, a token was automatically generated when the import task request was sent. |
errors_and_failed_entries_zip | string | A link to a compressed archive folder (in the ZIP format) that contains an error log and a file of failed records. You can use these two files to quickly identify records that failed, why they failed, and correct those records. Afterward, you can upload the corrected file to your Amazon S3 bucket and create another import task request. This field also includes authorization information so you can confirm the authenticity of the compressed archive before you download it. If some records failed to be imported we recommend that you correct the records in the failed entries file and then imports that failed entries file. This prevents you from having to correct and update the larger original file and attempt importing it again. |
file_classification | string | The type of file detected by the import task. (MODELIZEIT_EXPORT, RVTOOLS_EXPORT, VMWARE_NSX_EXPORT, IMPORT_TEMPLATE) |
import_completion_time | string (date-time) | The time that the import task request finished, presented in the Unix time stamp format. |
import_deleted_time | string (date-time) | The time that the import task request was deleted, presented in the Unix time stamp format. |
import_request_time | string (date-time) | The time that the import task request was made, presented in the Unix time stamp format. |
import_task_id | string | The unique ID for a specific import task. These IDs aren't globally unique, but they are unique within an Amazon Web Services account. (pattern: <code>^import-task-[a-fA-F0-9]{32}$</code>) |
import_url | string | The URL for your import file that you've uploaded to Amazon S3. (pattern: <code>\S+://\S+/[\s\S]\S[\s\S]</code>) |
server_import_failure | integer | The total number of server records in the import file that failed to be imported. |
server_import_success | integer | The total number of server records in the import file that were successfully imported. |
status | string | The status of the import task. An import can have the status of IMPORT_COMPLETE and still have some records fail to import from the overall request. More information can be found in the downloadable archive defined in the errorsAndFailedEntriesZip field, or in the Migration Hub management console. (IMPORT_IN_PROGRESS, IMPORT_COMPLETE, IMPORT_COMPLETE_WITH_ERRORS, IMPORT_FAILED, IMPORT_FAILED_SERVER_LIMIT_EXCEEDED, IMPORT_FAILED_RECORD_LIMIT_EXCEEDED, IMPORT_FAILED_UNSUPPORTED_FILE_TYPE, DELETE_IN_PROGRESS, DELETE_COMPLETE, DELETE_FAILED, DELETE_FAILED_LIMIT_EXCEEDED, INTERNAL_ERROR) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_import_tasks | select | region | Returns an array of import tasks for your account, including status information, times, IDs, the Amazon S3 Object URL for the import file, and more. | |
batch_delete_import_data | exec | region, importTaskIds | Deletes one or more import tasks, each identified by their import ID. Each import task has a number of records that can identify servers or applications. Amazon Web Services Application Discovery Service has built-in matching logic that will identify when discovered servers match existing entries that you've previously discovered, the information for the already-existing discovered server is updated. When you delete an import task that contains records that were used to match, the information in those matched records that comes from the deleted records will also be deleted. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_import_tasks
Returns an array of import tasks for your account, including status information, times, IDs, the Amazon S3 Object URL for the import file, and more.
SELECT
name,
application_import_failure,
application_import_success,
client_request_token,
errors_and_failed_entries_zip,
file_classification,
import_completion_time,
import_deleted_time,
import_request_time,
import_task_id,
import_url,
server_import_failure,
server_import_success,
status
FROM aws.discovery.import_tasks
WHERE region = '{{ region }}' -- required
;
Lifecycle Methods
- batch_delete_import_data
Deletes one or more import tasks, each identified by their import ID. Each import task has a number of records that can identify servers or applications. Amazon Web Services Application Discovery Service has built-in matching logic that will identify when discovered servers match existing entries that you've previously discovered, the information for the already-existing discovered server is updated. When you delete an import task that contains records that were used to match, the information in those matched records that comes from the deleted records will also be deleted.
EXEC aws.discovery.import_tasks.batch_delete_import_data
@region='{{ region }}' --required
@@json=
'{
"importTaskIds": "{{ importTaskIds }}",
"deleteHistory": {{ deleteHistory }}
}'
;