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, VApp object, or VAppTemplate, but not that of a Media 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 VMware Cloud Director Roles and Their Rights.
Starting with VMware Cloud Director API 31.0, you can change the owner of a vAppTemplate object.
Prerequisites
-
To change the owner of a Disk, VApp, or Catalog object, you must be a system administrator or an organization administrator.
-
To change the owner of a vAppTemplate object, you must be a system administrator, organization administrator, or Catalog Author.
Procedure
Example: Change the Owner of a vApp Template or vApp
- Request for changing the owner of a vApp template:
PUT https://vcloud.example.com/api/vAppTemplate/vappTemplate-44/owner Content-type: application/vnd.vmware.vcloud.owner+xml;version=31.0 ... <?xml version="1.0" encoding="UTF-8"?> <Owner xmlns="http://www.vmware.com/vcloud/v1.5"> <User type="application/vnd.vmware.admin.user+xml" href="https://vcloud.example.com/api/admin/user/120" /> </Owner>
- Request for changing the owner of a vApp:
PUT https://vcloud.example.com/api/vApp/vapp-7/owner Content-type: application/vnd.vmware.vcloud.owner+xml ... <?xml version="1.0" encoding="UTF-8"?> <Owner xmlns="http://www.vmware.com/vcloud/v1.5"> <User type="application/vnd.vmware.admin.user+xml" href="https://vcloud.example.com/api/admin/user/120" /> </Owner>
204 No Content