esx settings hosts policies apply: set
This API will set the configured policy for an ESXi host. Warning: This operation is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.
Request:
HTTP request
PUT https://{server}/api/esx/settings/hosts/{host}/policies/apply
{
"failure_action" : {
"retry_delay" : 1,
"retry_count" : 1,
"action" : "FAIL"
},
"pre_remediation_power_action" : "POWER_OFF_VMS",
"enable_quick_boot" : true
}
"failure_action" : {
"retry_delay" : 1,
"retry_count" : 1,
"action" : "FAIL"
},
"pre_remediation_power_action" : "POWER_OFF_VMS",
"enable_quick_boot" : true
}
Path Parameters
Name | Type | Description |
---|---|---|
Required | ||
host | string | The host identifier. |
Body Parameters:
Name | Type | Description |
---|---|---|
bold = required | ||
- | configured_policy_spec | The policy specification. |
-.failure_action | failure_action | What action is to be taken if entering maintenance mode fails on an ESXi host. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. If unset, configured value would be unset. |
-.failure_action.action | string | What action (FAIL , RETRY ) is to be taken if entering maintenance mode fails on an ESXi host. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Defines the actions to be taken when entering maintenance mode fails on an ESXi host. Warning: This enumeration is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Value is one of:FAIL: Fail the apply operation. Warning: This constant is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. RETRY: Retry the task esx.settings.hosts.policies.apply.failure_action.retry_count number of times on the failed host after esx.settings.hosts.policies.apply.failure_action.retry_delay. Warning: This constant is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.failure_action.retry_delay | long | Time to wait to retry the failed operation in seconds. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. It is only relevant when action has value [RETRY]. This field is optional and it is only relevant when the value of action is RETRY. |
-.failure_action.retry_count | long | Number of times to retry the failed operation. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. It is only relevant when action has value [RETRY]. This field is optional and it is only relevant when the value of action is RETRY. |
-.pre_remediation_power_action | string | Specifies what should be done to the power state of the VM before entering maintenance mode. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. If unset, configured value would be unset. |
-.enable_quick_boot | boolean | Enable Quick Boot during remediation of the host. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. If unset, configured value would be unset. |
Response:
HTTP Status Code: 204
Headers:
NoneType:
NoneErrors:
HTTP Status Code | Type | Description |
---|---|---|
500 | error | If there is an unknown internal error. The accompanying error message will give more details about the failure. |
404 | not_found | If there is no host associated with host in the system. |
400 | invalid_argument | If invalid value is provided. |
503 | service_unavailable | If the service is not available. |
401 | unauthenticated | If the caller is not authenticated. |