Check Clusters Software Task
Runs checks on the cluster before applying the desired software document across all hosts in the cluster. Checks if all hosts in the cluster are in a good state to be updated with the desired software document. If commit field is set it implies the minimum commit that the check operation should use, however if subsequent commits have been made to the desired state document the check operation will use the most recent desired state document. The result of this operation can be queried by calling the cis/tasks/{task-id} where the task-id is the response of this operation.
Request
URLURL
Path Parameters
Path Parameters
Identifier of the cluster. The parameter must be an identifier for the resource type: ClusterComputeResource.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
{
"commit": "string",
"hosts": [
"string"
]
}
The minimum commit identifier of the desired software document to be used during the check operation. if unset or empty the check opertion will use the latest commit to fetch the desired state document. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.esx.settings.commit. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.esx.settings.commit.
The specific hosts for which checks need to be performed if unset or empty checks are run for all hosts within the cluster. When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: HostSystem. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: HostSystem.
Authentication
Response
Response BodyResponse Body
An identifier for the task created by this API invocation will be returned. If the non-async version of the operation returns a value, this id can be used with the CIS Get Task operation to fetch that value. The normal description of this operation’s return value will follow if one exists. The results of all checks performed.
Errors
com.vmware.vapi.std.errors.invalid_argument : If the commit field of spec specifies an invalid commit, or the hosts field of spec specifies an invalid host or a host not part of the cluster. | com.vmware.vapi.std.errors.not_allowed_in_current_state : If there is another operation in progress or if the commit field of spec specifies a commit that has already been applied.
com.vmware.vapi.std.errors.not_found : If there is no cluster associated with cluster in the system.
com.vmware.vapi.std.errors.error : If there is unknown internal error. The accompanying error message will give more details about the failure. | com.vmware.vapi.std.errors.timed_out : If the operation times out.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
cURL Command
Vendor Extensions
x-vmw-doc-operation: check_task