REST API - get

esx settings hosts policies apply effective: get

Returns the effective policy based on system defaults and what has been configured for the 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

GET https://{server}/api/esx/settings/hosts/{host}/policies/apply/effective

Path Parameters

Name Type Description
Required
host string The host identifier.

Response:

HTTP Status Code: 200

Response Body Structure:

{
    "failure_action"{
        "retry_delay"1,
        "retry_count"1,
        "action""FAIL"
    },
    "pre_remediation_power_action""POWER_OFF_VMS",
    "enable_quick_boot"true
}

Headers:

None

Type:

Name Type Description
bold = required
- effective_policy_spec The effective policies that impact the apply operation.
-.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.

-.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 Apply.FailureAction#retryCount number of times on the failed host after Apply.FailureAction#retryDelay. 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.

Defines the possible actions to take, before entering maintenance mode. 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:
POWER_OFF_VMS: Power off VMs before entering maintenance mode. 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.
SUSPEND_VMS: Suspend VMs before entering maintenance mode. 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.
DO_NOT_CHANGE_VMS_POWER_STATE: Do not change the VM power state. 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.

-.enable_quick_boot boolean Enable Quick Boot during remediation of 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.

Errors:

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.
503 service_unavailable If the service is not available.
401 unauthenticated if the caller is not authenticated.