ALIYUN::SLB::LoadBalancerClone is used to clone a Server Load Balancer (SLB) instance.
Syntax
{
"Type": "ALIYUN::SLB::LoadBalancerClone",
"Properties": {
"Tags": List,
"ResourceGroupId": String,
"VSwitchId": String,
"LoadBalancerName": String,
"SourceLoadBalancerId": String,
"TagsPolicy": String,
"BackendServersPolicy": String,
"BackendServers": List,
"InstanceChargeType": String,
"LoadBalancerSpec": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
ResourceGroupId | String | No | No | The ID of the resource group to which the new SLB instance belongs. | None |
VSwitchId | String | No | No | The ID of the vSwitch with which the new SLB instance is associated. | The vSwitch must be in the same virtual private cloud (VPC) as the source SLB instance. If you leave this property empty, the vSwitch of the source SLB instance is used. |
SourceLoadBalancerId | String | Yes | No | The ID of the source SLB instance. | None |
BackendServersPolicy | String | No | No | The clone policy. This policy allows you to configure the Elastic Compute Service (ECS) instances listened by the new SLB instance and the weight of each ECS instance. | Default value: clone. Valid values:
|
BackendServers | List | No | Yes | The new ECS instances to be listened by the new SLB instance. | For more information about, see BackendServers properties. |
LoadBalancerName | String | No | No | The name of the new SLB instance. | You can specify a custom string as the instance name. The name must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_). |
Tags | List | No | Yes | The tags that you want to add to the new SLB instance. | You must specify key-value pairs for tags. You can add up to five tags.
For more information, see Tags properties. |
TagsPolicy | String | No | No | The policy of the tags. | Default value: empty. Valid values:
|
InstanceChargeType | String | No | No | The billing method of the new SLB instance. | Default value: PayBySpec. Valid values:
|
LoadBalancerSpec | String | No | No | The specification of the new SLB instance. | Default value: slb.s1.small. Valid values:
The available specifications vary by region. For more information, see FAQ about high-performance CLB instances. |
BackendServers syntax
"BackendServers": [
{
"Type": String,
"ServerId": String,
"Description": String,
"ServerIp": String,
"Weight": Integer
}
]
BackendServers properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
ServerId | String | Yes | Yes | The ID of the backend server. | You can attach only running ECS instances to the new SLB instance as backend servers.
You can attach up to 20 backend servers in a call.
You can attach elastic network interfaces (ENIs) as backend servers only to high-performance SLB instances. |
Weight | Integer | Yes | Yes | The weight of the ECS instance that you want to attach to the new SLB instance. | Valid values: 0 to 100.
Default value: 100. |
ServerIp | String | No | No | The IP address of the backend server. | None |
Type | String | No | No | The type of the backend server. | Default value: ecs. Valid values:
|
Description | String | No | Yes | The description of the backend server. | The description must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_). |
Tags syntax
"Tags": [
{
"Value": String,
"Key": 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 128 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 new SLB instance.
Examples
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"LoadBalancerName": {
"Type": "String",
"Description": "Name of created load balancer. Length is limited to 1-80 characters, allowed to contain letters, numbers, '-, /, _,.' When not specified, a default name will be assigned."
},
"SourceLoadBalancerId": {
"Type": "String",
"Description": "Source load balancer id to clone"
},
"ResourceGroupId": {
"Type": "String",
"Description": "Resource group id."
},
"TagsPolicy": {
"Type": "String",
"Description": "Solution for handle the tags. If select 'clone', it will clone from source load balancer. If select 'empty' it will not coppy tags. If select 'append' it will append the new tags. If select 'replace' it will add new tags.\nDefault is 'empty'. ",
"AllowedValues": [
"clone",
"empty",
"append",
"replace"
],
"Default": "empty"
},
"VSwitchId": {
"Type": "String",
"Description": "The new VSwitch ID to create load balancer instance. For VPC network only and the VSwitch should belong to the VPC which source load balancer is located. When not specified, source load balancer VSwitch ID will be used."
},
"BackendServers": {
"Type": "Json",
"Description": "The list of ECS instance, which will attached to load balancer."
},
"Tags": {
"Type": "Json",
"Description": "Tags to attach to slb. Max support 5 tags to add during create slb. Each tag with two properties Key and Value, and Key is required.",
"MaxLength": 5
},
"BackendServersPolicy": {
"Type": "String",
"Description": "Solution for handle the backend server and weights. If select 'clone', it will clone from source load balancer. If select 'empty' it will not attach any backend servers. If select 'append' it will append the new backend server list to source backed servers. If select 'replace' it will only attach new backend server list. Default is 'clone'. ",
"AllowedValues": [
"clone",
"empty",
"append",
"replace"
],
"Default": "clone"
}
},
"Resources": {
"LoadBalancerClone": {
"Type": "ALIYUN::SLB::LoadBalancerClone",
"Properties": {
"LoadBalancerName": {
"Ref": "LoadBalancerName"
},
"SourceLoadBalancerId": {
"Ref": "SourceLoadBalancerId"
},
"ResourceGroupId": {
"Ref": "ResourceGroupId"
},
"TagsPolicy": {
"Ref": "TagsPolicy"
},
"VSwitchId": {
"Ref": "VSwitchId"
},
"BackendServers": {
"Ref": "BackendServers"
},
"Tags": {
"Ref": "Tags"
},
"BackendServersPolicy": {
"Ref": "BackendServersPolicy"
}
}
}
},
"Outputs": {
"LoadBalancerId": {
"Description": "The id of load balance generated",
"Value": {
"Fn::GetAtt": [
"LoadBalancerClone",
"LoadBalancerId"
]
}
}
}
}
YAML
format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
LoadBalancerName:
Type: String
Description: >-
Name of created load balancer. Length is limited to 1-80 characters,
allowed to contain letters, numbers, '-, /, _,.' When not specified, a
default name will be assigned.
SourceLoadBalancerId:
Type: String
Description: Source load balancer id to clone
ResourceGroupId:
Type: String
Description: Resource group id.
TagsPolicy:
Type: String
Description: >-
Solution for handle the tags. If select 'clone', it will clone from source
load balancer. If select 'empty' it will not coppy tags. If select
'append' it will append the new tags. If select 'replace' it will add new
tags.
Default is 'empty'.
AllowedValues:
- clone
- empty
- append
- replace
Default: empty
VSwitchId:
Type: String
Description: >-
The new VSwitch ID to create load balancer instance. For VPC network only
and the VSwitch should belong to the VPC which source load balancer is
located. When not specified, source load balancer VSwitch ID will be used.
BackendServers:
Type: Json
Description: 'The list of ECS instance, which will attached to load balancer.'
Tags:
Type: Json
Description: >-
Tags to attach to slb. Max support 5 tags to add during create slb. Each
tag with two properties Key and Value, and Key is required.
MaxLength: 5
BackendServersPolicy:
Type: String
Description: >-
Solution for handle the backend server and weights. If select 'clone', it
will clone from source load balancer. If select 'empty' it will not attach
any backend servers. If select 'append' it will append the new backend
server list to source backed servers. If select 'replace' it will only
attach new backend server list. Default is 'clone'.
AllowedValues:
- clone
- empty
- append
- replace
Default: clone
Resources:
LoadBalancerClone:
Type: 'ALIYUN::SLB::LoadBalancerClone'
Properties:
LoadBalancerName:
Ref: LoadBalancerName
SourceLoadBalancerId:
Ref: SourceLoadBalancerId
ResourceGroupId:
Ref: ResourceGroupId
TagsPolicy:
Ref: TagsPolicy
VSwitchId:
Ref: VSwitchId
BackendServers:
Ref: BackendServers
Tags:
Ref: Tags
BackendServersPolicy:
Ref: BackendServersPolicy
Outputs:
LoadBalancerId:
Description: The id of load balance generated
Value:
'Fn::GetAtt':
- LoadBalancerClone
- LoadBalancerId