To use this function add it to the class library file named AriaAutomationService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: AriaAutomationService.ts
Description: Trigger vRealize / Aria Automation Data Collection using an OData Query
Function TriggerDataCollection
publicTriggerDataCollection(objVCACHost:vCACHost):void{
letstrHostID:string=objVCACHost.id;
letstrModelName:string="ManagementModelEntities.svc";
letstrEntitySetName:string="DataCollectionStatuses";
letstrFilter:string="FilterSpec/FilterSpecGroup/FilterSpecGroupName eq 'inventory' and FilterSpec/FilterSpecName eq 'vSphere'";
letstrOrderBy:string=null;
letstrSelect:string=null;
letstrTop:string=null;
letstrSkip:string=null;
letobjLinks=null;
letobjProperties=newProperties();
letarrProperties:{ LastCollectedTime:any}={LastCollectedTime:null};
letarrVCACEntity:VCACEntity[]=vCACEntityManager.readModelEntitiesBySystemQuery(strHostID,strModelName,strEntitySetName,strFilter,strOrderBy,strSelect,strTop,strSkip,objProperties);
arrVCACEntity.forEach((objVCACEntity:VCACEntity):void=>{
vCACEntityManager.updateModelEntityBySerializedKey(strHostID,strModelName,strEntitySetName,objVCACEntity.keyString,arrProperties,objLinks,objProperties);
});
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.

Hello – Do you know how to do something similar, but to trigger a directory synchronization within vRA/vIDM? We have a workflow/XaaS that allows a user to add themselves to an AD group, but in order for it to be recognized by vRA a directory sync has to happen afterwards. There is no vRO workflow for a directory sync and no documented REST API or cloud client command.
Cheers