vcenter compute policies VM: list
Returns policies associated with virtual machines and their compliance status. 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/compute/policies/vm
Response:
HTTP Status Code: 200
Response Body Structure:
{
"policies" : [
{
"policy" : "obj-103",
"status" : "UNKNOWN"
},
{
"policy" : "obj-103",
"status" : "UNKNOWN"
}
]
}
"policies" : [
{
"policy" : "obj-103",
"status" : "UNKNOWN"
},
{
"policy" : "obj-103",
"status" : "UNKNOWN"
}
]
}
Headers:
NoneType:
Name | Type | Description |
---|---|---|
bold = required | ||
- | list_result | The policies associated with virtual machines with their compliance status. |
-.policies | summary[] | The list of policies. 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. |
-.policies[].policy | string | The identifier of a policy. 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. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vcenter.compute.Policy . When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vcenter.compute.Policy . |
-.policies[].status | string | The compliance status of the policy. 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 for a policy in VMware Cloud on AWS. Usage beyond VMware Cloud on AWS is not supported. This policy compliance status is calculated based on compliance status of all the objects associated with the policy and visible to the user. 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 policy has 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 policy is in not applicable 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. COMPLIANT: The policy is in 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_COMPLIANT: The policy is not in 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. |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
403 | unauthorized | if the user does not have the required privileges. |