// VMware vRealize Orchestrator action sample // // This sample assigns a vCenter Tag to a VM // // For vRO/VAPI 7.0+ // // Action Inputs: // endpoint - VAPIEndpoint - VAPI Endpoint // tagId - string - ID of the vCenter Tag // vm - VC:VirtualMachine - VM to which tag will be assigned // // Return type: void //Prep VM VAPI reference object var vapiVm = new com_vmware_vapi_std_dynamic__ID() ; vapiVm.id = vm.id; vapiVm.type = "VirtualMachine"; //Associate VM to tag: var client = endpoint.client(); var assocService = new com_vmware_cis_tagging_tag__association(client); assocService.attach(tagId , vapiVm)