5.5

Table Of Contents
There are also two queries that you can use to return a list of virtual machines, the disks connected to them,
and the VDC that contains them:
vmDiskRelation
Lists this information for Vm and Disk objects that you own.
AdminvmDiskRelation
Lists this information for all Vm and Disk objects in a cloud (system
administrators only).
Prerequisites
Verify that you are logged in to the vCloud API as a system administrator or the object owner.
Procedure
1 Verify that the independent disk is not connected to any virtual machines.
2 Delete the independent disk.
Make a DELETE request to the URL in the rel="remove" link in the Disk.
The server starts a task to manage the events that lead up to the removal of the object, and returns a Task
element that you can use to track the progress of the task.
Example: Remove an Independent Disk
Request:
DELETE https://vcloud.example.com/api/disk/128
Response:
202 Accepted
...
<Task
...
operation="Deleting Disk (128)"
... >
</Task>
View or Change the Owner of an Object
You can view the owner of a VApp, VAppTemplate, Disk, or Media object by making a GET request to the
object's owner link. If you have adequate rights, you can change the owner of a Disk or VApp object, but not
that of a VAppTemplate or Media object. An administrator can view or change the owner of any object.
The initial owner of a VApp, VAppTemplate, Catalog, Disk, or Media object is the user who created it.
Ownership is expressed in an Owner element that the object representation contains. This element includes a
User element that references the owner. Object-specific rights to change ownership are included in several
predefined roles. See “Predefined Roles and Their Rights,” on page 227.
Prerequisites
To change the owner of a Disk, VApp, or Catalog object, you must be an organization administrator or the
system administrator.
Procedure
1 Retrieve the Owner element from the object.
This element includes a reference to the current owner and an edit URL you can use to change the
owner. This request retrieves the owner of a vApp.
GET https://vcloud.example.com/api/vApp/vapp-7/owner
Chapter 4 Provisioning an Organization
VMware, Inc. 83