You can use tags and custom properties to further configure your VMware Aria Automation components and deployments.

In vRealize Automation 7.x, custom properties are responsible for:

  • Providing information about the deployment.

  • Modifying deployment configuration elements, such as VM hardware and OS configurations.

  • Modifying configuration elements for VMware Aria Automation integrations.

  • Attaching information to deployments for use in reporting and for additional payload properties to use in extensibility.

  • Modifying the deployment placement.

Custom properties function as both custom key and value pairs, and also as reserved properties. For more information on reserved properties, see the Custom Properties Reference guide.

These custom properties can be set at different levels including endpoint, reservation, compute resource, business group, cloud template, and property group.

They can also be set at request time in the input forms, changed with Event Broker using the virtualMachineAddOrUpdateCustomProperties workflow output or using the addUpdatePropertyFromVirtualMachineEntity parameter.

VMware Aria Automation 8.x offers similar functionality with some changes:

  • The properties are now part of the Automation Assembler cloud template designer schema. They can also be set at deployment time through input form inputs.

  • The names and meanings have changed and are documented in the VMware Aria Automation Resource Type Schema. The properties that impact the deployment on change are documented as recreateOnUpdate: true.

  • Some extensibility features can also use predefined custom properties, such as the AD integration.

As an example of this custom properties functionality, you can use the scenario for setting the folder name in vCenter that machine will deploy to. In vRealize Automation 7.x, this can be done with the VMware.VirtualCenter.Folder property. This property specifies the name of the inventory folder in the data center in which to put the virtual machine. The default folder is VRM, which is also the vSphere folder in which VMware Aria Automation places provisioned machines if the property is not used. This value can be a path with multiple folders, for example production or email servers. A proxy agent creates the specified folder in vSphere if the folder does not exist. Folder names are case-sensitive. This property is available for virtual provisioning

The equivalent property in VMware Aria Automation 8.x is folderName.

In VMware Aria Automation 8.x, Event Broker can modify properties with the customProperties workflow output on many events and dedicated outputs as described in the Event Broker section.

In vRealize Automation 7.x, tags have a minor function. There are custom use cases where a Automation Orchestrator workflow or a PowerShell cmdlet can update a vCenter VM tag that can be used during or after the deployment.

In VMware Aria Automation 8.x, tags have a larger function.

  • Capability tags define the placement logic during provisioning. They can be set on compute resources, cloud zones, images and image maps, networks, and network profiles.

  • Constraint tags are set on cloud templates and projects so they can match the resources set with capability tags.

  • Standard tags are used to filter, analyze, monitor, and group deployed resources.

Tags are included in different endpoints such as vSphere, Amazon Web Services (AWS), and Microsoft Azure, or created in VMware Aria Automation. Tags can be set at deployment time by Event Broker by using the tags workflow output parameter. VMware Aria Automation 8.x also allows you to update tags as day 2 operations on projects, deployment resources, and machines.

The following example can be used to update tags provided as a properties input on a deployment by using the deployment resource action EditTags. The sample is included in the setDeploymentResourceTagsFromProperties Automation Orchestrator action that can be run as part of the Edit deployment tags workflow.

if (vraHost == null || deploymentId == null || resourceName == null) return null; 

var operation = "POST"; 
var url = "/deployment/api/deployments/" + deploymentId + "/requests"; 

var object = { 
  "actionId": "Deployment.EditTags", 
  "targetId": deploymentId, 
  "inputs": {} 
} 

object.inputs[resourceName] = new Array(); 
for each (var key in tags.keys) { 
  var tag = {"key": key,"value": tags.get(key)}; 
  object.inputs[resourceName].push(tag); 
} 

var content = JSON.stringify(object); 

try { 
         var contentAsString = 
System.getModule("com.vmware.vra.extensibility.plugin.rest").invokeRestOperation(vraHost, 
operation, url, content); 
         var object = JSON.parse(contentAsString); 
    } catch (e) { 
         throw("Unable to POST object url : " + url + "\n" + e + "\nWith Content : " + 
content); 
}

The following example can be used to update tags on a project by using the PATCH operation. The sample is included the in the setProjectTagsFromProperties Automation Orchestrator action that can be run as part of the Edit project tags workflow.

if (vraHost == null || projectId == null) return null; 

var operation = "PATCH"; 
var url = "/iaas/api/projects/" + projectId + "/resource-metadata"; 

var object = {"tags":[]}; 
for each (var key in tags.keys) { 
  var tag = {"key": key,"value": tags.get(key)}; 
  object.tags.push(tag); 
} 

var content = JSON.stringify(object); 

try { 
         var contentAsString = 
System.getModule("com.vmware.vra.extensibility.plugin.rest").invokeRestOperation(vraHost, 
operation, url, content); 
         var object = JSON.parse(contentAsString); 
    } catch (e) { 
         throw("Unable to Patch object url : " + url + "\n" + e + "\nWith Content : " + 
content); 
}

The following example can be used to update custom properties on a machine by using the PATCH operation. The sample is included in the setMachineCustomPropertiesFromProperties Automation Orchestrator action that can be run as part of the Edit machine custom properties workflow.

if (vraHost == null || machineId == null) return null; 

var url = "/iaas/api/machines/" + machineId; 
var object = new Object(); 

var customPropertiesObject = {"customProperties" : customProperties}; 
var content = JSON.stringify(customPropertiesObject); 
System.debug("Updated Custom properties : " + content); 

var operation = "PATCH"; 

try { 
         var contentAsString = 
System.getModule("com.vmware.vra.extensibility.plugin.rest").invokeRestOperation(vraHost, 
operation, url, content); 
         var object = JSON.parse(contentAsString); 
    } catch (e) { 
         throw("Unable to Patch object url : " + url + "\n" + e + "\nWith Content : " + 
content); 
}

For more custom property examples, see Update the Custom Properties of a Machine.