EC2 / Client / cancel_import_task

cancel_import_task#

EC2.Client.cancel_import_task(**kwargs)#

Cancels an in-process import virtual machine or import snapshot task.

See also: AWS API Documentation

Request Syntax

response = client.cancel_import_task(
    CancelReason='string',
    DryRun=True|False,
    ImportTaskId='string'
)
Parameters:
  • CancelReason (string) – The reason for canceling the task.

  • 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.

  • ImportTaskId (string) – The ID of the import image or import snapshot task to be canceled.

Return type:

dict

Returns:

Response Syntax

{
    'ImportTaskId': 'string',
    'PreviousState': 'string',
    'State': 'string'
}

Response Structure

  • (dict) –

    • ImportTaskId (string) –

      The ID of the task being canceled.

    • PreviousState (string) –

      The current state of the task being canceled.

    • State (string) –

      The current state of the task being canceled.