Updated on 2023-08-11 GMT+08:00

get_reference

The get_reference function is the simplified form of the get_attribute function. When the attribute information ends with id or name, use the get_attribute (refID or refName) function.

When an Application Orchestration Service (AOS) designer is used to design a template and set up relationships between multiple elements, the get_reference function is set to automatically obtain the relationships.

Syntax

get_reference: [elementName ]

Parameters

Table 1 Parameters

Parameter

Mandatory or Not

Description

elementName

Yes

Element name defined in the node_templates section of the blueprint file.

Return Value

Value of the parameter

Examples

The following describes how to use the get_reference function to obtain the dynamic attributes of associated elements:

node_templates: 
  my-first-vpc: 
    type: HuaweiCloud.VPC.VPC 
    properties: 
      name: {get_input: name} 
      ciddr: {get_input: cidr}
  my-first-subnet: 
    type: HuaweiCloud.VPC.VPC 
    properties: 
      vpcId: {get_reference: my-first-vpc } # Corresponds to {get_attribute: [my-first-vpc, refID] }
...