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
publicContentLibraryItemGetIDByName(strTemplateName:string):string{
letobjVMwareContentLibraryItem:com_vmware_content_library_item=newcom_vmware_content_library_item(this.objVAPIClient);
letobjVMwareContentLibraryItemFindSpec:com_vmware_content_library_item_find__spec=newcom_vmware_content_library_item_find__spec();
objVMwareContentLibraryItemFindSpec.name=strTemplateName;
letarrVMwareContentLibraryItemID:string[]=objVMwareContentLibraryItem.find(objVMwareContentLibraryItemFindSpec);
letstrVMwareContentLibraryItemID:string=arrVMwareContentLibraryItemID.shift();
returnstrVMwareContentLibraryItemID;
}TypeScriptDiscover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
