vcenter storage policies compliance: list
Returns compliance information about entities matching the filter vcenter.storage.policies.compliance.filter_spec. Entities without storage policy association are not returned. This operation was added in vSphere API 6.7
Request:
HTTP request
GET https://{server}/rest/vcenter/storage/policies/entities/compliance
?filter.status.1=COMPLIANT
&filter.status.2=COMPLIANT
?filter.status.1=COMPLIANT
&filter.status.2=COMPLIANT
Request Query Parameters:
Name | Type | Description |
---|---|---|
bold = required | ||
filter | filter_spec | compliance status of matching entities for which information should be returned. |
filter.status | string[] | Compliance Status that a virtual machine must have to match the filter. This attribute was added in vSphere API 6.7 |
Response:
HTTP Status Code: 200
Representation:
{
"value": [
{
"disks": [
{
"key": "obj-103",
"value": "COMPLIANT"
}
],
"vm": "obj-103",
"vm_home": "COMPLIANT"
},
{
"disks": [
{
"key": "obj-103",
"value": "COMPLIANT"
}
],
"vm": "obj-103",
"vm_home": "COMPLIANT"
}
]
}
"value": [
{
"disks": [
{
"key": "obj-103",
"value": "COMPLIANT"
}
],
"vm": "obj-103",
"vm_home": "COMPLIANT"
},
{
"disks": [
{
"key": "obj-103",
"value": "COMPLIANT"
}
],
"vm": "obj-103",
"vm_home": "COMPLIANT"
}
]
}
Response Type:
Name | Type | Description |
---|---|---|
bold = required | ||
value | summary[] | compliance information about entities matching the filter vcenter.storage.policies.compliance.filter_spec. |
value[].vm | string | Identifier of virtual machine. This attribute was added in vSphere API 6.7 When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: VirtualMachine . When operations return a value of this structure as a result, the field will be an identifier for the resource type: VirtualMachine . |
value[].vm_home | string | Compliance status of the virtual machine home. This attribute was added in vSphere API 6.7 Optional. If unset or empty, vmHome is not associated with a storage policy. |
value[].disks | list | List of the virtual hard disk. This attribute was added in vSphere API 6.7 Optional. If unset or empty, virtual machine entity does not have any disks or its disks are not associated with a storage policy.When clients pass a value of this structure as a parameter, the key in the field key/value pairs must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Disk . When operations return a value of this structure as a result, the key in the field key/value pairs will be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Disk . |
value[].disks[].key | string | |
value[].disks[].value | string | This enumeration defines the set of status values for a compliance operation. This enumeration was added in vSphere API 6.7 Value is one of: COMPLIANT: Entity is in compliance. This constant was added in vSphere API 6.7 NON_COMPLIANT: Entity is out of compliance. This constant was added in vSphere API 6.7 UNKNOWN: Compliance status of the entity is not known. This constant was added in vSphere API 6.7 NOT_APPLICABLE: Compliance computation is not applicable for this entity because it does not have any storage requirement that apply to the object-based datastore on which the entity is placed. This constant was added in vSphere API 6.7 OUT_OF_DATE: Compliance status becomes out of date when the profile associated with the entity is edited and not applied. The compliance status will remain out of date until the latest policy is applied to the entity. This constant was added in vSphere API 6.7 |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
500 | error | if the system reports an error while responding to the request. |
400 | invalid_argument | if the vcenter.storage.policies.compliance.filter_spec.status field contains a value that is not supported by the server. |
503 | service_unavailable | if the system is unable to communicate with a service to complete the request. |
401 | unauthenticated | if the user can not be authenticated. |
403 | unauthorized | if the user doesn't have the required privileges. |