7.0

Table Of Contents
Table 433. Scripting Examples for the Computed Property Option
Sample String Property Script Sytax Sample Usage
my_unique_id = "" Bash - $my_unique_id
export
my_unique_id="012345678
9"
Windows CMD - %my_unique_id%
set
my_unique_id=0123456789
Windows PowerShell - $my_unique_id
$my_unique_id =
"0123456789"
String Property
The string property value can be a string or the value bound to another string property. A string value can
contain any ASCII characters. For a bound property, use the Properties tab in the blueprint canvas to
select the appropriate property for binding. The property value is then passed to the action scripts as raw
string data.
Sample String Property Script Syntax Sample Usage
admin_email = "admin@email987.com" Bash - $admin_email
echo $admin_email
Windows CMD - %admin_email%
echo %admin_email%
Windows PowerShell - $admin_email
write-output $admin_email
Array Property
The array property value can be an array of strings defined as [“value1”, “value2”, “value3”…] or the value
bound to another array property. When you define values for an array property you must enclose the
array of strings in square brackets. For an array of strings, the value in the array elements can contain
any ASCIl characters. To properly encode a backslash character in an Array property value, add an extra
backslash, for example, ["c:\\test1\\test2"]. For a bound property, use the Properties tab in the
blueprint canvas to select the appropriate property for binding.
For example, consider a load balancer virtual machine that is balancing the load for a cluster of
application server virtual machines. In such a case, an array property is defined for the load balancer
service and set to the array of IP addresses of the application server virtual machines.
These load balancer service configure scripts use the array property to configure the appropriate load
balancing scheme on the Red Hat, Windows, and Ubuntu operating systems.
Configuring vRealize Automation
VMware, Inc. 315