Variable Reference
During template compilation, you can reference a defined variable or reference a member variable of another object, just like the variable reference during function compilation. You can also reference other existing values in an Application Orchestration Service (AOS) template.
To ease template compilation, different reference methods are used based on the reference objects:
- To reference input parameters, use get_input.
- To reference element properties, use get_attribute or get_reference.
- To reference mapping tables, use get_in_map.
The preceding reference methods are also called built-in functions. In addition to reference functions, built-in functions also include many other functions. For more information, see Table 1.
Built-In Function |
Description |
---|---|
Used to obtain the values of input parameters in the inputs section of the template file. |
|
Used to obtain the initialization results of other elements in the template. |
|
Simplified form of the get_attribute function. When the attribute information ends with id or name, use the get_attribute (refID or refName) function. |
|
Used to obtain the content in mapping tables. |
|
Used to define whether elements need to be deployed, including cond_eq, cond_not, cond_and, cond_or, and cond_if. |
|
Used to encode character strings in base64 mode. |
|
Used to convert description fields into strings and concatenate them. It can be embedded with the get_attribute and get_input functions. |
|
Used together with the select/get_list_length function in most cases. The split function is mainly used in the following scenarios:
|
|
Used to obtain the object with a specified subscript from an array structure. Generally, this function is used together with the split function. |
|
Used to calculate the number of elements in an array structure. Generally, this function is used together with the split function. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.