The ALIYUN::SLB::LoadBalancer type is used to create a Server Load Balancer instance.

Syntax

{
   "Type": "ALIYUN::SLB::LoadBalancer"
   "Properties" : {
       "VpcId" : String,
       "SlaveZoneId" : String,
       "Bandwidth" : Integer,
       "AddressType" : String,
       "VSwitchId" : String,
       "LoadBalancerName" : String,
       "InternetChargeType" : String,
       "MasterZoneId" : String
   }
}

Properties

Name Type Required Update allowed Description Constraint
VpcId string No No VPC ID N/A
SlaveZoneId string No No slave zone ID of the instance N/A
Bandwidth integer No No Peak bandwidth of a public instance in PayByBandwidth mode

If the created instance is a public instance in PayByBandwidth mode, the parameter value takes effect after it is assigned by the Bandwidth parameter of the listener. If the created instance is a public instance in PayByTraffic mode, the peak bandwidth is specified by the Bandwidth parameter of the listener. In this case, this parameter is ignored.

Value range: 1–1,000, in Mbps.

Default value: 1.

For VPC type instances, this parameter is set in PayByTraffic mode.

AddressType string No No Address type

Value options: internet and intranet.

Default value: internet.

VSwitchId string No No ID of the VSwitch in VPC N/A
LoadBalancerName string No No Name of the Server Load Balancer instance The value is a custom string of 1 to 80 characters including letters, digits, hyphens(-), slashes(/), dots(.), and underscores(_). When this parameter is not specified, a default instance name is assigned by the system.
InternetChargeType string No No Method of payment for a public instance

Value options: PayByBandwidth and PayByTraffic.

Default value: PayByTraffic.

MasterZoneId string No No primary zone ID of the instance N/A

Tags syntax

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Tags attributes

Attribute name Type Required Update allowed Description Constraint
Key String Yes No N/A N/A
Value String No No N/A N/A

Response value

Fn::GetAtt

  • LoadBalancerId: unique ID of the Server Load Balancer instance.
  • NetworkType: network type of the Server Load Balancer instance, which can be VPC or Classic.
  • AddressType: Address type. It is “intranet” or “internet”.
  • IpAddress: IP address of the Server Load Balancer instance.

Example

{
  "ROSTemplateFormatVersion" : "2015-09-01",
  "Resources" : {
    "CreateLoadBalance": {
      "Type": "ALIYUN::SLB::LoadBalancer",
      "Properties": {
        "LoadBalancerName": "createdByHeat",
        "AddressType": "internet",
        "InternetChargeType": "paybybandwidth",
      }
    }
  },
  "Outputs": {
    "LoadBalanceDetails": {
         "Value" : {"Fn::GetAtt": ["CreateLoadBalance", "LoadBalancerId"]}
    }
  }
}