DATASOURCE::SLB::Rules is used to query the forwarding rules that are configured for a listener.
Syntax
{
"Type": "DATASOURCE::SLB::Rules",
"Properties": {
"ListenerPort": String,
"LoadBalancerId": String,
"ListenerProtocol": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
ListenerPort | String | Yes | Yes | The frontend listening port that is used by the Server Load Balancer (SLB) instance. | Valid values: 1 to 65535. |
LoadBalancerId | String | Yes | Yes | The ID of the SLB instance. | None. |
ListenerProtocol | String | No | Yes | The frontend protocol that is used by the SLB instance. | This property must be specified when listeners that use different protocols listen on the same port. |
Return values
Fn::GetAtt
- RuleIds: the IDs of the forwarding rules.
- Rules: details of the forwarding rules.
Property | Type | Description | Constraint |
---|---|---|---|
RuleIds | List | The IDs of the forwarding rules. | None. |
Rules | List | Details of the forwarding rules. | None. |
HealthCheckHttpCode | String | The HTTP status codes for a successful health check. | Multiple HTTP status codes are separated by commas (,). Valid values:
Note This property takes effect when HealthCheck is set to on. |
HealthCheckUri | String | The Uniform Resource Identifier (URI) that is used for health checks. | Note This property takes effect when HealthCheck is set to on. |
CookieTimeout | String | The timeout period of the cookie. | Valid values: 1 to 86400. Unit: seconds. Note This property takes effect when StickySession is set to on and StickySessionType is set to insert. |
RuleId | String | The ID of the forwarding rule. | None. |
Url | String | The request path that is specified in the forwarding rule. | None. |
ListenerProtocol | String | The frontend protocol that is used by the SLB instance. | None. |
HealthCheckTimeout | Integer | The timeout period of a health check response. | If a backend Elastic Compute Service (ECS) instance does not return a health check response within the specified timeout period, the instance fails the health check. Valid values: 1 to 300. Unit: seconds.Note If the value of HealthCheckTimeout is smaller than the value of HealthCheckInterval, the value of HealthCheckTimeout is ignored and the value of HealthCheckInterval is used as the timeout period. This property takes effect when HealthCheck is set to on. |
HealthCheck | String | Indicates whether to enable the health check feature. | 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. |
ListenerSync | String | Indicates whether the forwarding rule uses the scheduling algorithm, session persistence, and health check configurations of the listener. | Valid values:
|
UnhealthyThreshold | Integer | The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. | Valid values: 2 to 10. Note This property takes effect when HealthCheck is set to on. |
HealthyThreshold | Integer | The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. | Valid values: 2 to 10. Note This property takes effect when HealthCheck is set to on. |
HealthCheckInterval | Integer | The interval between consecutive health checks. | Valid values: 1 to 50. Unit: seconds. Note This property takes effect when HealthCheck is set to on. |
HealthCheckConnectPort | Integer | The backend port that is used 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 by default. |
Cookie | String | The cookie that is configured on the server. | The cookie must be 1 to 200 characters in length and can contain only ASCII characters and digits. The cookie cannot contain commas (,), semicolons (;), or spaces. The cookie cannot start with a dollar sign ($). Note This property takes effect when StickySession is set to on and StickySessionType is set to server. |
VServerGroupId | String | The ID of the vServer group that is associated with the forwarding rule. | None. |
Scheduler | String | 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. |
RuleName | String | The name of the forwarding rule. | The name must be 1 to 80 characters in length and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_). Note Forwarding rule names must be unique within the same listener. |
Domain | String | The domain name that is specified in the forwarding rule. | None. |
StickySession | String | Indicates whether to enable session persistence. | Valid values:
Note
|
StickySessionType | String | The method that is used to handle the cookie. | Valid values:
Note This property takes effect when StickySession is set to on. |
HealthCheckDomain | String | The domain name that is used for health checks. | Valid values:
Note This property takes effect when HealthCheck is set to on. |
Examples
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "LoadBalancerId": { "Type": "String", "AssociationProperty":"ALIYUN::SLB::Instance::InstanceId", "Description": "The ID of the CLB instance." } }, "Resources": { "ExtensionDataSource": { "Type": "DATASOURCE::SLB::Rules", "Properties": { "ListenerPort": 3443, "LoadBalancerId": { "Ref": "LoadBalancerId" } } } }, "Outputs": { "RuleIds": { "Description": "The list of rule IDs.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "RuleIds" ] } }, "Rules": { "Description": "The list of rules.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "Rules" ] } } } }