ALIYUN::SLB::MasterSlaveServerGroup is used to create a primary/secondary server group.
Notice A primary/secondary server group contains only two ECS instances: a primary server
and a secondary server.
Syntax
{
"Type": "ALIYUN::SLB::MasterSlaveServerGroup",
"Properties": {
"MasterSlaveServerGroupName": String,
"MasterSlaveBackendServers": List,
"LoadBalancerId": String
}
}
Properties
Name | Type | Required | Editable | Description | Validity |
---|---|---|---|---|---|
MasterSlaveServerGroupName | String | No | No | The name of the primary/secondary server group. | None |
MasterSlaveBackendServers | List | Yes | No | The list of backend servers in the primary/secondary server group. | A primary/secondary server group can contain a maximum of two backend servers. If you do not specify this parameter, an empty primary/secondary server group is created. |
LoadBalancerId | String | Yes | No | The ID of the SLB instance. | None |
MasterSlaveBackendServers syntax
"MasterSlaveBackendServers": [
{
"ServerId": String,
"Port": Integer,
"Weight": Integer,
"ServerType": String
}
]
MasterSlaveBackendServers properties
Name | Type | Required | Editable | Description | Validity |
---|---|---|---|---|---|
ServerId | String | Yes | No | The ID of the ECS instance or Elastic Network Interface (ENI) to be added. | None |
ServerType | String | No | No | The type of the backend server. |
Valid values: Master and Slave. Default value: Master. |
Port | Integer | Yes | No | The port used by the backend server. | Valid values: 1 to 65535. |
Weight | Integer | Yes | No | The weight of the backend server. | Valid values: 0 to 100. |
Response parameters
Fn::GetAtt
- MasterSlaveServerGroupId: the ID of the primary/secondary server group.
Examples
{
"ROSTemplateFormatVersion": "2015-09-01",
"Resources": {
"MasterSlaveServerGroup": {
"Type": "ALIYUN::SLB::MasterSlaveServerGroup",
"Properties": {
"MasterSlaveServerGroupName": "Group1",
"MasterSlaveBackendServers": [
{
"ServerId": "vm-233",
"Port": "80",
"Weight": "100",
"ServerType": "Master"
},
{
"ServerId": "vm-232",
"Port": "90",
"Weight": "100",
"ServerType": "Slave"
}
],
"LoadBalancerId": "lb-bp1hv944r69al4j9jkmvx"
}
}
},
"Outputs": {
"MasterSlaveServerGroupId": {
"Value": {
"Fn::GetAtt": [
"MasterSlaveServerGroup",
"MasterSlaveServerGroupId"
]
}
}
}
}