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 createTagInVCenterServer
private createTagInVCenterServer(objVAPIClient: VAPIClient, strTagCategoryID: string, strTagName: string): string {
let objVAPITaggingTagCreateSpec: com_vmware_cis_tagging_tag_create__spec = new com_vmware_cis_tagging_tag_create__spec();
objVAPITaggingTagCreateSpec.category_id = strTagCategoryID;
objVAPITaggingTagCreateSpec.description = strTagName;
objVAPITaggingTagCreateSpec.name = strTagName;
let objVAPITaggingTag: com_vmware_cis_tagging_tag = new com_vmware_cis_tagging_tag(objVAPIClient);
let strResult: string = objVAPITaggingTag.create(objVAPITaggingTagCreateSpec);
return strResult;
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
