i have tried to use {GET /admin/extension/providerVdcReferences} to retrieve the ID of pvdcstorageprofile. However, I cannot find any parameters which are related to pvdcstorageprofile.
I need that to create Organization VDC by using vdcsparams.
My vCloud Director version is 5.5.1.1753992, and I have only one Provider VDC with two Storage Policies.
If any can help, I would appreciate it. Thank You.
providerVdcReferences won't show policies because you are only getting a reference. It's just a list of the Providers and where they can be located at.
You would parse out the first element in the results list, find the URI or Reference, and follow that as a GET.
What you really want is:
GET API-URL/admin/extension/providervdc/id
This will get you the full information about the provider vdc with the Profile/policy information in it.
The following link might not be exactly what you want, but helps explain how to update the Storage Policies .... if you do a get on the pvdc URI, it'll be a start to get the information you want:
GET https://vcloud.example.com/api/admin/extension/providervdc/35/availableStorageProfiles
I used this one to retrieve the Provider VDC's availableStorageProfiles list, however it refereed the empty list.
I need to create an Organization VDC so that pvdcstorageprofiles is required.
POST https://vcloud.example.com/api/admin/org/26/vdcsparams
Content-Type: application/vnd.vmware.admin.createVdcParams+xml
<?xml version="1.0" encoding="UTF-8"?>
<CreateVdcParams
name="org26vdc1"
xmlns="http://www.vmware.com/vcloud/v1.5">
<Description>Example VDC</Description>
<AllocationModel>AllocationVApp</AllocationModel>
<ComputeCapacity>
<Cpu>
<Units>MHz</Units>
<Allocated>2048</Allocated>
<Limit>2048</Limit>
</Cpu>
<Memory>
<Units>MB</Units>
<Allocated>2048</Allocated>
<Limit>2048</Limit>
</Memory>
</ComputeCapacity>
<NicQuota>0</NicQuota>
<NetworkQuota>100</NetworkQuota>
<VdcStorageProfile>
<Enabled>true</Enabled>
<Units>MB</Units>
<Limit>20480</Limit>
<Default>true</Default>
<ProviderVdcStorageProfile
href="https://vcloud.example.com/api/admin/pvdcStorageProfile/101" />
</VdcStorageProfile>
<ResourceGuaranteedMemory>1</ResourceGuaranteedMemory>
<ResourceGuaranteedCpu>1</ResourceGuaranteedCpu>
<VCpuInMhz>2048</VCpuInMhz>
<IsThinProvision>false</IsThinProvision>
<NetworkPoolReference
href="https://vcloud.example.com/api/admin/extension/networkPool/313"/>
<ProviderVdcReference
name="Main Provider"
href="https://vcloud.example.com/api/admin/providervdc/35" />
<UsesFastProvisioning>true</UsesFastProvisioning>
</CreateVdcParams>
VDC cannot be created If pvdcStorageProfile is empty.