Managed Object - EventManager(vim.event.EventManager)

Property of
ServiceContent
See also
Event, EventArgDesc, EventDescription, EventFilterSpec, EventHistoryCollector, ManagedEntity, TaskInfo


Managed Object Description

This managed object type provides properties and methods for event management support. Event objects are used to record significant state changes of managed entities.

Properties

Name Type Description
description PEventDescription

Static descriptive strings used in events.
latestEvent* PEvent

The latest event that happened on the VirtualCenter server.
maxCollector Pxsd:int

For each client, the maximum number of event collectors that can exist simultaneously.
*May not be presentP Required privilege: System.View

Methods

Methods defined in this Managed Object
CreateCollectorForEvents, LogUserEvent, PostEvent, QueryEvents, RetrieveArgumentDescription

CreateCollectorForEvents(createCollector)

Creates an event history collector, which is a specialized history collector that provides Event objects.

Event collectors do not persist beyond the current client session.

Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the EventManager used to make the method call.
filterEventFilterSpec

The event query filter.

Return Value

Type Description
ManagedObjectReference
to a EventHistoryCollector
The event collector based on the filter.

Faults

Type Description
InvalidArgumentThrown if the filter is null or if any of its fields is invalid, such as an invalid reference to a managed object, alarm, or scheduled task, or an invalid event type or event chain id, etc.
InvalidStateThrown if there are more than the maximum number of event 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



LogUserEvent(logUserEvent)

Logs a user defined event against a particular managed entity.
Required Privileges
None

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the EventManager used to make the method call.
entity PManagedObjectReference
to a ManagedEntity

The entity against which the event is logged. The entity must be the root folder, a DataCenter, a VirtualMachine, a HostSystem, or a ComputeResource.
msgxsd:string

The message to be logged.
P Required privilege: Global.LogEvent

Return Value

Type Description
None

Faults

Type Description
InvalidArgumentThrown if the entity is of a wrong type or the "msg" string is empty.
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



PostEvent(postEvent)

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

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

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.

Required Privileges
Global.LogEvent
Since
VI API 2.5

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the EventManager used to make the method call.
eventToPostEvent

Fully-specified event to post
taskInfo*TaskInfo

optional task associated with the event
*Need not be set

Return Value

Type Description
None

Faults

Type Description
InvalidArgumentThrown if
  • an invalid reference to a managed object is passed in to one of the EntityEventArgument fields
  • an invalid severity value is passed in an EventEx.
InvalidEventno longer thrown by this API
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



QueryEvents(QueryEvent)

Returns the events in specified filter. Returns empty array when there are not any events qualified.
Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the EventManager used to make the method call.
filterEventFilterSpec

The events qualified.

Return Value

Type Description
Event[]The events matching the filter.

Faults

Type Description
InvalidArgumentThrown if the filter is null or if any of its fields is invalid, such as an invalid reference to a managed object, alarm, or scheduled task, or an invalid event type or event chain id, etc.
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



RetrieveArgumentDescription(retrieveArgumentDescription)

Retrieves the argument meta-data for a given Event type
Required Privileges
System.View
Since
vSphere API 4.0

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the EventManager used to make the method call.
eventTypeIdxsd:string



Return Value

Type Description
EventArgDesc[]

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