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 9.0.0.0 APIs.
"SetTaskStateRequestType Object"
New state for task
Result to set, valid only if task state is TaskInfo.State.success
Fault to set, valid only if task state is error. The fault must be a of a fault type that directly or indirectly extends VimFault.
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