Esx. Settings. Defaults. Hosts. Policies. Apply Set
This API will set the configured policy.
This operation was added in vSphere API 8.0.0.1.
Returns an authorization error if you do not have all of the privileges described as follows:
- Operation execution requires VcIntegrity.lifecycleSettings.Write.
Request
URI
PUT
https://{api_host}/esx/settings/defaults/hosts/policies/apply
COPY
Request Body
The policy specification.
Esx.Settings.Defaults.Hosts.Policies.Apply.ConfiguredPolicySpec
of type(s)
application/json
Required
"Esx.Settings.Defaults.Hosts.Policies.Apply.ConfiguredPolicySpec Object"
Responses
204
Success!
Operation doesn't return any data structure
400
If invalid value is provided.
Returns
Vapi.Std.Errors.InvalidArgument
of type(s)
application/json
"Vapi.Std.Errors.InvalidArgument Object"
401
If the caller is not authenticated.
Returns
Vapi.Std.Errors.Unauthenticated
of type(s)
application/json
"Vapi.Std.Errors.Unauthenticated Object"
500
If there is an unknown internal error. The accompanying error message will give more details about the failure.
Returns
Vapi.Std.Errors.Error
of type(s)
application/json
"Vapi.Std.Errors.Error Object"
503
If the service is not available.
Returns
Vapi.Std.Errors.ServiceUnavailable
of type(s)
application/json
"Vapi.Std.Errors.ServiceUnavailable Object"
Code Samples
COPY
curl -X PUT -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/esx/settings/defaults/hosts/policies/apply
Esx.settings.defaults.hosts.policies.apply Operations
GET
Esx. Settings. Defaults. Hosts. Policies. Apply Get
PUT
Esx. Settings. Defaults. Hosts. Policies. Apply Set