aws ec2 cancel-import-task
Cancels an in-process import virtual machine or import snapshot task. AWS CLI reference
1 example 3 options Its page in the AWS CLI reference
Examples
To cancel an import task
The following cancel-import-task example cancels the specified import image task.
aws ec2 cancel-import-task --import-task-id import-ami-1234567890abcdef0Identify--import-task-idThe ID of the import image or import snapshot task to be canceled.Its output
{
"ImportTaskId": "import-ami-1234567890abcdef0",
"PreviousState": "active",
"State": "deleting"
}For more information, see Monitor an import image task in the VM Import/Export User Guide.
Options
--cancel-reasonThe reason for canceling the task.--dry-runChecks whether you have the required permissions for the action, without actually making the request, and provides an error response.--import-task-idThe ID of the import image or import snapshot task to be canceled.