1

Orchestrator Function: Trigger vRA Data Collection using an OData Query

by Simon Sparks · 16 February 2017

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.

You may also like