Function: vRA Machine Get by ID

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 Get a Machine by ID

Public Function: MachineGetByID

public MachineGetByID(objVraHost: VraHost, strVraMachineID: string): VraMachine {

    let strXPathQuery: string = `id=${strVraMachineID}`;

    let arrVraMachine: VraMachine[] = this.FindAllForType<VraMachine>("Machine", strXPathQuery);

    let objVraMachine: VraMachine = arrVraMachine.find((objVraMachine: VraMachine): boolean => {
        return objVraMachine.id === strVraMachineID;
    });

    return objVraMachine;
}
TypeScript

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like