The ALIYUN::SLB::Rule resource adds forwarding rules to a specified HTTP or HTTPS listener.
Syntax
{
"Type": "ALIYUN::SLB::Rule",
"Properties": {
"ListenerPort": Integer,
"RuleList": List,
"LoadBalancerId": String,
"ListenerProtocol": String
}
}Properties
Property name | Type | Required | Update allowed | Description | Constraints |
ListenerPort | Integer | Yes | No | The frontend listening port of the Server Load Balancer instance. | The value ranges from 1 to 65535. |
RuleList | List | Yes | No | The forwarding rules to add. | A single request can add up to 10 forwarding rules. Each forwarding rule contains the following parameters:
Specify either Domain or Url, or both. Note The combination of Domain and Url must be unique within the same listener. |
LoadBalancerId | String | Yes | No | The ID of the Server Load Balancer instance. | None |
ListenerProtocol | String | No | No | The frontend protocol used by the instance. | None |
RuleList syntax
"RuleList": [
{
"Url": String,
"Domain": String,
"VServerGroupId": String,
"RuleName": String,
"AdvancedSettings": Map
}
]RuleList properties
Property name | Type | Required | Update allowed | Description | Constraints |
Url | String | No | No | The access path. |
|
Domain | String | No | No | The request domain name associated with the forwarding rule. | None |
VServerGroupId | String | Yes | No | The ID of the target vServer group for this 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:
The names of different rules within the same listener must be unique. |
AdvancedSettings | Map | No | No | The advanced configuration 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 name | Type | Required | Update allowed | Description | Constraints |
Cookie | String | No | No | The cookie configured on the server. | The cookie must be 1 to 200 characters in length. It can contain only This parameter is required and takes effect only 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 This parameter is required and takes effect when ListenerSync is set to off. If ListenerSync is set to on, the configuration is the same as the listener configuration. |
HealthCheckConnectPort | Integer | No | No | The port on the backend server used for health checks. | The value ranges from 1 to 65535. Note This parameter takes effect when HealthCheck is set to on. If this parameter is empty and HealthCheck is set to on, the backend port of the listener is used by default. |
HealthCheck | String | No | No | Specifies whether to enable health checks. | Valid values:
Note This parameter takes effect when ListenerSync is set to off. If ListenerSync is set to on, the configuration is the same as the listener configuration. |
HealthCheckURI | String | No | No | The URI used for health checks. | This parameter takes effect when HealthCheck is set to on. |
CookieTimeout | Integer | No | No | The cookie timeout period. | Value: 1 to 86400 seconds. Note This parameter is required and takes effect only when StickySession is set to on and StickySessionType is set to insert. |
HealthCheckHttpCode | String | No | No | The HTTP status codes that indicate a normal health check status. | Separate multiple status codes with commas. Valid values: http_2xx, http_3xx, http_4xx, and http_5xx. Note This parameter takes effect when HealthCheck is set to on. |
HealthyThreshold | Integer | No | No | The health check threshold. | The number of consecutive successful health checks required to change the health check status of a backend server from failed to Normal. Value: 2 to 10. Note This parameter takes effect when HealthCheck is set to on. |
UnhealthyThreshold | Integer | No | No | The unhealthy check threshold. | The number of consecutive failed health checks required to change the health check status of a backend server from Normal to failed. Value: 2 to 10. Note This parameter takes effect when HealthCheck is set to on. |
Scheduler | String | No | No | The scheduling algorithm. | Valid values:
Note This parameter takes effect when ListenerSync is set to off. If ListenerSync is set to on, the configuration is the same as the listener configuration. |
HealthCheckDomain | String | No | No | The domain name used for health checks. | Valid values:
Note This parameter takes effect when HealthCheck is set to on. |
ListenerSync | String | No | No | Specifies whether the forwarding rule inherits health check, session persistence, and scheduling algorithm configurations from the listener. | Valid values:
|
HealthCheckInterval | Integer | No | No | The health check interval. | Value: 1 to 50 seconds. Note This parameter 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 ECS instance, does not return a health check response within the specified timeout period, the health check fails. Unit: seconds. The value ranges from 1 to 300. |
StickySessionType | String | No | No | The method used to handle cookies. | Valid values:
|
Return value
Fn::GetAtt
Rules: A list of forwarding rules.