Task#

class Task(ext_id=None, operation=None, operation_description=None, parent_task=None, created_time=None, started_time=None, completed_time=None, status=None, progress_percentage=None, entities_affected=None, sub_tasks=None, sub_steps=None, is_cancelable=None, owned_by=None, completion_details=None, error_messages=None, legacy_error_message=None, warnings=None, last_updated_time=None, cluster_ext_ids=None, root_task=None, is_background_task=None, number_of_subtasks=None, number_of_entities_affected=None, *args, **kwargs)#

Bases: object

The task object tracking an asynchronous operation.

Parameters:
  • ext_id – (ext_id) A globally unique identifier of a task.

  • operation – (operation) The operation name being tracked by the task.

  • operation_description – (operation_description) Description of the operation being tracked by the task.

  • parent_task – (parent_task)

  • created_time – (created_time) UTC date and time in RFC-3339 format when the task was created.

  • started_time – (started_time) UTC date and time in RFC-3339 format when the task was started.

  • completed_time – (completed_time) UTC date and time in RFC-3339 format when the task was completed.

  • status – (status)

  • progress_percentage (min=0, max=100) – (progress_percentage) Task progress expressed as a percentage.

  • entities_affected – (entities_affected) Reference to entities associated with the task.

  • sub_tasks – (sub_tasks) Reference to tasks spawned as children of the current task. The task get response would contain a limited number of subtask references. To get the entire list of subtasks for a task, use the parent task filter in the task list API.

  • sub_steps – (sub_steps) List of steps completed as part of the task.

  • is_cancelable – (is_cancelable) Signifies if the task can be cancelled.

  • owned_by – (owned_by)

  • completion_details – (completion_details) Additional details on the task to aid the user with further actions post completion of the task.

  • error_messages – (error_messages) Error details explaining a task failure. These would be populated only in the case of task failures.

  • legacy_error_message – (legacy_error_message) Provides an error message in the absence of a well-defined error message for the tasks created through legacy APIs.

  • warnings – (warnings) Warning messages to alert the user of issues which did not directly cause task failure. These can be populated for any task.

  • last_updated_time – (last_updated_time) UTC date and time in RFC-3339 format when the task was last updated.

  • cluster_ext_ids – (cluster_ext_ids) List of globally unique identifiers for clusters associated with the task or any of its subtasks.

  • root_task – (root_task)

  • is_background_task – (is_background_task) Signifies if the task is a background task or not.

  • number_of_subtasks – (number_of_subtasks) Number of tasks spawned as children of the current task.

  • number_of_entities_affected – (number_of_entities_affected) Number of entities associated with the task.

property cluster_ext_ids#

List of globally unique identifiers for clusters associated with the task or any of its subtasks.

Type:

list[ str ]

property completed_time#

UTC date and time in RFC-3339 format when the task was completed.

Type:

datetime

property completion_details#

Additional details on the task to aid the user with further actions post completion of the task.

Type:

list[ KVPair ]

property created_time#

UTC date and time in RFC-3339 format when the task was created.

Type:

datetime

property entities_affected#

Reference to entities associated with the task.

Type:

list[ EntityReference ]

property error_messages#

Error details explaining a task failure. These would be populated only in the case of task failures.

Type:

list[ AppMessage ]

property ext_id#

A globally unique identifier of a task.

Type:

str

property is_background_task#

Signifies if the task is a background task or not.

Type:

bool

property is_cancelable#

Signifies if the task can be cancelled.

Type:

bool

property last_updated_time#

UTC date and time in RFC-3339 format when the task was last updated.

Type:

datetime

property legacy_error_message#

Provides an error message in the absence of a well-defined error message for the tasks created through legacy APIs.

Type:

str

property number_of_entities_affected#

Number of entities associated with the task.

Type:

int

property number_of_subtasks#

Number of tasks spawned as children of the current task.

Type:

int

property operation#

The operation name being tracked by the task.

Type:

str

property operation_description#

Description of the operation being tracked by the task.

Type:

str

property owned_by#
Type:

OwnerReference

property parent_task#
Type:

TaskReferenceInternal

property progress_percentage#

Task progress expressed as a percentage.

Type:

int

property root_task#
Type:

TaskReferenceInternal

property started_time#

UTC date and time in RFC-3339 format when the task was started.

Type:

datetime

property status#
Type:

TaskStatus

property sub_steps#

List of steps completed as part of the task.

Type:

list[ TaskStep ]

property sub_tasks#

Reference to tasks spawned as children of the current task. The task get response would contain a limited number of subtask references. To get the entire list of subtasks for a task, use the parent task filter in the task list API.

Type:

list[ TaskReferenceInternal ]

to_dict()#

Returns the model properties as a dictionary

to_str()#

Returns the string representation of the model

property warnings#

Warning messages to alert the user of issues which did not directly cause task failure. These can be populated for any task.

Type:

list[ AppMessage ]