Managed Object - TaskManager

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


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

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

The specification for the task query filter.

Return Value

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

Faults

Type Description
InvalidArgumentThrown if the filter is null or unknown.
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

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

ManagedObject with which Task will be associated
taskTypeIdxsd:string

Extension registered task type identifier for type of task being created
initiatedBy*xsd:string

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

True if the task should be cancelable, else false
parentTaskKey*xsd:string

Key of the task that is the parent of this task

Since vSphere API 4.0
*Need not be set

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