Function: vRA Machine Create ASync

by Simon Sparks · 3 April 2026

To use this function add it to the class library file named PluginVRAService.ts

GitHub Repository: https://github.com/SimonSparksUK/Orchestrator

Filename: PluginVRAService.ts

Description: Orchestrator Function to Create a Machine Asynchronously

Public Function: MachineCreateASync

publicMachineCreateASync(objVraProject:VraProject,intMachineCount:number,strName:string,strDescription:string,strFlavor:string,strImage:string,strFlavorRef:string,strImageRef:string,arrTag:string[],arrConstraint:string[],objPropertiesCustom:Properties,strMachineBootConfig:string,strAuthentication:"usernamePassword"|"publicPrivateKey"|"generatedPublicPrivateKey"|"keyPairName",strUsername:string,strPassword:string,strSSHKey:string,strKeyPair:string,blnPhoneHomeShouldWait:boolean=false,blnPhoneHomeFailOnTimeout:boolean=false,intPhoneHomeTimeoutSeconds:number=600):VraRequestTracker{

letobjVraHost:VraHost=objVraProject.host;

letobjVraInfrastructureClient:VraInfrastructureClient=objVraHost.createInfrastructureClient();

// @ts-ignore
letobjVraMachineService:VraMachineService=objVraInfrastructureClient.createMachineService();

letobjVraMachineSpecification:VraMachineSpecification=this.buildVraMachineSpecification(objVraProject,intMachineCount,strName,strDescription,strFlavor,strImage,strFlavorRef,strImageRef,arrTag,arrConstraint,objPropertiesCustom,strMachineBootConfig,strAuthentication,strUsername,strPassword,strSSHKey,strKeyPair,blnPhoneHomeShouldWait,blnPhoneHomeFailOnTimeout,intPhoneHomeTimeoutSeconds);

letobjVraRequestTracker:VraRequestTracker=objVraMachineService.createMachineAsync(objVraMachineSpecification);

returnobjVraRequestTracker;
}
TypeScript

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like