Skip to content

Instantly share code, notes, and snippets.

@kclinden
Created December 11, 2018 20:01
Show Gist options
  • Save kclinden/547c248c76327874af3cf4b1a2beb9ea to your computer and use it in GitHub Desktop.
Save kclinden/547c248c76327874af3cf4b1a2beb9ea to your computer and use it in GitHub Desktop.
Get Tag Categories
//Input: endpoint [VAPI:VAPIEndpoint]
//Return: Array/string
if(!endpoint){
return null
}
var client = endpoint.client();
var categories = new com_vmware_cis_tagging_category(client) ;
var catArray = [];
for each(cat in categories.list()){
var wut = categories.get(cat);
//System.log(wut.name);
catArray.push(wut.name.toString());
}
System.log(catArray.sort());
return catArray;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment