Function: vRA Machine Custom Properties Create

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 Machine Custom Properties

Public Function: MachineCustomPropertiesCreate

publicMachineCustomPropertiesCreate(objVraMachine:VraMachine,objProperties:Properties):VraMachine{

letobjVraUpdateMachineSpecification:VraUpdateMachineSpecification=newVraUpdateMachineSpecification();

letarrKey:string[]=objProperties.keys;

arrKey.forEach((strKey:string):void=>{
objVraUpdateMachineSpecification.putCustomPropertiesItem(strKey,objProperties.get(strKey));
});

letobjVraHost:VraHost=objVraMachine.host;

letobjVraInfrastructureClient:VraInfrastructureClient=objVraHost.createInfrastructureClient();

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

objVraMachine=objVraMachineService.updateMachine(objVraMachine,objVraUpdateMachineSpecification);

returnobjVraMachine;
}
TypeScript

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like