List Policies Compliance VM
Returns compliance information about at most 1000 virtual machines matching the filter VM.FilterSpec. If there are no virtual machines matching the VM.FilterSpec an empty List is returned. Virtual machines without storage policy association are not returned.
Request
URLURL
Query Parameters
Query Parameters
Compliance Status that a virtual machine must have to match the filter. Atleast one status must be specified.
Identifiers of virtual machines that can match the filter If unset or empty, virtual machines with any identifier matches the filter When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: VirtualMachine. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: VirtualMachine.
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
map
of
StoragePoliciesComplianceVMInfo
of type application/json
compliance information about virtual machines matching the filter VM.FilterSpec. The key in the result map will be an identifier for the resource type: VirtualMachine.
{
"disks": "COMPLIANT",
"vm_home": "COMPLIANT"
}
The {@Status} enumerated type defines he valid compliance status values for a virtual machine or virtual disk.
COMPLIANT : The virtual machine or virtual disk is in compliance.
NON_COMPLIANT : The virtual machine or virtual disk is in not in compliance.
UNKNOWN_COMPLIANCE : Compliance status of the virtual machine or virtual disk is not known.
NOT_APPLICABLE : Compliance computation is not applicable for this virtual machine or disk because it does not have any storage requirement that apply to the object-based datastore on which the entity is placed.
OUT_OF_DATE : Compliance status becomes out of date when the profile associated with the virtual machine or disk is edited and not applied. The compliance status will remain out of date until the latest policy is applied.
Possible values are: COMPLIANT , NON_COMPLIANT , UNKNOWN_COMPLIANCE , NOT_APPLICABLE , OUT_OF_DATE
The {@Status} enumerated type defines he valid compliance status values for a virtual machine or virtual disk.
COMPLIANT : The virtual machine or virtual disk is in compliance.
NON_COMPLIANT : The virtual machine or virtual disk is in not in compliance.
UNKNOWN_COMPLIANCE : Compliance status of the virtual machine or virtual disk is not known.
NOT_APPLICABLE : Compliance computation is not applicable for this virtual machine or disk because it does not have any storage requirement that apply to the object-based datastore on which the entity is placed.
OUT_OF_DATE : Compliance status becomes out of date when the profile associated with the virtual machine or disk is edited and not applied. The compliance status will remain out of date until the latest policy is applied.
Possible values are: COMPLIANT , NON_COMPLIANT , UNKNOWN_COMPLIANCE , NOT_APPLICABLE , OUT_OF_DATE
Errors
com.vmware.vapi.std.errors.invalid_argument : if the VM.FilterSpec.status field contains a value that is not supported by the server. | com.vmware.vapi.std.errors.unsupported : if the API is invoked against vCenter Server version is less than 6.5
com.vmware.vapi.std.errors.unauthorized : if the user does not have the required privileges.
com.vmware.vapi.std.errors.error : if the system reports an error while responding to the request. | com.vmware.vapi.std.errors.unable_to_allocate_resource : If more than 1000 results match the VM.FilterSpec
com.vmware.vapi.std.errors.service_unavailable : if the system is unable to communicate with a service to complete the request.
‘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-deprecated-method: get
x-vmw-doc-deprecated-path: /rest/vcenter/storage/policies/compliance/vm
x-vmw-doc-operation: list