ALIYUN::SLB::LoadBalancer is used to create a Server Load Balancer (SLB) instance.
Syntax
{
"Type": "ALIYUN::SLB::LoadBalancer",
"Properties": {
"DeletionProtection": Boolean,
"AddressType": String,
"Tags": List,
"InternetChargeType": String,
"Bandwidth": Integer,
"SlaveZoneId": String,
"ResourceGroupId": String,
"VpcId": String,
"LoadBalancerName": String,
"VSwitchId": String,
"LoadBalancerSpec": String,
"MasterZoneId": String,
"ModificationProtectionReason": String,
"ModificationProtectionStatus": String,
"AddressIPVersion": String,
"InstanceChargeType": String
}
}Properties
Property | Type | Required | Editable | Description | Constraint |
ResourceGroupId | String | No | Yes | The ID of the resource group. | None. |
DeletionProtection | Boolean | No | Yes | Specifies whether to enable deletion protection. | Valid values:
|
VpcId | String | No | No | The ID of the virtual private cloud (VPC). | None. |
SlaveZoneId | String | No | No | The zone ID of the SLB instance. | None. |
Bandwidth | Integer | No | Yes | The maximum bandwidth of the pay-by-bandwidth Internet-facing SLB instance. | Valid values: 1 to 10000. Unit: Mbit/s. Default value: 1. If you use the pay-by-data-transfer metering method for an internal-facing SLB instance, the maximum bandwidth of the instance is specified by the system.
|
AddressType | String | No | No | The IP address type of the SLB instance. | Valid values:
|
VSwitchId | String | No | No | The ID of the vSwitch. | None. |
LoadBalancerName | String | No | Yes | The name of the SLB instance. | The name must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_). If you do not specify this property, the system assigns a name to the instance. |
InternetChargeType | String | No | Yes | The metering method of the Internet-facing SLB instance. | Valid values:
|
MasterZoneId | String | No | No | The primary zone ID of the SLB instance. | None. |
Tags | List | No | Yes | The tags that you want to add to the SLB instance. | You can add up to five tags. For more information, see Tags properties. |
LoadBalancerSpec | String | No | Yes | The specification of the SLB instance. | Valid values:
The supported specifications vary based on the region. For more information about each specification, see FAQs about CLB instances. |
ModificationProtectionStatus | String | No | Yes | The status of the configuration read-only mode. | Valid values:
|
ModificationProtectionReason | String | No | Yes | The reason why you want to enable the configuration read-only mode. | The reason must be 1 to 80 characters in length, and must start with a letter. It can contain letters, digits, periods (.), and hyphens (-). |
AddressIPVersion | String | No | No | The IP version. | Valid values:
|
InstanceChargeType | String | No | Yes | The metering method of the SLB instance. | Valid values:
|
Tags syntax
"Tags": [
{
"Key": String,
"Value": String
}
]Tags properties
Property | Type | Required | Editable | Description | Constraint |
Key | String | Yes | No | The key of the tag. | The key must be 1 to 64 characters in length, and cannot contain |
Value | String | No | No | The value of the tag. | The value can be up to 128 characters in length, and cannot contain |
Return values
Fn::GetAtt
LoadBalancerId: the ID of the SLB instance.
NetworkType: the network type of the SLB instance.
AddressType: the IP address type of the SLB instance.
IpAddress: the IP address of the SLB instance.
OrderId: the ID of the order.
Bandwidth: the maximum bandwidth.
AddressIPVersion: the IP version of the SLB instance.
SlaveZoneId: the secondary zone ID of the SLB instance.
MasterZoneId: the primary zone ID of the SLB instance.
LoadBalancerName: the name of the SLB instance.
ResourceGroupId: the ID of the resource group.
LoadBalancerSpec: the specification of the SLB instance.
VpcId: the VPC ID of the SLB instance.
VSwitchId: the vSwitch ID of the SLB instance.
PayType: the billing method of the SLB instance.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Description: Test SLB LoadBalancer
Parameters:
MasterZoneId:
Type: String
AssociationProperty: ALIYUN::ECS::Instance:ZoneId
Resources:
LoadBalance:
Type: ALIYUN::SLB::LoadBalancer
Properties:
AddressType: internet
LoadBalancerSpec: slb.s1.small
MasterZoneId:
Ref: MasterZoneId
LoadBalancerName: mytest
Outputs: {}{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": "Test SLB LoadBalancer",
"Parameters": {
"MasterZoneId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::Instance:ZoneId"
}
},
"Resources": {
"LoadBalance": {
"Type": "ALIYUN::SLB::LoadBalancer",
"Properties": {
"AddressType": "internet",
"LoadBalancerSpec": "slb.s1.small",
"MasterZoneId": {
"Ref": "MasterZoneId"
},
"LoadBalancerName": "mytest"
}
}
},
"Outputs": {
}
}For more examples, visit slb.