DATASOURCE::SLB::LoadBalancerTCPListener

更新时间:2025-04-07 03:06:57

DATASOURCE::SLB::LoadBalancerTCPListener类型用于查询TCP监听配置。

语法

{
  "Type": "DATASOURCE::SLB::LoadBalancerTCPListener",
  "Properties": {
    "ListenerPort": Integer,
    "LoadBalancerId": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

属性名称

类型

必须

允许更新

描述

约束

ListenerPort

Integer

传统型负载均衡实例前端使用的端口。

取值:1~65535

LoadBalancerId

String

传统型负载均衡实例 ID。

RefreshOptions

String

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

有效值:

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

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

返回值

Fn::GetAtt

  • VServerGroupId:绑定的服务器组 ID。

  • SynProxy:是否开启负载均衡的攻击防护功能 SynProxy。

  • Description:自定义监听名称。

  • ProxyProtocolV2Enabled:是否支持通过 Proxy Protocol 协议携带客户端源地址到后端服务器。

  • UnhealthyThreshold:不健康检查阈值。

  • Scheduler:调度算法。

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

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

  • LoadBalancerId:传统型负载均衡实例 ID。

  • BackendServerPort:传统型负载均衡实例后端使用的端口。

  • ConnectionDrainTimeout:设置连接优雅中断超时时间。

  • PersistenceTimeout:会话保持的超时时间。

  • HealthCheckConnectPort:健康检查使用的端口。

  • HealthCheckMethod:健康检查方式。

  • Bandwidth:监听的带宽峰值。

  • HealthCheckHttpCode:健康检查正常的 HTTP 状态码。

  • EstablishedTimeout:连接超时时间。

  • ListenerPort:传统型负载均衡实例前端使用的端口。

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

  • AclId:监听绑定的访问策略组 ID。

  • HealthCheckConnectTimeout:超时时间。

  • ConnectionDrain:是否开启连接优雅中断。

  • AclStatus:是否开启访问控制功能。

  • HealthyThreshold:健康检查阈值。

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

  • MasterSlaveServerGroupId:绑定的主备服务器组 ID。

  • AclType:访问控制类型

  • HealthCheckType:TCP 协议监听的健康检查方式。

  • AclIds:访问控制策略组 ID 列表。

示例

YAML
JSON
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ListenerPort:
    Type: Number
    Description:
      en: 'The frontend port used by the CLB instance.Valid values: 1 to 65535.'
    Required: true
  LoadBalancerId:
    Type: String
    Description:
      en: The ID of the CLB instance.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::SLB::LoadBalancerTCPListener
    Properties:
      ListenerPort:
        Ref: ListenerPort
      LoadBalancerId:
        Ref: LoadBalancerId
Outputs:
  VServerGroupId:
    Description: The ID of the associated server group.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - VServerGroupId
  SynProxy:
    Description: Indicates whether the SynProxy feature of CLB is enabled for protection.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - SynProxy
  Description:
    Description: The description of the listener.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Description
  ProxyProtocolV2Enabled:
    Description: Indicates whether the Proxy protocol is used to pass client IP addresses to backend servers.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ProxyProtocolV2Enabled
  UnhealthyThreshold:
    Description: 'The unhealthy threshold. 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 is changed from success to fail. Valid values: 2 to 10.'
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - UnhealthyThreshold
  Scheduler:
    Description: The scheduling algorithm.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Scheduler
  HealthCheckUri:
    Description: 'The URL that is used for health checks. '
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HealthCheckUri
  HealthCheck:
    Description: Indicates whether the health check feature is enabled.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HealthCheck
  LoadBalancerId:
    Description: The ID of the CLB instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - LoadBalancerId
  BackendServerPort:
    Description: The backend port used by the CLB instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - BackendServerPort
  ConnectionDrainTimeout:
    Description: The timeout period of connection draining. If ConnectionDrain is set to on, the parameter is returned.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ConnectionDrainTimeout
  PersistenceTimeout:
    Description: The timeout period of session persistence.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - PersistenceTimeout
  HealthCheckConnectPort:
    Description: The port that is used for health checks.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HealthCheckConnectPort
  HealthCheckMethod:
    Description: The health check method.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HealthCheckMethod
  Bandwidth:
    Description: 'The maximum bandwidth of the listener. Unit: Mbit/s.'
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Bandwidth
  HealthCheckHttpCode:
    Description: The HTTP status code for a successful health check.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HealthCheckHttpCode
  EstablishedTimeout:
    Description: The timeout period of a connection.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - EstablishedTimeout
  ListenerPort:
    Description: The frontend port used by the CLB instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ListenerPort
  HealthCheckInterval:
    Description: 'The interval between two consecutive health checks. Valid values: 1 to 50. Unit: seconds.'
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HealthCheckInterval
  AclId:
    Description: The ID of the network ACL that is associated with the listener.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - AclId
  HealthCheckConnectTimeout:
    Description: 'The timeout period. Unit: seconds.'
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HealthCheckConnectTimeout
  ConnectionDrain:
    Description: Indicates whether connection draining is enabled. If ConnectionDrain is set to on, the parameter is returned.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ConnectionDrain
  AclStatus:
    Description: 'Indicates whether access control is enabled. '
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - AclStatus
  HealthyThreshold:
    Description: 'The healthy threshold. 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 is changed from fail to success. Valid values: 2 to 10.'
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HealthyThreshold
  HealthCheckDomain:
    Description: The domain name that is used for health checks.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HealthCheckDomain
  MasterSlaveServerGroupId:
    Description: The ID of the primary/secondary server group that is associated with the listener.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - MasterSlaveServerGroupId
  AclType:
    Description: The type of the ACL.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - AclType
  HealthCheckType:
    Description: The health check method that is used by the TCP listener.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HealthCheckType
  AclIds:
    Description: The ID list of the network ACL that is associated with the listener.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - AclIds
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ListenerPort": {
      "Type": "Number",
      "Description": {
        "en": "The frontend port used by the CLB instance.Valid values: 1 to 65535."
      },
      "Required": true
    },
    "LoadBalancerId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the CLB instance."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::SLB::LoadBalancerTCPListener",
      "Properties": {
        "ListenerPort": {
          "Ref": "ListenerPort"
        },
        "LoadBalancerId": {
          "Ref": "LoadBalancerId"
        }
      }
    }
  },
  "Outputs": {
    "VServerGroupId": {
      "Description": "The ID of the associated server group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "VServerGroupId"
        ]
      }
    },
    "SynProxy": {
      "Description": "Indicates whether the SynProxy feature of CLB is enabled for protection.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SynProxy"
        ]
      }
    },
    "Description": {
      "Description": "The description of the listener.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Description"
        ]
      }
    },
    "ProxyProtocolV2Enabled": {
      "Description": "Indicates whether the Proxy protocol is used to pass client IP addresses to backend servers.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ProxyProtocolV2Enabled"
        ]
      }
    },
    "UnhealthyThreshold": {
      "Description": "The unhealthy threshold. 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 is changed from success to fail. Valid values: 2 to 10.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "UnhealthyThreshold"
        ]
      }
    },
    "Scheduler": {
      "Description": "The scheduling algorithm.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Scheduler"
        ]
      }
    },
    "HealthCheckUri": {
      "Description": "The URL that is used for health checks. ",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HealthCheckUri"
        ]
      }
    },
    "HealthCheck": {
      "Description": "Indicates whether the health check feature is enabled.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HealthCheck"
        ]
      }
    },
    "LoadBalancerId": {
      "Description": "The ID of the CLB instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "LoadBalancerId"
        ]
      }
    },
    "BackendServerPort": {
      "Description": "The backend port used by the CLB instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "BackendServerPort"
        ]
      }
    },
    "ConnectionDrainTimeout": {
      "Description": "The timeout period of connection draining. If ConnectionDrain is set to on, the parameter is returned.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ConnectionDrainTimeout"
        ]
      }
    },
    "PersistenceTimeout": {
      "Description": "The timeout period of session persistence.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "PersistenceTimeout"
        ]
      }
    },
    "HealthCheckConnectPort": {
      "Description": "The port that is used for health checks.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HealthCheckConnectPort"
        ]
      }
    },
    "HealthCheckMethod": {
      "Description": "The health check method.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HealthCheckMethod"
        ]
      }
    },
    "Bandwidth": {
      "Description": "The maximum bandwidth of the listener. Unit: Mbit/s.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Bandwidth"
        ]
      }
    },
    "HealthCheckHttpCode": {
      "Description": "The HTTP status code for a successful health check.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HealthCheckHttpCode"
        ]
      }
    },
    "EstablishedTimeout": {
      "Description": "The timeout period of a connection.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "EstablishedTimeout"
        ]
      }
    },
    "ListenerPort": {
      "Description": "The frontend port used by the CLB instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ListenerPort"
        ]
      }
    },
    "HealthCheckInterval": {
      "Description": "The interval between two consecutive health checks. Valid values: 1 to 50. Unit: seconds.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HealthCheckInterval"
        ]
      }
    },
    "AclId": {
      "Description": "The ID of the network ACL that is associated with the listener.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "AclId"
        ]
      }
    },
    "HealthCheckConnectTimeout": {
      "Description": "The timeout period. Unit: seconds.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HealthCheckConnectTimeout"
        ]
      }
    },
    "ConnectionDrain": {
      "Description": "Indicates whether connection draining is enabled. If ConnectionDrain is set to on, the parameter is returned.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ConnectionDrain"
        ]
      }
    },
    "AclStatus": {
      "Description": "Indicates whether access control is enabled. ",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "AclStatus"
        ]
      }
    },
    "HealthyThreshold": {
      "Description": "The healthy threshold. 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 is changed from fail to success. Valid values: 2 to 10.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HealthyThreshold"
        ]
      }
    },
    "HealthCheckDomain": {
      "Description": "The domain name that is used for health checks.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HealthCheckDomain"
        ]
      }
    },
    "MasterSlaveServerGroupId": {
      "Description": "The ID of the primary/secondary server group that is associated with the listener.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "MasterSlaveServerGroupId"
        ]
      }
    },
    "AclType": {
      "Description": "The type of the ACL.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "AclType"
        ]
      }
    },
    "HealthCheckType": {
      "Description": "The health check method that is used by the TCP listener.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HealthCheckType"
        ]
      }
    },
    "AclIds": {
      "Description": "The ID list of the network ACL that is associated with the listener.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "AclIds"
        ]
      }
    }
  }
}
                        
  • 本页导读 (1)
  • 语法
  • 属性
  • 返回值
  • 示例
AI助理

点击开启售前

在线咨询服务

你好,我是AI助理

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