To use this function add it to the class library file named vCenterVAPIService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: vCenterVAPIService.ts
Public Function: ContentLibraryItemGetIDByName
public ContentLibraryItemGetIDByName(strTemplateName: string): string {
let objVMwareContentLibraryItem: com_vmware_content_library_item = new com_vmware_content_library_item(this.objVAPIClient);
let objVMwareContentLibraryItemFindSpec: com_vmware_content_library_item_find__spec = new com_vmware_content_library_item_find__spec();
objVMwareContentLibraryItemFindSpec.name = strTemplateName;
let arrVMwareContentLibraryItemID: string[] = objVMwareContentLibraryItem.find(objVMwareContentLibraryItemFindSpec);
let strVMwareContentLibraryItemID: string = arrVMwareContentLibraryItemID.shift();
return strVMwareContentLibraryItemID;
}TypeScriptDiscover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
