Task Set Task State
Sets task state and optionally sets results or fault, as appropriate for state
Required privileges: Task.Update
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 Task/{moId}
.
The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.
{
"state": "string",
"result": {
"_typeName": "string"
},
"fault": {
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}
}
List of possible states of a task.
Possible values:
queued
: When there are too many tasks for threads to handle.running
: When the busy thread is freed from its current task by finishing the task, it picks a queued task to run.Then the queued tasks are marked as running.
success
: When a running task has completed.error
: When a running task has encountered an error.
The base data object type for all the object model faults that an application might handle.
No Content
InvalidState: If attempting to change states after task is completed or in error, or attempting to set the result or fault incorrectly
{
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}