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,
"PayType": String,
"ModificationProtectionReason": String,
"ModificationProtectionStatus": String,
"AddressIPVersion": String,
"AutoRenew": Boolean,
"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. | Default value: false. 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 Internet-facing SLB instance on a pay-by-bandwidth basis. | Valid values: 1 to 10000. Unit: Mbit/s. Default value: 1. The maximum bandwidth of an SLB instance in a VPC is set by the system when you configure the pay-by-data-transfer metering method for the instance.
|
AddressType | String | No | No | The IP address type of the SLB instance. |
Default value: internet. 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 (_). By default, if you do not specify this property, the system assigns a name as the value of this property. |
InternetChargeType | String | No | Yes | The metering method of the Internet-facing SLB instance. |
Default value: paybytraffic. 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. | Default value: slb.s1.small. Valid values:
The available specifications vary by region. For more information about each instance specification, see FAQ about high-performance SLB instances. |
PayType | String | No | No | The billing method of the SLB instance. | Valid values:
|
ModificationProtectionStatus | String | No | Yes | Specifies whether to enable the configuration read-only mode. | Default value: NonProtection. 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 can contain letters, digits, periods (.), and hyphens (-). |
AddressIPVersion | String | No | No | The Internet Protocol version. | Valid values:
|
AutoRenew | Boolean | No | No | Specifies whether to enable auto-renewal for the SLB instance. | Default value: false. Valid values:
|
InstanceChargeType | String | No | No | The metering method of the SLB instance. | Default value: PayBySpec. 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 tag key must be 1 to 64 characters in length, and cannot contain http:// or https:// . The tag key cannot start with aliyun or acs: . |
Value | String | No | No | The value of the tag. | The tag value can be up to 128 characters in length, and cannot contain http:// or https:// . The tag value cannot start with aliyun or acs: . |
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 of the Internet-facing SLB instance.
- PayType: the billing method of the SLB instance.
- AddressIPVersion: the Internet Protocol 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.
Examples
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Description": "Test SLB LoadBalancer", "Parameters": { "MasterZoneId": { "Type": "String", "AssociationProperty": "ALIYUN::ECS::Instance:ZoneId" } }, "Resources": { "LoadBalance": { "Type": "ALIYUN::SLB::LoadBalancer", "Properties": { "PayType": "PayOnDemand", "AddressType": "internet", "LoadBalancerSpec": "slb.s1.small", "MasterZoneId": { "Ref": "MasterZoneId" }, "LoadBalancerName": "mytest" } } }, "Outputs": { } }
For more examples, visit BackendServerAttachment.json and BackendServerAttachment.yml. In the examples, the following resource types are used: ALIYUN::SLB::LoadBalancer, ALIYUN::SLB::MasterSlaveServerGroup, and ALIYUN::SLB::BackendServerAttachment.