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

ULB.Member

Element Description

For ECSs under a shared load balancer, one pool corresponds to multiple ECSs. You can add or delete ECSs as required.

Element Properties

Table 1 Property Description

Property

Required

Descripiton

weight

No

Weight of an ECS, which determines the proportion of requests to be forwarded compared with other members in the same ECS group

Type: integer

Value Description: Supports customization. The value is an integer between 1 and 256, for example, 3.

Suggestion: Set the value based on specifications and requirements.

address

No

Private IP address of the backend ECS added to the listener

Type: ip Array

Value Description: Indicates the private network IP address generated after an ECS is created, for example, 192.168.0.45.

Value Constraint: The IP address must be the private network IP address of the existing ECS instance. The ECS and listener must be in the same subnet. Address and serverId have one and only one item can be filled in.

Suggestion: You are advised to drag the object to the ECS.CloudServer and use {get_attribute: [ECS element, privateIps]} to automatically generate the value. Alternatively, query the private network IP address on the ECS page and enter it accordingly.

poolId

Yes

ID of the ECS group to which the ECS is to be added

Type: string

Value Description: Indicates the ID of the ECS group to which the ECS is to be added.

Suggestion: Use the get_reference function to automatically generate the value.

subnetId

Yes

ID of the subnet where the ECS and listener are located

Type: HuaweiCloud.VPC.Subnet.All.Id

Value Description: Indicates the ID of the subnet of the VPC.

Value Constraint: The subnet ID must be the same as that in the listener.

Suggestion: Drag the object to the VPC.Subnet object and use {get_attribute: [element name, neutron_subnet_id]} to automatically generate the value. Alternatively, query the subnet ID on the VPC details page.

serverId

No

ID of the backend ECS added to the listener

Type: string Array

Value Description: Indicates the ID generated after an ECS is created, for example, b7a65ad3-c031-43cc-93ac-ac6dbdbd2295.

Value Constraint: The ID must be the ID of the existing ECS instance. The ECS and listener must be in the same subnet. Address and serverId have one and only one item can be filled in.

Suggestion: You are advised to drag the object to the ECS.CloudServer and use {get_attribute: [ECS element, refID]} to automatically generate the value. Alternatively, query the ID on the ECS page and enter it accordingly.

port

Yes

Backend port of the ECS

Type: integer

Value Description: Supports customization. The value is an integer between 1 and 65535, for example, 8089.

Suggestion: Set the value based on specifications and requirements.

Relationships Between Elements

Table 2 Relationship description

Description

Target

Connected

VPC.Subnet

Connected

ECS.CloudServer

ContainedIn

ULB.Pool

Return Value

Property

Type

Description

refID

string

Backend ECS instance ID

poolId

string

ID of the ECS group to which the backend ECS belongs

Blueprint Example

tosca_definitions_version: huaweicloud_tosca_version_1_0 
 inputs: 
   pool_protocol: 
     description: 'ECS group protocol, which must be consistent with the listener protocol' 
   pool_listenerId: 
     description: Belonged listener ID 
   pool_lbAlgorithm: 
     description: Allocation policy type 
   delay: 
     description: Interval for health check (unit: s) 
   timeout: 
     description: Maximum timeout duration for health check (unit: s) 
   max_retries: 
     description: Threshold for determining whether to change the health check status. That is, change the health check status of the backend ECS from success to fail upon certain consecutive failures, and from fail to success upon certain consecutive successes. 
     description: Health check protocol 
   subnetId: 
     description: "ID of the subnet to which the ECS and listener belong (subnet ID rather than subnet network ID" 
   address: 
     description: Private IP address of the backend ECS added to the listener 
   port: 
     description: Backend port of the ECS 
 node_templates: 
   pool: 
     type: HuaweiCloud.ULB.Pool 
     properties: 
       protocol: 
         get_input: pool_protocol 
       listenerId: 
         get_input: pool_listenerId 
       lbAlgorithm: 
         get_input: pool_lbAlgorithm 
   health-monitor: 
     type: HuaweiCloud.ULB.Healthmonitor 
     properties: 
       delay: 
         get_input: delay 
       timeout: 
         get_input: timeout 
       maxRetries: 
         get_input: max_retries 
       type: 
         get_input: type 
       poolId: 
         get_reference: pool 
     requirements: 
       - poolId: 
           node: pool 
   member: 
     type: HuaweiCloud.ULB.Member 
     properties: 
       subnetId: 
         get_input: subnetId 
       address: 
         - get_input: address 
       port: 
         get_input: port 
       poolId: 
         get_reference: pool 
     requirements: 
       - poolId: 
           node: pool