vCloud API Programming Guide
106 VMware, Inc.
Theresponseechoestherequest,andincludesaTaskelementthattrackscreationofthevDC.Thenetwork
createdinExample 6‐10appearsintheAvailableNetworkselement.Ifyouaddedmorenetworkstothe
organizationthatcontainsthisvDC,theywouldalsoappearinthatelement.
Get an Administrative View of a vDC
Referencestoanorganization’svDCsarecontainedintheVdcselementoftheOrgorAdminOrgbody.Toget
anadministrativeviewofavDC,anadministratorcanmakeaGETrequesttoitsadminURL.Therequest
returnsanAdminVdcbody,similartotheoneshownintheresponsesection
ofExample 6‐3.
Modify a vDC
TomodifyavDC,makeaPUTrequesttoitseditlink,andsupplyamodifiedversionoftheVdcbody.In
Example 6‐17,theclientmodifiesthevDCcreatedinExample 6‐3tochangethevaluesintheCpuelement,then
includesthemodifiedbodyinaPUTrequest
totheeditlinkthatwasreturnedwhenthevDCwascreated.
Theresponse,onlypartofwhichisshownintheexample,isanAdminVdcbodycontainingthemodified
values.
Example 6-17. Modify a vDC
Request:
PUT http://vcloud.example.com/api/v1.0/admin/vdc/44
Content-Type: application/vnd.vmware.admin.vdc+xm
<AdminVdc name="org3vdc1" xmlns="http://www.vmware.com/vcloud/v1">
<Description>Example vDC</Description>
<AllocationModel>AllocationPool</AllocationModel>
<StorageCapacity>
<Units>MB</Units>
<Allocated>4096</Allocated>
<Limit>8192</Limit>
</StorageCapacity>
<ComputeCapacity>
<Cpu>
<Units>MHz</Units>
<Allocated>4096</Allocated>
<Limit>4096</Limit>
</Cpu>
<Memory>
<Units>MB</Units>
<Allocated>2048</Allocated>
<Limit>4096</Limit>
</Memory>
</ComputeCapacity>
<NicQuota>0</NicQuota>
<NetworkQuota>0</NetworkQuota>
<ProviderVdcReference type="application/vnd.vmware.admin.providervdc+xml"
name="Main Provider"
href="http://vcloud.example.com/api/v1.0/admin/providervdc/2"/>
</AdminVdc>
Response:
200 OK
Content-Type: application/vnd.vmware.admin.vdc+xm
...
<AdminVdc name="org26vdc1" type="application/vnd.vmware.admin.vdc+xml"
href="http://vcloud.example.com/api/v1.0/admin/vdc/44" ...>
...
<Tasks>
<Task status="running" ... operation="Updating Virtual Datacenter (44)"...>
...
</Task>
</Tasks>