List Policies VM
Returns information about the virtual machines and/or their virtual disks that are associated with the given storage policy.
Request
URLURL
Path Parameters
Path Parameters
storage policy identifier. The parameter must be an identifier for the resource type: com.vmware.vcenter.StoragePolicy.
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
StoragePoliciesVMInfo
of type application/json
Information about the virtual machines and/or their virtual disks that are associated with the given storage policy. The key in the result map will be an identifier for the resource type: VirtualMachine.
{
"disks": [
"string"
],
"vm_home": false
}
List of the virtual disks that are associated with the given storage policy. When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: com.vmware.vcenter.vm.hardware.Disk. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: com.vmware.vcenter.vm.hardware.Disk.
Flag to indicate whether or not the virtual machine home is associated with the given storage policy.
Errors
com.vmware.vapi.std.errors.unauthorized : if the user does not have the required priveleges.
com.vmware.vapi.std.errors.not_found : if there is no policy associated with policy in the system.
com.vmware.vapi.std.errors.unable_to_allocate_resource : if more than 1000 virtual machines are associated with the specified policy. | com.vmware.vapi.std.errors.error : if the backend server encounters some an error while processing the request.
com.vmware.vapi.std.errors.service_unavailable : if the system is unable to communicate with a service necessary 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/{policy}/vm
x-vmw-doc-operation: list