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.
"SetTaskStateRequestType Object"
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 of all data types. Not to be used directly on the wire.
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
"InvalidState Object"
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/sdk/vim25/{release}/Task/{moId}/SetTaskState