Host Profile Manager Apply Host Config Task

Host Profile Manager Apply Host Config Task

Apply the configuration to the host.

If you specify any user input, the configuration will be saved in the AnswerFile associated with the host. If there is no answer file, the Profile Engine will create one.

Request
URI
POST
https://{api_host}/sdk/vim25/{release}/HostProfileManager/{moId}/ApplyHostConfig_Task
COPY
Path Parameters
string
moId
Required

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 HostProfileManager/{moId}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 9.0.0.0 APIs.


Request Body
ApplyHostConfigRequestType of type(s) application/json
Required
"ApplyHostConfigRequestType Object"
host
Required

Host to be updated. User must have sufficient credentials and privileges to satisfy the contents of the configSpec.

configSpec
Required

Set of configuration changes to be applied to the host. The changes are returned by the HostProfile.HostProfile.ExecuteHostProfile method in the ProfileExecuteResult.ProfileExecuteResult.configSpec property.

array of object
userInput
Optional

Additional host-specific data to be applied to the host. This data is the complete list of deferred parameters verified by the HostProfile.HostProfile.ExecuteHostProfile method, contained in the ProfileExecuteResult object returned by the method.

Authentication
This operation uses the following authentication methods.
Responses
200

This method returns a Task object with which to monitor the operation.

Returns MoRefTask of type(s) application/json
"MoRefTask Object"

500

InvalidState: if the host is not in maintenance mode and the configuration specification requires it.

HostConfigFailed: if the ESX Server cannot apply the configuration changes.

Returns VimFault of type(s) application/json
This response body class contains all of the following: InlineVimFault0
"VimFault Object"

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/sdk/vim25/{release}/HostProfileManager/{moId}/ApplyHostConfig_Task