REST API - get

vcenter vm compute policies: get

Returns information about the compliance of a virtual machine with a compute policy in VMware Cloud on AWS. Usage beyond VMware Cloud on AWS is not supported. Warning: This operation is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Request:

HTTP request

GET https://{server}/api/vcenter/vm/{vm}/compute/policies/{policy}

Path Parameters

Name Type Description
Required
vm string Identifier of the virtual machine to query the status for.
policy string Identifier of the policy to query the status for.

Response:

HTTP Status Code: 200

Response Body Structure:

{
    "status""UNKNOWN"
}

Headers:

None

Type:

Name Type Description
bold = required
- info Information about the compliance of the specified virtual machine with the specified compute policy.
-.status string The compliance status of the policy on a specified object. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Defines the compliance states a policy can be in on a particular object in VMware Cloud on AWS. Usage beyond VMware Cloud on AWS is not supported. Warning: This enumeration is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. Value is one of:
UNKNOWN: The object has an unknown compliance state. Warning: This constant is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.
NOT_APPLICABLE: The object is in a state for which the policy does not apply. Warning: This constant is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.
COMPLIANT: The policy is in compliance on the object. Warning: This constant is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.
NOT_COMPLIANT: The policy is not in compliance on the object. Warning: This constant is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Errors:

HTTP Status Code Type Description
404 not_found if a virtual machine with the given identifier does not exist, or if a policy with the given identifier does not exist.
403 unauthorized if the user doesn't have the required privileges.