Apply Hosts Software Task
Applies the desired software document associated with the given host. If commit field is set, it implies the minimum commit that the Software.apply operation should use, however if subsequent commits have been made to the desired state document the apply 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 host. The parameter must be an identifier for the resource type: HostSystem.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
{
"accept_eula": false,
"commit": "string"
}
Accept the VMware End User License Agreement (EULA) before starting the Software.apply operation. The VMware EULA is available for download at, https://www.vmware.com/download/eula.html if unset the Software.apply operation could fail due to the EULA not being accepted.
The minimum commit identifier of the desired software document to be used during the Software.apply operation. if unset or empty the apply operation 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.
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 result of the Software.apply operation.
Errors
com.vmware.vapi.std.errors.already_in_desired_state : If the host is already at specified commit as described in the apply specification. | com.vmware.vapi.std.errors.invalid_argument : If the commit field of spec specifies an invalid commit. | com.vmware.vapi.std.errors.not_allowed_in_current_state : If there is another operation in progress. | com.vmware.vapi.std.errors.unsupported : If the host is not a vLCM managed standlone host.
com.vmware.vapi.std.errors.not_found : If there is no host associated with host in the system or if desired software document is not found.
com.vmware.vapi.std.errors.error : If there is an unknown internal error or if the EULA has not been accepted. 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: apply_task