ALIYUN::SLB::LoadBalancerClone is used to clone an SLB instance.

Syntax

{
  "Type": "ALIYUN::SLB::LoadBalancerClone",
  "Properties": {
    "ResourceGroupId": String,
    "SourceLoadBalancerId": String,
    "BackendServersPolicy": String,
    "BackendServers": List,
    "LoadBalancerName": String
  }
}

Properties

Property Type Required Editable Description Constraint
ResourceGroupId String No No The ID of the resource group. None
SourceLoadBalancerId String Yes No The ID of the SLB instance to be cloned. None
BackendServersPolicy String No No The clone policy. The ECS instances listened by the new SLB instance and the weight of each ECS instance are specified in the policy.

Valid values: clone, empty, append, and replace.

Default value: clone.

  • clone: The ECS instances listened by the source SLB instance and the ECS instance weights are cloned to the new SLB instance.
  • empty: No ECS instances are attached to the new SLB instance.
  • append: The ECS instances listened by the source SLB instance and the ECS instance weights are cloned to the new SLB instance. New ECS instances with specified weights are also attached to the new SLB instance.
  • replace: New ECS instances with specified weights are attached to the new SLB instance. However, the ECS instances listened by the source SLB instance and the ECS instance weights are not cloned to the new SLB instance.
BackendServers List No Yes The new ECS instances to be listened. None
LoadBalancerName String No No The name of the new SLB instance. You can set the name to any string. The name must be 1 to 80 characters in length and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).

BackendServers syntax

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

BackendServers properties

Property Type Required Editable Description Constraint
ServerId String Yes Yes The ID of the ECS instance that acts as a backend server. The ECS instances to be attached must be in the running state.
Weight Integer Yes Yes The weight of the ECS instance to be attached to the SLB instance. Valid values: 0 to 100. Default value: 100.

Response parameters

Fn::GetAtt

LoadBalancerId: the ID of the new SLB instance.

Examples

{
  "ROSTemplateFormatVersion" : "2015-09-01",
  "Resources" : {
    "CloneLoadBalance": {
      "Type": "ALIYUN::SLB::LoadBalancerClone",
      "Properties": {
        "SourceLoadBalancerId": "150ebed5f06-cn-beijing-btc-***",
        "LoadBalancerName": "rosnew",
        "BackendServersPolicy": "replace",
        "BackendServers": [
            {
                "ServerId": "i-25zsk****",
                "Weight": 20
            }
        ]
      }
    }
  },
  "Outputs": {
    "LoadBalanceDetails": {
         "Value" : {"Fn::GetAtt": ["CloneLoadBalance", "LoadBalancerId"]}
    }
  }
}