vcenter vm storage policy: get

Returns Information about Storage Policy associated with a virtual machine's home directory and/or its virtual hard disks. This operation was added in vSphere API 6.7

Request:

HTTP request

GET https://{server}/rest/vcenter/vm/{vm}/storage/policy

Path Parameters

Name Type Description
Required
vm string Virtual machine identifier.

Response:

HTTP Status Code: 200

Representation:

{
    "value"{
        "disks"[
            {
                "key""obj-103",
                "value""string"
            }
        ],
        "vm_home""obj-103"
    }
}

Response Type:

Name Type Description
bold = required
value info Overview of Storage Policy associated with a virtual machine's home directory and/or its associated virtual hard disks.
value.vm_home string Storage Policy associated with virtual machine home. This attribute was added in vSphere API 6.7

Optional. Ifunset, the virtual machine's home directory doesn't have any storage policy.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vcenter.StoragePolicy. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vcenter.StoragePolicy.

value.disks list Storage policies associated with virtual disks. The values in this key/value pairs are storage policy identifiers. They will be identifiers for the resource type:com.vmware.vcenter.StoragePolicy If the key/value pairs is empty, the virtual machine does not have any disks or its disks are not associated with a storage policy. This attribute was added in vSphere API 6.7

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.List of {"key": string, "value": string}

value.disks[].key string
value.disks[].value string

Errors:

HTTP Status Code Type Description
500 error if the system reports an error while responding to the request.
400 resource_inaccessible if the virtual machine's configuration state cannot be accessed.
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 does not have the required privileges.