Skip to main content

conversion_tasks

Creates, updates, deletes, gets or lists a conversion_tasks resource.

Overview

Nameconversion_tasks
TypeResource
Idaws.ec2.conversion_tasks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
conversion_task_idstringThe ID of the conversion task.
expiration_timestringThe time when the task expires. If the upload isn't complete before the expiration time, we automatically cancel the task.
import_instancestringIf the task is for importing an instance, this contains information about the import instance task.
import_volumestringIf the task is for importing a volume, this contains information about the import volume task.
statestringThe state of the conversion task.
status_messagestringThe status message related to the conversion task.
tagsstringAny tags assigned to the task.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_conversion_tasksselectregionDryRun, ConversionTaskIdDescribes 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_taskexecConversionTaskId, regionDryRun, ReasonMessageCancels 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.

NameDatatypeDescription
ConversionTaskIdstringThe ID of the conversion task.
regionstringAWS region (default: us-east-1)
ConversionTaskIdarrayThe conversion task IDs.
DryRunbooleanChecks 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.
ReasonMessagestringThe reason for canceling the conversion task.

SELECT examples

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

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 }}'
;