ALIYUN::SLB::Rule is used to add forwarding rules to an HTTP or HTTPS listener.
Syntax
{
"Type": "ALIYUN::SLB::Rule",
"Properties": {
"ListenerPort": Integer,
"RuleList": List,
"LoadBalancerId": String,
"ListenerProtocol": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
ListenerPort | Integer | Yes | No | The frontend listener port that is used by the Server Load Balancer (SLB) instance. | Valid values: 1 to 65535. |
RuleList | List | Yes | No | The forwarding rules that you want to add to the listener. | You can create up to 10 forwarding rules in a request. Each forwarding rule contains the following properties:
You must specify at least one of Domain and URL. Note The combined value of Domain and URL must be unique within a listener. |
LoadBalancerId | String | Yes | No | The ID of the SLB instance. | None. |
ListenerProtocol | String | No | No | The frontend protocol that is used by the SLB instance. | None. |
RuleList syntax
"RuleList": [
{
"Url": String,
"Domain": String,
"VServerGroupId": String,
"RuleName": String,
"AdvancedSettings": Map
}
]
RuleList properties
Property | Type | Required | Editable | Description | Constraint |
Url | String | No | No | The path that you want to specify in the forwarding rule. |
|
Domain | String | No | No | The request domain name that you want to associate with the forwarding rule. | None. |
VServerGroupId | String | Yes | No | The ID of the vServer group that you want to associate with the forwarding rule. | None. |
RuleName | String | Yes | No | The name of the forwarding rule. | The name must be 1 to 40 characters in length and can contain letters, digits, and the following special characters:
Forwarding rule names must be unique within a listener. |
AdvancedSettings | Map | No | No | The advanced configurations of the server. | None. |
AdvancedSettings syntax
"AdvancedSettings": [{
"Cookie": String,
"StickySession": String,
"HealthCheckConnectPort": Integer,
"StickySessionType": String,
"HealthCheckTimeout": Integer,
"HealthCheck": String,
"HealthCheckURI": String,
"CookieTimeout": Integer,
"HealthCheckHttpCode": String,
"HealthyThreshold": Integer,
"UnhealthyThreshold": Integer,
"Scheduler": String,
"HealthCheckDomain": String,
"ListenerSync": String,
"HealthCheckInterval": Integer
}]
AdvancedSettings Properties
Property | Type | Required | Editable | Description | Constraint |
Cookie | String | No | No | The cookie that is configured on the server. | The name must be 1 to 200 characters in length and can contain only You must specify this property when StickySession is set to on and StickySessionType is set to server. |
StickySession | String | No | No | Specifies whether to enable session persistence. | Valid values:
Note You must specify this property when ListenerSync is set to off. If you set ListenerSync to on, the session persistence configuration of the listener is used. |
HealthCheckConnectPort | Integer | No | No | The backend port that you want to use for health checks. | Valid values: 1 to 65535. Note This property takes effect when HealthCheck is set to on. If you leave HealthCheckConnectPort empty and set HealthCheck to on, the backend port configuration of the listener is used. |
HealthCheck | String | No | No | Specifies whether to enable health checks. | Valid values:
Note This property takes effect when ListenerSync is set to off. If you set ListenerSync to on, the health check configuration of the listener is used. |
HealthCheckURI | String | No | No | The Uniform Resource Identifier (URI) that you want to use for health checks. | This property takes effect when HealthCheck is set to on. |
CookieTimeout | Integer | No | No | The timeout period of the cookie. | Valid values: 1 to 86400. Unit: seconds. Note You must specify this property when StickySession is set to on and StickySessionType is set to insert. |
HealthCheckHttpCode | String | No | No | The HTTP status code for a successful health check. | Separate multiple status codes with commas (,). Valid values: http_2xx, http_3xx, http_4xx, and http_5xx. Note This property takes effect when HealthCheck is set to on. |
HealthyThreshold | Integer | No | No | The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. | In this case, the health status changes from failed to successful. Valid values: 2 to 10. Note This property takes effect when HealthCheck is set to on. |
UnhealthyThreshold | Integer | No | No | The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. | In this case, the health status changes from successful to failed. Valid values: 2 to 10. Note This property takes effect when HealthCheck is set to on. |
Scheduler | String | No | No | The scheduling algorithm. | Valid values:
Note This property takes effect when ListenerSync is set to off. If you set ListenerSync to on, the scheduling algorithm configuration of the listener is used. |
HealthCheckDomain | String | No | No | The domain name that you want to use for health checks. | Valid values:
Note This property takes effect when HealthCheck is set to on. |
ListenerSync | String | No | No | Specifies whether the forwarding rule uses the scheduling algorithm, session persistence, and health check configurations of the listener. | Valid values:
|
HealthCheckInterval | Integer | No | No | The interval between two consecutive health checks. | Valid values: 1 to 50. Unit: seconds. Note This property takes effect when HealthCheck is set to on. |
HealthCheckTimeout | Integer | No | No | The timeout period for a health check response. | If a backend server, such as an Elastic Compute Service (ECS) instance, does not send a response within the specified period of time, the health check fails. Unit: seconds. Valid values: 1 to 300. |
StickySessionType | String | No | No | The method that you want to use to handle a cookie. | Valid values:
|
Return values
Fn::GetAtt
Rules: details of the forwarding rules.