edit-icon download-icon

ALIYUN::SLB::LoadBalancer

Last Updated: Mar 22, 2018

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

Syntax

  1. {
  2. "Type" : "ALIYUN::SLB::LoadBalancer",
  3. "Properties" : {
  4. "VpcId" : String,
  5. "SlaveZoneId" : String,
  6. "Bandwidth" : Integer,
  7. "AddressType" : String,
  8. "VSwitchId" : String,
  9. "LoadBalancerName" : String,
  10. "InternetChargeType" : String,
  11. "MasterZoneId" : String
  12. }
  13. }

Attributes

Attribute 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

Return values

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

  1. {
  2. "ROSTemplateFormatVersion" : "2015-09-01",
  3. "Resources" : {
  4. "CreateLoadBalance": {
  5. "Type": "ALIYUN::SLB::LoadBalancer",
  6. "Properties": {
  7. "LoadBalancerName": "createdByHeat",
  8. "AddressType": "internet",
  9. "InternetChargeType": "paybybandwidth",
  10. }
  11. }
  12. },
  13. "Outputs": {
  14. "LoadBalanceDetails": {
  15. "Value" : {"Fn::GetAtt": ["CreateLoadBalance", "LoadBalancerId"]}
  16. }
  17. }
  18. }
Thank you! We've received your feedback.