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
privatecreateTagInVCenterServer(objVAPIClient:VAPIClient,strTagCategoryID:string,strTagName:string):string{
letobjVAPITaggingTagCreateSpec: com_vmware_cis_tagging_tag_create__spec=newcom_vmware_cis_tagging_tag_create__spec();
objVAPITaggingTagCreateSpec.category_id=strTagCategoryID;
objVAPITaggingTagCreateSpec.description=strTagName;
objVAPITaggingTagCreateSpec.name=strTagName;
letobjVAPITaggingTag: com_vmware_cis_tagging_tag=newcom_vmware_cis_tagging_tag(objVAPIClient);
letstrResult:string=objVAPITaggingTag.create(objVAPITaggingTagCreateSpec);
returnstrResult;
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
