conversion_tasks
Creates, updates, deletes, gets or lists a conversion_tasks resource.
Overview
| Name | conversion_tasks |
| Type | Resource |
| Id | aws.ec2.conversion_tasks |
Fields
The following fields are returned by SELECT queries:
- describe_conversion_tasks
| Name | Datatype | Description |
|---|---|---|
conversion_task_id | string | The ID of the conversion task. |
expiration_time | string | The time when the task expires. If the upload isn't complete before the expiration time, we automatically cancel the task. |
import_instance | string | If the task is for importing an instance, this contains information about the import instance task. |
import_volume | string | If the task is for importing a volume, this contains information about the import volume task. |
state | string | The state of the conversion task. |
status_message | string | The status message related to the conversion task. |
tags | string | Any tags assigned to the task. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_conversion_tasks | select | region | DryRun, ConversionTaskId | Describes the specified conversion tasks or all your conversion tasks. For more information, see the VM Import/Export User Guide. For information about the import manifest referenced by this API action, see VM Import Manifest. |
cancel_conversion_task | exec | ConversionTaskId, region | DryRun, ReasonMessage | Cancels an active conversion task. The task can be the import of an instance or volume. The action removes all artifacts of the conversion, including a partially uploaded volume or instance. If the conversion is complete or is in the process of transferring the final disk image, the command fails and returns an exception. |
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 |
|---|---|---|
ConversionTaskId | string | The ID of the conversion task. |
region | string | AWS region (default: us-east-1) |
ConversionTaskId | array | The conversion task IDs. |
DryRun | boolean | Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation. |
ReasonMessage | string | The reason for canceling the conversion task. |
SELECT examples
- describe_conversion_tasks
Describes the specified conversion tasks or all your conversion tasks. For more information, see the VM Import/Export User Guide. For information about the import manifest referenced by this API action, see VM Import Manifest.
SELECT
conversion_task_id,
expiration_time,
import_instance,
import_volume,
state,
status_message,
tags
FROM aws.ec2.conversion_tasks
WHERE region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
AND ConversionTaskId = '{{ ConversionTaskId }}'
;
Lifecycle Methods
- cancel_conversion_task
Cancels an active conversion task. The task can be the import of an instance or volume. The action removes all artifacts of the conversion, including a partially uploaded volume or instance. If the conversion is complete or is in the process of transferring the final disk image, the command fails and returns an exception.
EXEC aws.ec2.conversion_tasks.cancel_conversion_task
@ConversionTaskId='{{ ConversionTaskId }}' --required,
@region='{{ region }}' --required,
@DryRun={{ DryRun }},
@ReasonMessage='{{ ReasonMessage }}'
;