You can use the vCloud API 1.5 query service to get this information.
Rajesh Kamal.
// vc name
String vcName = "vc name";
// get the query service
QueryService queryService = vcloudClient.getQueryService();
// query the provider vdc and iterate the results.
RecordResult<QueryResultVMWProviderVdcRecordType> result = queryService.queryRecords(QueryRecordType.PROVIDERVDC);
for (QueryResultVMWProviderVdcRecordType record : result.getRecords()) {
// match the actual and the expected vc name.
if (record.getOtherAttributes().containsKey(new QName("vcName")) && record.getOtherAttributes().get(new QName("vcName")).equals(vcName)) {
// prints the provider vdc name
System.out.println(record.getName());
}
}