bdamian
Expert
Expert

Cloud Account trigger Data Collection

Is there any way to trigger a Data Collection of a Cloud Account via API call? 

bdamian_0-1652883941541.png

I'm orchestrating the creation of projects with their own new NSX-T segments. I need the data collection in order to create the IPAM ranges in vRA.

Thanks!

---
Damián Bacalov
vExpert 2017-2018-2019-2020-2021-2022
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian
Labels (2)
0 Kudos
4 Replies
DexG83
Enthusiast
Enthusiast

Hi,

I did that for a vRA 8.6.2 solution. I built a vRO Workflow as follows:

  1. Get Cloud Account IDs
    • run Get operation Workflow from /Library/vRealize Automation 8.x and Cloud Services/Sample Rest Operations
    • pathUri: /iaas/api/cloud-accounts-vsphere
  2. Extract the needed Cloud Account ID

  3. run Post operation Workflow from /Library/vRealize Automation 8.x and Cloud Services/Sample Rest Operations
    • pathUri: '/iaas/api/cloud-accounts/' + cloudAccountId + '/private-image-enumeration';

Regards,

Dex

0 Kudos
bdamian
Expert
Expert

This call only sync the VM templates in vCenter, not a Data Collection. 

bdamian_0-1652963633504.png

In fact, NSX-T endpoint doesn't have this option.

 

---
Damián Bacalov
vExpert 2017-2018-2019-2020-2021-2022
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian
0 Kudos
Dan_Johnson
Enthusiast
Enthusiast

Did you manage to find a way of doing this? Looking to do the same and also unable to find a way

If you found this or any other answer useful please use of the Helpful or Correct buttons to award points ---------------------------------------------------------------------- VCP4/5/6-DCV, VCAP5.5-DCA, VCAP6-DCD, VCIX6-DCV, VCIX6-NV ---------------------------------------------------------------------- Follow me on Twitter @tattooedtechy
0 Kudos
Windspirit
Hot Shot
Hot Shot

The only way I found so far is a workaround.

 

I query the resource I want and wait till it's there.

run=true;
do {
  System.sleep(60000) //wait a minute
  jsonObj=vraOperation("GET","/iaas/api/fabric-computes/$filter=name%20eq%20'"+hostShort+"*'",null,false);
  if (jsonObj.content.length>0){
    if (jsonObj.content[0].type == "Host"){
       run=false;
    }
  }
} while (run);

 

0 Kudos