# Managed Object - Task

Property of
  ClusterAttemptedVmInfo, ConverterTaskInfo, ManagedEntity, ScheduledTaskInfo, StoragePlacementResult, TaskInfo, TaskInProgress, TaskManager, VsanUpgradeSystemUpgradeHistoryItem
Extends
  ExtensibleManagedObject
See also
  LocalizableMessage, MethodFault, TaskInfo, TaskInfoState
Since
  null

## Managed Object Description

Properties

Name | Type | Description
--- | --- | ---
info | TaskInfo |
Properties inherited from ExtensibleManagedObject
availableField, value

Methods

Methods defined in this Managed Object
CancelTask, SetTaskDescription, SetTaskState, UpdateProgress
Methods inherited from ExtensibleManagedObject
setCustomValue

# CancelTask

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the Task used to make the method call.

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
InvalidState |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# SetTaskDescription

Required Privileges
  Task.Update
Since
  vSphere API 4.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the Task used to make the method call.
description P | LocalizableMessage | Since vSphere API 4.0

P Required privilege: description

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# SetTaskState

Required Privileges
  Task.Update
Since
  VI API 2.5

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the Task used to make the method call.
state P | TaskInfoState | Since VI API 2.5
result* P | xsd:anyType | Since VI API 2.5
fault* P | MethodFault | Since VI API 2.5

*Need not be set P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
InvalidState |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# UpdateProgress

Required Privileges
  Task.Update
Since
  VI API 2.5

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the Task used to make the method call.
percentDone P | xsd:int | Since VI API 2.5

P Required privilege: percentDone

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
InvalidState |
OutOfBounds |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None