Get Compute Policies
Returns information about the compliance of a virtual machine with a compute policy.
Request
URLURL
Path Parameters
Path Parameters
Identifier of the virtual machine to query the status for. The parameter must be an identifier for the resource type: VirtualMachine.
Identifier of the policy to query the status for. The parameter must be an identifier for the resource type: com.vmware.vcenter.compute.Resources.COMPUTE_POLICY.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Authentication
Response
Response BodyResponse Body
Information about the compliance of the specified virtual machine with the specified compute policy.
{
"status": "UNKNOWN"
}
The ObjectCompliance enumerated type defines the compliance states a policy can be in on a particular object.
UNKNOWN : The object has an unknown compliance state.
NOT_APPLICABLE : The object is in a state for which the policy does not apply.
COMPLIANT : The policy is in compliance on the object.
NOT_COMPLIANT : The policy is not in compliance on the object.
Possible values are: UNKNOWN , NOT_APPLICABLE , COMPLIANT , NOT_COMPLIANT
Errors
com.vmware.vapi.std.errors.unauthorized : if the user doesn’t have the required privileges.
com.vmware.vapi.std.errors.not_found : if a virtual machine with the given identifier does not exist, or if a policy with the given identifier does not exist.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
cURL Command
Vendor Extensions
x-vmw-doc-operation: get