Creates a server load balancer (SLB) instance.

Syntax

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

Properties

Name Type Required Editable Description Validity
VpcId String No No The VPC ID. N/A
SlaveZoneId String No No The ID of the standby zone where the instance is to be created. N/A
Bandwidth Integer No No The peak bandwidth of an instance that is connected to the public network and billed by fixed bandwidth.

For an instance that is connected to the public network and billed by bandwidth, the parameter is only applicable when the Bandwidth parameter of the SLB listener is specified. For an instance that is connected to the public network and billed by traffic, the parameter is inapplicable. To set the peak bandwidth of the instance, specify the Bandwidth parameter of the SLB listener.

Value range: 1 to 1,000. Unit: Mbit/s.

Default value: 1.

VPC-connected instances are billed by traffic.

AddressType String No No The address type of the SLB instance.

Valid values: internet | intranet.

Default value: internet.

VSwitchId String No No The ID of the VSwitch that is connected to the VPC. N/A
LoadBalancerName String No No The SLB instance name. The name must be 1 to 80 characters in length, including letters, digits, hyphens (-), slashes (/), periods (.), and underscores (_). A name is assigned by the system by default if this parameter is unspecified.
InternetChargeType String No No The billing method of an instance that is connected to the public network.

Valid values: paybybandwidth | paybytraffic.

Default value: paybytraffic.

MasterZoneId String No No The ID of the active zone where the SLB instance is to be created. N/A
Tags List No No The list of tags attached to the SLB instance. The tags are listed in JSON format, describing the TagKey parameter and the TagValue parameter. A maximum of 5 tags can be attached.
LoadBalancerSpec String No No The SLB instance type.

Valid values:

  • slb.s1.small
  • slb.s2.small
  • slb.s2.medium
  • slb.s3.small
  • slb.s3.medium
  • slb.s3.large

The available types vary by region. For more information, see Guaranteed-performance instances.

N/A

Tags syntax

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

Tags Properties

Name Type Required Editable Description Validity
Key String Yes No None N/A
Value String No No None N/A

Response elements

Fn::GetAtt

  • LoadBalancerId: indicates the unique ID of the SLB instance.
  • NetworkType: indicates the network type of the SLB instance. Valid values: vpc | classic.
  • AddressType: indicates the address type of the SLB instance. Valid values: intranet | internet.
  • IpAddress: indicates the IP address of the SLB 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"]}
    }
  }
}