CmdID

CmdID / aws / aws ec2

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

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

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

3 in the AWS CLI reference
--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.