export_tasks
Creates, updates, deletes, gets or lists an export_tasks resource.
Overview
| Name | export_tasks |
| Type | Resource |
| Id | aws.ec2.export_tasks |
Fields
The following fields are returned by SELECT queries:
- describe_export_tasks
| Name | Datatype | Description |
|---|---|---|
description | string | A description of the resource being exported. |
export_task_id | string | The ID of the export task. |
export_to_s3_task | string | Information about the export task. |
instance_export_details | string | Information about the instance to export. |
state | string | The state of the export task. |
status_message | string | The status message related to the export task. |
tags | string | The tags for the export task. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_export_tasks | select | region | Filter, ExportTaskId | Describes the specified export instance tasks or all of your export instance tasks. |
create_instance_export_task | insert | InstanceId, TargetEnvironment, ExportToS3, region | TagSpecification, Description | Exports a running or stopped instance to an Amazon S3 bucket. For information about the prerequisites for your Amazon S3 bucket, supported operating systems, image formats, and known limitations for the types of instances you can export, see Exporting an instance as a VM Using VM Import/Export in the VM Import/Export User Guide. |
cancel_export_task | exec | ExportTaskId, region | Cancels an active export task. The request removes all artifacts of the export, including any partially-created Amazon S3 objects. If the export task is complete or is in the process of transferring the final disk image, the command fails and returns an error. |
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 |
|---|---|---|
ExportTaskId | string | The ID of the export task. This is the ID returned by the CreateInstanceExportTask and ExportImage operations. |
ExportToS3 | object | The format and location for an export instance task. |
InstanceId | string | The ID of the instance. |
TargetEnvironment | string | The target virtualization environment. |
region | string | AWS region (default: us-east-1) |
Description | string | A description for the conversion task or the resource being exported. The maximum length is 255 characters. |
ExportTaskId | array | The export task IDs. |
Filter | array | the filters for the export tasks. |
TagSpecification | array | The tags to apply to the export instance task during creation. |
SELECT examples
- describe_export_tasks
Describes the specified export instance tasks or all of your export instance tasks.
SELECT
description,
export_task_id,
export_to_s3_task,
instance_export_details,
state,
status_message,
tags
FROM aws.ec2.export_tasks
WHERE region = '{{ region }}' -- required
AND Filter = '{{ Filter }}'
AND ExportTaskId = '{{ ExportTaskId }}'
;
INSERT examples
- create_instance_export_task
- Manifest
Exports a running or stopped instance to an Amazon S3 bucket. For information about the prerequisites for your Amazon S3 bucket, supported operating systems, image formats, and known limitations for the types of instances you can export, see Exporting an instance as a VM Using VM Import/Export in the VM Import/Export User Guide.
INSERT INTO aws.ec2.export_tasks (
InstanceId,
TargetEnvironment,
ExportToS3,
region,
TagSpecification,
Description
)
SELECT
'{{ InstanceId }}',
'{{ TargetEnvironment }}',
'{{ ExportToS3 }}',
'{{ region }}',
'{{ TagSpecification }}',
'{{ Description }}'
RETURNING
description,
export_task_id,
export_to_s3_task,
instance_export_details,
state,
status_message,
tags
;
# Description fields are for documentation purposes
- name: export_tasks
props:
- name: InstanceId
value: "{{ InstanceId }}"
description: Required parameter for the export_tasks resource.
- name: TargetEnvironment
value: "{{ TargetEnvironment }}"
description: Required parameter for the export_tasks resource.
- name: ExportToS3
value: "{{ ExportToS3 }}"
description: Required parameter for the export_tasks resource.
- name: region
value: "{{ region }}"
description: Required parameter for the export_tasks resource.
- name: TagSpecification
value: "{{ TagSpecification }}"
description: The tags to apply to the export instance task during creation.
description: The tags to apply to the export instance task during creation.
- name: Description
value: "{{ Description }}"
description: A description for the conversion task or the resource being exported. The maximum length is 255 characters.
description: A description for the conversion task or the resource being exported. The maximum length is 255 characters.
Lifecycle Methods
- cancel_export_task
Cancels an active export task. The request removes all artifacts of the export, including any partially-created Amazon S3 objects. If the export task is complete or is in the process of transferring the final disk image, the command fails and returns an error.
EXEC aws.ec2.export_tasks.cancel_export_task
@ExportTaskId='{{ ExportTaskId }}' --required,
@region='{{ region }}' --required
;