ALIYUN::SLB::BackendServerAttachment is used to add backend servers.

Syntax

{
  "Type": "ALIYUN::SLB::BackendServerAttachment",
  "Properties": {
    "LoadBalancerId": String,
    "BackendServers": List,
    "BackendServerList": List,
    "BackendServerWeightList": List
  }
}

Properties

Name Type Required Editable Description Validity
LoadBalancerId String Yes No The unique ID of the SLB instance. None
BackendServerList List No Yes The list of backend servers to add. This parameter is used with BackendServerWeightList. Separate ECS instance IDs with commas (,). This parameter is ignored when the BackendServers parameter is specified.
BackendServerWeightList List No Yes The weights of all ECS instances specified by the BackendServerList parameter in order. If this parameter is not specified, the weight of each ECS instance specified by the BackendServerList parameter is 100. When the number of items specified in BackendServerWeightList is less than that in BackendServerList, the weights of the remaining ECS instances in BackendServerList are set to the last item specified in BackendServerWeightList.
BackendServers List No Yes The list of backend servers to add. Only backend servers in the running state can be attached to the SLB instance.

BackendServers syntax

"BackendServers": [
  {
    "ServerId" : String,
    "Weight" : Integer
  }
]

BackendServers properties

Name Type Required Editable Description Validity
ServerId String Yes Yes The ID of the ECS instance. The ECS instance must be in the running state.
Weight Integer Yes Yes The weight of the ECS instance in the SLB instance. Valid values: 0 to 100. Default value: 100.

Response parameters

Fn::GetAtt

  • BackendServers: the backend servers added to the SLB instance.
  • LoadBalancerId: the ID of the SLB instance.

Examples

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "Attachment2": {
      "Type": "ALIYUN::SLB::BackendServerAttachment",
      "Properties": {
        "LoadBalancerId": "15187200816-cn-beijing-btc-****",
        "BackendServerList": [
          "i-25o0m****",
          "i-25zsk****"
        ],
        "BackendServerWeightList": [
          "20",
          "100"
        ]
      }
    }
  }
}