System administrators can create and publish VDC compute policies to organization VDCs. With the vCloud API, you can view and modify organization VDC compute policies and change the default compute policies.

To create and manage provider and global VDC compute policies, you must use the vCloud OpenAPI. See Getting Started with vCloud OpenAPI at https://code.vmware.com.

To view VDC compute policies, you must be a system administrator, organization administrator, vApp Author, or vApp User.

To update the VDC compute policies, you must be a system administrator.

To change the default VDC compute policy, you must be a system administrator or organization administrator.

1

View and update the compute policies that are published to an organization VDC.

a

To retrieve the compute policies of an organization VDC, use a GET request to the computePolicies link of the target VDC.

GET https://vcloud.example.com/api/vdc/83/computePolicies

The response contains a VdcComputePolicyReference element for each VDC compute policy.

b

To update the compute policies of an organization VDC, modify the VdcComputePolicyReference element and use a PUT request to the computePolicies link of the target VDC.

PUT https://vcloud.example.com/api/admin/vdc/83/computePolicies
...
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<VdcComputePolicyReferences
   xmlns="http://www.vmware.com/vcloud/v1.5"
   ...>
   <VdcComputePolicyReference
      href=""
      id="57"
      name="fast_mssql_updated"
      type="application/json"/>
</VdcComputePolicyReferences>
2

View and update the default compute policy of an organization VDC.

a

To retrieve the default compute policy of an organization VDC, retrieve an XML representation of the target VDC.

GET https://vcloud.example.com/api/vdc/83

The response contains a DefaultComputePolicy element with the UUID and name of the default compute policy.

b

To change the default compute policy of an organization VDC, modify the DefaultComputePolicy element and use a PUT request to the target VDC.

PUT https://vcloud.example.com/api/vdc/83
...
...
   <IsEnabled>true</IsEnabled>
   <VdcStorageProfiles>
      <VdcStorageProfile
         .../>
    </VdcStorageProfiles>
    <DefaultComputePolicy id="57" name="fast_mssql_updated" type="com.vmware.vcloud.entity.vdcComputePolicy"/>
    <VCpuInMhz2>1000</VCpuInMhz2>
    <ResourceGuaranteedMemory>0.2</ResourceGuaranteedMemory>
    <ResourceGuaranteedCpu>0.2</ResourceGuaranteedCpu>   
...
...