Queries the forwarding rules configured for a specified listener.
Syntax
{
"Type": "DATASOURCE::SLB::Rules",
"Properties": {
"ListenerPort": String,
"LoadBalancerId": String,
"ListenerProtocol": String,
"RefreshOptions": String
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
ListenerPort |
String |
Yes |
Yes |
The frontend listening port of 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 of the SLB instance. |
This property must be specified when listeners that use different protocols listen on the same port. |
|
RefreshOptions |
String |
No |
Yes |
The refresh policy for data source resources when the stack is updated. |
Valid values:
|
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. |
Separate multiple HTTP status codes with commas (,). Valid values:
Note
This property takes effect only when HealthCheck is set to on. |
|
HealthCheckUri |
String |
The URI used for health checks. |
Note
This property takes effect only 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 only 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 specified in the forwarding rule. |
None. |
|
ListenerProtocol |
String |
The frontend protocol of 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 timeout period specified by HealthCheckTimeout becomes invalid, and the value of HealthCheckInterval is used as the timeout period. This property takes effect only when HealthCheck is set to on. |
|
HealthCheck |
String |
Whether the health check feature is enabled. |
Valid values:
Note
This property takes effect only when ListenerSync is set to off. If you set ListenerSync to on, the health check configuration of the listener is used. |
|
ListenerSync |
String |
Whether the forwarding rule uses the scheduling algorithm, session persistence, and health check configurations of the listener. |
Valid values:
|
|
UnhealthyThreshold |
Integer |
The number of consecutive health check failures required before a healthy backend server is declared unhealthy. |
Valid values: 2 to 10. Note
This property takes effect only when HealthCheck is set to on. |
|
HealthyThreshold |
Integer |
The number of consecutive health check successes required before an unhealthy backend server is declared healthy. |
Valid values: 2 to 10. Note
This property takes effect when HealthCheck is set to on. |
|
HealthCheckInterval |
Integer |
The interval between two consecutive health checks. |
Valid values: 1 to 50. Unit: seconds. Note
This property takes effect only when HealthCheck is set to on. |
|
HealthCheckConnectPort |
Integer |
The port used for health checks on backend servers. |
Valid values: 1 to 65535. Note
This property takes effect only 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 configured on the backend 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 only when StickySession is set to on and StickySessionType is set to server. |
|
VServerGroupId |
String |
The ID of the vServer group associated with the forwarding rule. |
None. |
|
Scheduler |
String |
The scheduling algorithm. |
Valid values:
Note
This property takes effect only 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 a listener. |
|
Domain |
String |
The domain name specified in the forwarding rule. |
None. |
|
StickySession |
String |
Whether session persistence is enabled. |
Valid values:
Note
|
|
StickySessionType |
String |
The method used to handle a cookie. |
Valid values:
Note
This property takes effect only when StickySession is set to on. |
|
HealthCheckDomain |
String |
The domain name used for health checks. |
Valid values:
Note
This property takes effect only when HealthCheck is set to on. |
Examples
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{
"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"
]
}
}
}
}