Function: vCenter Cluster Compute Resource DRS Rule Get by Name

by Simon Sparks · 5 April 2026

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

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

Filename: PluginVCClusterComputeResourceService.ts

Description: Orchestrator Function to Get a DRS Rule by Name from a vCenter Cluster Compute Resource.

Private Function: VcClusterRuleGetByName

private VcClusterRuleGetByName(objVcClusterComputeResource: VcClusterComputeResource, strVcClusterRuleName: string): VcClusterRuleInfo {

    let arrVcClusterRuleInfo: VcClusterRuleInfo[] = this.VcClusterRuleGet(objVcClusterComputeResource);

    let objVcClusterRuleInfo: VcClusterRuleInfo = arrVcClusterRuleInfo.find((objVcClusterRuleInfo: VcClusterRuleInfo): boolean => {
        return objVcClusterRuleInfo.name === strVcClusterRuleName;
    });

    return objVcClusterRuleInfo;
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like