# Data Object - TaskInfo(vim.TaskInfo)

Property of
  Task, TaskEvent, TaskHistoryCollector
Parameter to
  PostEvent
Returned by
  CreateTask, ReadNextTasks, ReadPreviousTasks
Extends
  DynamicData
See also
  LocalizableMessage, LocalizedMethodFault, ManagedEntity, Task, TaskInfoState, TaskReason

## Data Object Description

This data object type contains all information about a task. A task represents an operation performed by VirtualCenter or ESX.

Properties

Name | Type | Description
--- | --- | ---
activationId* | xsd:string | The activation Id is a client-provided token to link an API call with a task. Since vSphere API 6.0
cancelable | xsd:boolean | Flag to indicate whether or not the cancel task operation is supported.
cancelled | xsd:boolean | Flag to indicate whether or not the client requested cancellation of the task.
changeTag* | xsd:string | The user entered tag to identify the operations and their side effects Since vSphere API 4.0
completeTime* | xsd:dateTime | Time stamp when the task was completed (whether success or failure).
description* | LocalizableMessage | The description field of the task describes the current phase of operation of the task. For a task that does a single monolithic activity, this will be fixed and unchanging. For tasks that have various substeps, this field will change as the task progresses from one phase to another. Since vSphere API 4.0
descriptionId | xsd:string | An identifier for this operation. This includes publicly visible internal tasks and is a lookup in the TaskDescription methodInfo data object.
entity* | ManagedObjectReference to a ManagedEntity | Managed entity to which the operation applies.
entityName* | xsd:string | The name of the managed entity, locale-specific, retained for the history collector database.
error* | LocalizedMethodFault | If the task state is "error", then this property contains the fault code.
eventChainId | xsd:int | Event chain ID that leads to the corresponding events.
key | xsd:string | The unique key for the task.
locked* | ManagedObjectReference[] to a ManagedEntity[] | If the state of the task is "running", then this property is a list of managed entities that the operation has locked, with a shared lock.
name* | xsd:string | The name of the operation that created the task. This is not set for internal tasks.
parentTaskKey* | xsd:string | Tasks can be created by another task. This shows key of the task spun off this task. This is to track causality between tasks. Since vSphere API 4.0
progress* | xsd:int | If the task state is "running", then this property contains a progress measurement, expressed as percentage completed, from 0 to 100. If this property is not set, then the command does not report progress.
queueTime | xsd:dateTime | Time stamp when the task was created.
reason | TaskReason | Kind of entity responsible for creating this task.
result* | xsd:anyType | If the task state is "success", then this property may be used to hold a return value.
rootTaskKey* | xsd:string | Tasks can be created by another task and such creation can go on for multiple levels. This is the key of the task that started the chain of tasks. Since vSphere API 4.0
startTime* | xsd:dateTime | Time stamp when the task started running.
state | TaskInfoState | Runtime status of the task.
task | ManagedObjectReference to a Task | The managed object that represents this task.
Properties inherited from DynamicData
None

*Need not be set
Show WSDL type definition
<complexType xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="TaskInfo"> <complexContent> <extension base="vsan:DynamicData"> <sequence> <element name="key" type="xsd:string"/> <element name="task" type="vsan:ManagedObjectReference"/> <element name="description" type="vsan:LocalizableMessage" minOccurs="0"/> <element name="name" type="xsd:string" minOccurs="0"/> <element name="descriptionId" type="xsd:string"/> <element name="entity" type="vsan:ManagedObjectReference" minOccurs="0"/> <element name="entityName" type="xsd:string" minOccurs="0"/> <element name="locked" type="vsan:ManagedObjectReference" minOccurs="0" maxOccurs="unbounded"/> <element name="state" type="vsan:TaskInfoState"/> <element name="cancelled" type="xsd:boolean"/> <element name="cancelable" type="xsd:boolean"/> <element name="error" type="vsan:LocalizedMethodFault" minOccurs="0"/> <element name="result" type="xsd:anyType" minOccurs="0"/> <element name="progress" type="xsd:int" minOccurs="0"/> <element name="reason" type="vsan:TaskReason"/> <element name="queueTime" type="xsd:dateTime"/> <element name="startTime" type="xsd:dateTime" minOccurs="0"/> <element name="completeTime" type="xsd:dateTime" minOccurs="0"/> <element name="eventChainId" type="xsd:int"/> <element name="changeTag" type="xsd:string" minOccurs="0"/> <element name="parentTaskKey" type="xsd:string" minOccurs="0"/> <element name="rootTaskKey" type="xsd:string" minOccurs="0"/> <element name="activationId" type="xsd:string" minOccurs="0"/> </sequence> </extension> </complexContent> </complexType>