DATASOURCE::SLB::Rule

更新时间:2025-04-07 01:35:42

DATASOURCE::SLB::Rule类型用于查询指定转发规则的配置详情。

语法

{
  "Type": "DATASOURCE::SLB::Rule",
  "Properties": {
    "RuleId": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

属性名称

类型

必须

允许更新

描述

约束

RuleId

String

转发规则 ID。

RefreshOptions

String

当资源栈更新时,数据源资源的刷新策略。

有效值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

返回值

Fn::GetAtt

  • CookieTimeout:Cookie 超时时间。

  • Cookie:服务器上配置的 Cookie。

  • VserverGroupId:转发规则关联的服务器组 ID。

  • ListenerPort:负载均衡实例前端使用的监听端口。

  • HealthCheckInterval:健康检查的时间间隔。

  • UnhealthyThreshold:健康检查连续失败多少次后,将后端服务器的健康检查状态由 success 判定为 fail

  • Scheduler:调度算法。

  • HealthCheckUri:用于健康检查的 URI。

  • RuleId:转发规则 ID。

  • HealthCheck:是否开启健康检查。

  • LoadBalancerId:负载均衡实例 ID。

  • HealthCheckTimeout:接收来自运行状况检查的响应需要等待的时间。如果后端 ECS 在指定的时间内没有正确响应,则判定为健康检查失败。

  • Url:转发规则路径。

  • StickySession:是否开启会话保持。

  • HealthCheckConnectPort:健康检查的后端服务器的端口。

  • HealthyThreshold:健康检查连续成功多少次后,将后端服务器的健康检查状态由 fail 判定为 success

  • HealthCheckDomain:用于健康检查的域名

  • ListenerSync:转发规则是否从监听上继承健康检查、会话保持和调度算法配置。

  • StickySessionType:Cookie 的处理方式。

  • Domain:转发规则域名。

  • HealthCheckHttpCode:健康检查正常的 HTTP 状态码,多个状态码用逗号分隔。

  • RuleName:转发规则名称。

示例

YAML
JSON
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  RuleId:
    Type: String
    Description:
      en: The ID of the forwarding rule.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::SLB::Rule
    Properties:
      RuleId:
        Ref: RuleId
Outputs:
  CookieTimeout:
    Description: The timeout period of a cookie.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CookieTimeout
  Cookie:
    Description: The cookie to be configured on the backend server.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Cookie
  VserverGroupId:
    Description: The ID of the vServer group that is associated with the forwarding rule.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - VserverGroupId
  ListenerPort:
    Description: The listener port that is used by the SLB instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ListenerPort
  HealthCheckInterval:
    Description: The time interval between two consecutive health checks.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HealthCheckInterval
  UnhealthyThreshold:
    Description: The number of consecutive failed health checks that must occur before a healthy backend server is declared unhealthy. In this case, the health check state is changed from success to fail.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - UnhealthyThreshold
  Scheduler:
    Description: The scheduling algorithm.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Scheduler
  HealthCheckUri:
    Description: The URI that is used for health checks.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HealthCheckUri
  RuleId:
    Description: The ID of the forwarding rule.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - RuleId
  HealthCheck:
    Description: Specifies whether to enable health checks.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HealthCheck
  LoadBalancerId:
    Description: The ID of the SLB instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - LoadBalancerId
  HealthCheckTimeout:
    Description: The timeout period of a health check response. If a backend ECS instance does not send an expected response within the specified period of time, the ECS instance is considered unhealthy.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HealthCheckTimeout
  Url:
    Description: The URL that is configured in the forwarding rule.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Url
  StickySession:
    Description: 'Indicates whether session persistence is enabled.  Valid values: on and off.'
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - StickySession
  HealthCheckConnectPort:
    Description: 'The port of the backend server that is used for health checks. Valid values: 1 to 65535.'
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HealthCheckConnectPort
  HealthyThreshold:
    Description: The number of consecutive successful health checks that must occur before an unhealthy backend server is declared healthy. In this case, the health check state is changed from fail to success.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HealthyThreshold
  HealthCheckDomain:
    Description: 'The domain name that is used for health checks. Valid values:  $_ip: The private IP address of the backend server. If the $_ip parameter is set or the HealthCheckDomain parameter is not set, SLB uses the private IP addresses of backend servers as the domain names for health checks. domain: The domain name must be 1 to 80 characters in length. It can contain only letters, digits, periods (.),and hyphens (-).'
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HealthCheckDomain
  ListenerSync:
    Description: Indicates whether the forwarding rule uses the scheduling algorithm, session persistence, and health check configurations of the listener.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ListenerSync
  StickySessionType:
    Description: The method that is used to handle a cookie.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - StickySessionType
  Domain:
    Description: The domain name that is configured in the forwarding rule.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Domain
  HealthCheckHttpCode:
    Description: 'The HTTP status code that indicates a successful health check. Separate multiple HTTP status codes with commas (,). Default value: http_2xx.'
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HealthCheckHttpCode
  RuleName:
    Description: The name of the forwarding rule.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - RuleName
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "RuleId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the forwarding rule."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::SLB::Rule",
      "Properties": {
        "RuleId": {
          "Ref": "RuleId"
        }
      }
    }
  },
  "Outputs": {
    "CookieTimeout": {
      "Description": "The timeout period of a cookie.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CookieTimeout"
        ]
      }
    },
    "Cookie": {
      "Description": "The cookie to be configured on the backend server.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Cookie"
        ]
      }
    },
    "VserverGroupId": {
      "Description": "The ID of the vServer group that is associated with the forwarding rule.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "VserverGroupId"
        ]
      }
    },
    "ListenerPort": {
      "Description": "The listener port that is used by the SLB instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ListenerPort"
        ]
      }
    },
    "HealthCheckInterval": {
      "Description": "The time interval between two consecutive health checks.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HealthCheckInterval"
        ]
      }
    },
    "UnhealthyThreshold": {
      "Description": "The number of consecutive failed health checks that must occur before a healthy backend server is declared unhealthy. In this case, the health check state is changed from success to fail.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "UnhealthyThreshold"
        ]
      }
    },
    "Scheduler": {
      "Description": "The scheduling algorithm.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Scheduler"
        ]
      }
    },
    "HealthCheckUri": {
      "Description": "The URI that is used for health checks.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HealthCheckUri"
        ]
      }
    },
    "RuleId": {
      "Description": "The ID of the forwarding rule.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "RuleId"
        ]
      }
    },
    "HealthCheck": {
      "Description": "Specifies whether to enable health checks.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HealthCheck"
        ]
      }
    },
    "LoadBalancerId": {
      "Description": "The ID of the SLB instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "LoadBalancerId"
        ]
      }
    },
    "HealthCheckTimeout": {
      "Description": "The timeout period of a health check response. If a backend ECS instance does not send an expected response within the specified period of time, the ECS instance is considered unhealthy.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HealthCheckTimeout"
        ]
      }
    },
    "Url": {
      "Description": "The URL that is configured in the forwarding rule.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Url"
        ]
      }
    },
    "StickySession": {
      "Description": "Indicates whether session persistence is enabled.  Valid values: on and off.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "StickySession"
        ]
      }
    },
    "HealthCheckConnectPort": {
      "Description": "The port of the backend server that is used for health checks. Valid values: 1 to 65535.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HealthCheckConnectPort"
        ]
      }
    },
    "HealthyThreshold": {
      "Description": "The number of consecutive successful health checks that must occur before an unhealthy backend server is declared healthy. In this case, the health check state is changed from fail to success.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HealthyThreshold"
        ]
      }
    },
    "HealthCheckDomain": {
      "Description": "The domain name that is used for health checks. Valid values:  $_ip: The private IP address of the backend server. If the $_ip parameter is set or the HealthCheckDomain parameter is not set, SLB uses the private IP addresses of backend servers as the domain names for health checks. domain: The domain name must be 1 to 80 characters in length. It can contain only letters, digits, periods (.),and hyphens (-).",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HealthCheckDomain"
        ]
      }
    },
    "ListenerSync": {
      "Description": "Indicates whether the forwarding rule uses the scheduling algorithm, session persistence, and health check configurations of the listener.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ListenerSync"
        ]
      }
    },
    "StickySessionType": {
      "Description": "The method that is used to handle a cookie.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "StickySessionType"
        ]
      }
    },
    "Domain": {
      "Description": "The domain name that is configured in the forwarding rule.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Domain"
        ]
      }
    },
    "HealthCheckHttpCode": {
      "Description": "The HTTP status code that indicates a successful health check. Separate multiple HTTP status codes with commas (,). Default value: http_2xx.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HealthCheckHttpCode"
        ]
      }
    },
    "RuleName": {
      "Description": "The name of the forwarding rule.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "RuleName"
        ]
      }
    }
  }
}
                        
  • 本页导读 (1)
  • 语法
  • 属性
  • 返回值
  • 示例
AI助理

点击开启售前

在线咨询服务

你好,我是AI助理

可以解答问题、推荐解决方案等