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
public TriggerDataCollection(objVCACHost:vCACHost):void {
let strHostID:string = objVCACHost.id;
let strModelName:string = "ManagementModelEntities.svc";
let strEntitySetName:string = "DataCollectionStatuses";
let strFilter:string = "FilterSpec/FilterSpecGroup/FilterSpecGroupName eq 'inventory' and FilterSpec/FilterSpecName eq 'vSphere'";
let strOrderBy:string = null;
let strSelect:string = null;
let strTop:string = null;
let strSkip:string = null;
let objLinks = null;
let objProperties = new Properties();
let arrProperties: { LastCollectedTime:any } = { LastCollectedTime:null };
let arrVCACEntity: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