ALIYUN::ALB::BackendServerAttachment is used to add backend servers to a server group.
Syntax
{
"Type": "ALIYUN::ALB::BackendServerAttachment",
"Properties": {
"ServerGroupId": String,
"Servers": List,
"RemoteIpEnabled": Boolean
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
ServerGroupId | String | Yes | No | The ID of the server group. | None. |
Servers | List | Yes | Yes | The backend servers that you want to add to the server group. | You can add up to 40 backend servers to a server group. For more information, see Servers properties. |
RemoteIpEnabled | Boolean | No | Yes | Specifies whether to enable the remote IP feature. | You can add up to 200 servers in a call. Valid values:
Note This property takes effect when Servers.ServerType is set to Ip. |
Servers syntax
"Servers": [
{
"ServerType": String,
"Description": String,
"ServerId": String,
"ServerIp": String,
"Port": Integer,
"Weight": Integer,
"RemoteIpEnabled": Boolean
}
]
Servers properties
Property | Type | Required | Editable | Description | Constraint |
ServerId | String | Yes | Yes | The resource ID or IP address. | Valid values:
|
ServerType | String | Yes | Yes | The type of the backend server. | Valid values:
|
Description | String | No | Yes | The description of the backend server. | The description must be 2 to 256 characters in length. |
Port | Integer | No | Yes | The port of the backend server. | Valid values: 1 to 65535. Note You must specify this property when ServerType is set to Ecs, Eni, Eci, or Ip. You do not need to specify this property when ServerType is set to Fc. |
ServerIp | String | No | Yes | The IP address in inclusive ENI mode. | None. Note You do not need to specify this property when ServerType is set to Fc. |
Weight | Integer | No | Yes | The weight of a backend server. | Valid values: 0 to 100. Default value: 100. Note If you set this property to 0, no requests are forwarded to the backend server. You do not need to specify this property when ServerType is set to Fc. |
RemoteIpEnabled | Boolean | No | Yes | Specifies whether to enable the remote IP feature. | You can add up to 200 servers in a call. Valid values:
Note This property takes effect when ServerType is set to Ip. |
Return values
Fn::GetAtt
ServerGroupId: the ID of the server group.
Examples
YAML
format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ServerGroupId:
Type: String
Description: The ID of the server group.
Default: sgp-46ndzg2wz4v5mp1****
Resources:
BackendServerAttachment:
Type: ALIYUN::ALB::BackendServerAttachment
Properties:
ServerGroupId:
Ref: ServerGroupId
Servers:
- Description: test
Port: 80
ServerId: ecs-bp67acfmxazb4p****
ServerIp: 192.168.1.1
ServerType: Ecs
Weight: 100
Outputs:
ServerGroupId:
Description: The ID of the server group.
Value:
Fn::GetAtt:
- BackendServerAttachment
- ServerGroupId
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ServerGroupId": {
"Type": "String",
"Description": "The ID of the server group.",
"Default": "sgp-46ndzg2wz4v5mp1****"
}
},
"Resources": {
"BackendServerAttachment": {
"Type": "ALIYUN::ALB::BackendServerAttachment",
"Properties": {
"ServerGroupId": {
"Ref": "ServerGroupId"
},
"Servers": [
{
"Description": "test",
"Port": 80,
"ServerId": "ecs-bp67acfmxazb4p****",
"ServerIp": "192.168.1.1",
"ServerType": "Ecs",
"Weight": 100
}
]
}
}
},
"Outputs": {
"ServerGroupId": {
"Description": "The ID of the server group.",
"Value": {
"Fn::GetAtt": [
"BackendServerAttachment",
"ServerGroupId"
]
}
}
}
}