system_variable[] method
Returns the value of an HCL system variable.
Syntax
hcl.system_variable["variable_name"]
Parameters
Name | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
variable_name |
The name of the HCL system variable. Currently, three HCL system variables are available for use in Python/HCL scripts:
|
Returns
String.
Examples
Return the value of an HCL system variable
Returns development, which is the value of the environment HCL system variable.
hcl.system_variable["environment"]
Returns 11594, which is the value of the organization_id HCL system variable.
hcl.system_variable["organization_id"]
Returns https://apis-us.highbond.com, which is the value of the hb_api_host HCL system variable.
hcl.system_variable["hb_api_host"]
Remarks
For more information, see Using variables in a Python/HCL script.