Managed Object - TaskManager(vim.TaskManager)

Property of
ServiceContent
See also
Task, TaskDescription, TaskFilterSpec, TaskHistoryCollector, TaskInfo
Since
2.0


Managed Object Description

The TaskManager managed object provides an interface for creating and managing Task managed objects. Many operations are non-blocking, returning a Task managed object that can be monitored by a client application. Task managed objects may also be accessed through the TaskManager.

Properties

Name Type Description
description PTaskDescription

Locale-specific, static strings that describe Task information to users.
maxCollector Pxsd:int

Maximum number of TaskHistoryCollector data objects that can exist concurrently, per client.
recentTask* PManagedObjectReference[]
to a Task[]

A list of Task managed objects that completed recently, that are currently running, or that are queued to run.

The list contains only Task objects that the client has permission to access, which is determined by having permission to access the Task object's managed entity.

The completed Task objects by default include only Task objects that completed within the past 10 minutes. When connected to vCenter Server, there is an additional default limitation that each of the completed Task objects in this list is one of the last 200 completed Task objects.

This property should not be used for tracking Task completion. Generally, a ListView is a better way to monitor a specific set of Task objects. In releases after vSphere API 5.0, vSphere Servers might not generate property collector update notifications for this property. To obtain the latest value of the property, you can use PropertyCollector methods RetrievePropertiesEx or WaitForUpdatesEx. If you use the PropertyCollector.WaitForUpdatesEx method, specify an empty string for the version parameter. Any other version value will not produce any property values as no updates are generated.

*May not be presentP Required privilege: System.View

Methods

Methods defined in this Managed Object
CreateCollectorForTasks, CreateTask

CreateCollectorForTasks(createCollector)

Creates a TaskHistoryCollector, a specialized HistoryCollector that gathers TaskInfo data objects.

A TaskHistoryCollector does not persist beyond the current client session.

Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the TaskManager used to make the method call.
filter PTaskFilterSpec

The specification for the task query filter.

Since 2.0
P Required privilege: filter

Return Value

Type Description
ManagedObjectReference
to a TaskHistoryCollector
The task collector based on the filter.

Faults

Type Description
InvalidStateThrown if there are more than the maximum number of task collectors.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition



CreateTask(createTask)

Creates a new Task, specifying the object with which the Task is associated, the type of task, and whether the task is cancelable. Use this operation in conjunction with the ExtensionManager.

Required Privileges
Task.Create
Since
VI API 2.5

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the TaskManager used to make the method call.
obj PManagedObjectReference

ManagedObject with which Task will be associated

Since VI API 2.5
taskTypeId Pxsd:string

Extension registered task type identifier for type of task being created

Since VI API 2.5
initiatedBy* Pxsd:string

The name of the user on whose behalf the Extension is creating the task

Since VI API 2.5
cancelable Pxsd:boolean

True if the task should be cancelable, false otherwise

Since VI API 2.5
parentTaskKey* Pxsd:string

Key of the task that is the parent of this task

Since VI API 2.5
activationId* Pxsd:string

Activation Id is a client-provided token to link an API call with a task. When provided, the activationId is added to the TaskInfo

Since VI API 2.5
*Need not be set PRequired privilege - see tooltip for details

Return Value

Type Description
TaskInfoTaskInfo data object describing the new task

Faults

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

Events

Type
None

Show WSDL type definition