Quantcast
Channel: VMware Communities: Message List - VMware vCloud Director
Viewing all articles
Browse latest Browse all 7719

Re: Rename a VM within a vAPP from the vCloud API

$
0
0

Hi,

 

If you get the <VApp> from the REST API you'll see the list of VMs inside it in a <Children> element.

Each VM is a <Vm> element having a 'href' attribute - you can get the VM by doing GET on this href attribute.

After you GET the VM you'll see a <Link> inside it with rel="edit" - this link should be used for updating a VM.

 

Basically, you GET the XML body of the VM, modify the VM name attribute and then PUT the modified XML body on the same URL.

You also have to specify a Content-Type header in the PUT request: application/vnd.vmware.vcloud.vm+xml

 

Regards,

Todor Todorov


Viewing all articles
Browse latest Browse all 7719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>