Search

Method postEvent(VcEvent eventToPost, VcTaskInfo taskInfo)

Posts the specified event, optionally associating it with a task.

The event being posted should have the following info in it:

  • The ManagedEntity on which the event is being posted should be set in the appropriate VcEntityEventArgument field of the base VcEvent class. It is OK to not set any entity, in which case the event is treated as an event about the system.
  • Some Event fields (VcEvent, VcEvent) are mandatory because of the nature of the structure, but any caller-supplied values will be overwritten by the system.

If the event being posted is to be associated with an existing Task, the appropriate TaskInfo needs to be passed in. This task can either be one returned from a vSphere API operation or an extension task created by calling TaskManager#createTask.

Returns

void

Arguments

Name Type Description
eventToPost VcEvent Fully-specified event to post
taskInfo VcTaskInfo optional task associated with the event