Event Manager Post Event
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 EntityEventArgument field of the base Event 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 (key, chainId, createdTime) 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 CreateTask.
Required privileges: Global.LogEvent
The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId
, in this case EventManager/{moId}
.
The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.
{
"eventToPost": {
"_typeName": "string",
"key": 0,
"chainId": 0,
"createdTime": "string",
"userName": "string",
"datacenter": {
"_typeName": "string",
"name": "string",
"datacenter": {
"_typeName": "string",
"type": "string",
"value": "string"
}
},
"computeResource": {
"_typeName": "string",
"name": "string",
"computeResource": {
"_typeName": "string",
"type": "string",
"value": "string"
}
},
"host": {
"_typeName": "string",
"name": "string",
"host": {
"_typeName": "string",
"type": "string",
"value": "string"
}
},
"vm": {
"_typeName": "string",
"name": "string",
"vm": {
"_typeName": "string",
"type": "string",
"value": "string"
}
},
"ds": {
"_typeName": "string",
"name": "string",
"datastore": {
"_typeName": "string",
"type": "string",
"value": "string"
}
},
"net": {
"_typeName": "string",
"name": "string",
"network": {
"_typeName": "string",
"type": "string",
"value": "string"
}
},
"dvs": {
"_typeName": "string",
"name": "string",
"dvs": {
"_typeName": "string",
"type": "string",
"value": "string"
}
},
"fullFormattedMessage": "string",
"changeTag": "string"
},
"taskInfo": {
"_typeName": "string",
"key": "string",
"task": {
"_typeName": "string",
"type": "string",
"value": "string"
},
"description": {
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
},
"name": "string",
"descriptionId": "string",
"entity": {
"_typeName": "string",
"type": "string",
"value": "string"
},
"entityName": "string",
"locked": [
{
"_typeName": "string",
"type": "string",
"value": "string"
}
],
"state": "string",
"cancelled": false,
"cancelable": false,
"error": {
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
},
"result": {
"_typeName": "string"
},
"progress": 0,
"progressDetails": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"reason": {
"_typeName": "string"
},
"queueTime": "string",
"startTime": "string",
"completeTime": "string",
"eventChainId": 0,
"changeTag": "string",
"parentTaskKey": "string",
"rootTaskKey": "string",
"activationId": "string"
}
}
This event is the base data object type from which all events inherit.
All event objects are data structures that describe events. While event data objects are data structures that describe events, event data type documentation may describe what the event records, rather than the data structure, itself.
This data object type contains all information about a task.
A task represents an operation performed by VirtualCenter or ESX.
No Content
InvalidArgument: 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.
InvalidEvent: no longer thrown by this API
{
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}