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 Remove Machine Custom Properties
Public Function: MachineCustomPropertiesRemove
publicMachineCustomPropertiesRemove(objVraMachine:VraMachine,arrKey:string[]):VraMachine{
letobjVraUpdateMachineSpecification:VraUpdateMachineSpecification=newVraUpdateMachineSpecification();
arrKey.forEach((strKey:string):void=>{
objVraUpdateMachineSpecification.putCustomPropertiesItem(strKey,null);
});
letobjVraHost:VraHost=objVraMachine.host;
letobjVraInfrastructureClient:VraInfrastructureClient=objVraHost.createInfrastructureClient();
// @ts-ignore
letobjVraMachineService:VraMachineService=objVraInfrastructureClient.createMachineService();
objVraMachine=objVraMachineService.updateMachine(objVraMachine,objVraUpdateMachineSpecification);
returnobjVraMachine;
}TypeScriptDiscover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
