Orchestrator Function: vCenter VAPI Plugin Content Library Item Get Path To File ISO

by Simon Sparks · January 17, 2026

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

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

Filename: vCenterVAPIService.ts

Function ContentLibraryItemGetPathToFileISO

public ContentLibraryItemGetPathToFileISO(objVAPIClient: VAPIClient, strContentLibraryName: string, strContentLibraryItemName: string): { objVAPIContentLibraryModel: com_vmware_content_library__model, objVAPIContentLibraryItemModel: com_vmware_content_library_item__model, objVAPIContentLibraryStorageBacking: com_vmware_content_library_storage__backing } {

    let objVAPIContentLibraryModel: com_vmware_content_library__model = this.ContentLibraryGet(objVAPIClient, strContentLibraryName);

    let arrVAPIContentLibraryStorageBacking: com_vmware_content_library_storage__backing[] = objVAPIContentLibraryModel.storage_backings;

    arrVAPIContentLibraryStorageBacking = arrVAPIContentLibraryStorageBacking.filter((objVAPIContentLibraryStorageBacking: com_vmware_content_library_storage__backing): boolean => {
        return objVAPIContentLibraryStorageBacking.type === com_vmware_content_library_storage__backing_type.DATASTORE;
    });

    let objVAPIContentLibraryStorageBacking: com_vmware_content_library_storage__backing = arrVAPIContentLibraryStorageBacking[0];

    let arrVAPIContentLibraryItemModel: com_vmware_content_library_item__model[] = this.ContentLibraryItemListByType(objVAPIClient, objVAPIContentLibraryModel, "iso");

    let objVAPIContentLibraryItemModel: com_vmware_content_library_item__model = arrVAPIContentLibraryItemModel.find((objVAPIContentLibraryItemModel: com_vmware_content_library_item__model): boolean => {
        return objVAPIContentLibraryItemModel.name == strContentLibraryItemName;
    });

    objVAPIClient.close();

    return {
        objVAPIContentLibraryModel,
        objVAPIContentLibraryItemModel,
        objVAPIContentLibraryStorageBacking
    };
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like