# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins
import copy
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from .. import _utilities
from . import outputs

__all__ = [
    'GetListenerResult',
    'AwaitableGetListenerResult',
    'get_listener',
    'get_listener_output',
]

@pulumi.output_type
class GetListenerResult:
    """
    A collection of values returned by getListener.
    """
    def __init__(__self__, acl_ids=None, acl_status=None, acl_type=None, bandwidth=None, ca_certificate_id=None, ca_enabled=None, cert_center_certificate_id=None, certificate_id=None, certificate_source=None, client_body_timeout=None, client_header_timeout=None, connection_drain_enabled=None, connection_drain_timeout=None, cookie=None, cps=None, created_time=None, description=None, enabled=None, end_port=None, established_timeout=None, health_check=None, http2_enabled=None, id=None, keepalive_timeout=None, listener_id=None, listener_name=None, load_balancer_id=None, max_connections=None, persistence_timeout=None, persistence_type=None, port=None, protocol=None, proxy_connect_timeout=None, proxy_protocol_type=None, proxy_read_timeout=None, proxy_send_timeout=None, scheduler=None, security_policy_id=None, send_timeout=None, server_group_id=None, start_port=None, status=None, tags=None, updated_time=None, waf_protection_enabled=None):
        if acl_ids and not isinstance(acl_ids, list):
            raise TypeError("Expected argument 'acl_ids' to be a list")
        pulumi.set(__self__, "acl_ids", acl_ids)
        if acl_status and not isinstance(acl_status, str):
            raise TypeError("Expected argument 'acl_status' to be a str")
        pulumi.set(__self__, "acl_status", acl_status)
        if acl_type and not isinstance(acl_type, str):
            raise TypeError("Expected argument 'acl_type' to be a str")
        pulumi.set(__self__, "acl_type", acl_type)
        if bandwidth and not isinstance(bandwidth, int):
            raise TypeError("Expected argument 'bandwidth' to be a int")
        pulumi.set(__self__, "bandwidth", bandwidth)
        if ca_certificate_id and not isinstance(ca_certificate_id, str):
            raise TypeError("Expected argument 'ca_certificate_id' to be a str")
        pulumi.set(__self__, "ca_certificate_id", ca_certificate_id)
        if ca_enabled and not isinstance(ca_enabled, str):
            raise TypeError("Expected argument 'ca_enabled' to be a str")
        pulumi.set(__self__, "ca_enabled", ca_enabled)
        if cert_center_certificate_id and not isinstance(cert_center_certificate_id, str):
            raise TypeError("Expected argument 'cert_center_certificate_id' to be a str")
        pulumi.set(__self__, "cert_center_certificate_id", cert_center_certificate_id)
        if certificate_id and not isinstance(certificate_id, str):
            raise TypeError("Expected argument 'certificate_id' to be a str")
        pulumi.set(__self__, "certificate_id", certificate_id)
        if certificate_source and not isinstance(certificate_source, str):
            raise TypeError("Expected argument 'certificate_source' to be a str")
        pulumi.set(__self__, "certificate_source", certificate_source)
        if client_body_timeout and not isinstance(client_body_timeout, int):
            raise TypeError("Expected argument 'client_body_timeout' to be a int")
        pulumi.set(__self__, "client_body_timeout", client_body_timeout)
        if client_header_timeout and not isinstance(client_header_timeout, int):
            raise TypeError("Expected argument 'client_header_timeout' to be a int")
        pulumi.set(__self__, "client_header_timeout", client_header_timeout)
        if connection_drain_enabled and not isinstance(connection_drain_enabled, str):
            raise TypeError("Expected argument 'connection_drain_enabled' to be a str")
        pulumi.set(__self__, "connection_drain_enabled", connection_drain_enabled)
        if connection_drain_timeout and not isinstance(connection_drain_timeout, int):
            raise TypeError("Expected argument 'connection_drain_timeout' to be a int")
        pulumi.set(__self__, "connection_drain_timeout", connection_drain_timeout)
        if cookie and not isinstance(cookie, str):
            raise TypeError("Expected argument 'cookie' to be a str")
        pulumi.set(__self__, "cookie", cookie)
        if cps and not isinstance(cps, int):
            raise TypeError("Expected argument 'cps' to be a int")
        pulumi.set(__self__, "cps", cps)
        if created_time and not isinstance(created_time, str):
            raise TypeError("Expected argument 'created_time' to be a str")
        pulumi.set(__self__, "created_time", created_time)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if enabled and not isinstance(enabled, str):
            raise TypeError("Expected argument 'enabled' to be a str")
        pulumi.set(__self__, "enabled", enabled)
        if end_port and not isinstance(end_port, int):
            raise TypeError("Expected argument 'end_port' to be a int")
        pulumi.set(__self__, "end_port", end_port)
        if established_timeout and not isinstance(established_timeout, int):
            raise TypeError("Expected argument 'established_timeout' to be a int")
        pulumi.set(__self__, "established_timeout", established_timeout)
        if health_check and not isinstance(health_check, dict):
            raise TypeError("Expected argument 'health_check' to be a dict")
        pulumi.set(__self__, "health_check", health_check)
        if http2_enabled and not isinstance(http2_enabled, str):
            raise TypeError("Expected argument 'http2_enabled' to be a str")
        pulumi.set(__self__, "http2_enabled", http2_enabled)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if keepalive_timeout and not isinstance(keepalive_timeout, int):
            raise TypeError("Expected argument 'keepalive_timeout' to be a int")
        pulumi.set(__self__, "keepalive_timeout", keepalive_timeout)
        if listener_id and not isinstance(listener_id, str):
            raise TypeError("Expected argument 'listener_id' to be a str")
        pulumi.set(__self__, "listener_id", listener_id)
        if listener_name and not isinstance(listener_name, str):
            raise TypeError("Expected argument 'listener_name' to be a str")
        pulumi.set(__self__, "listener_name", listener_name)
        if load_balancer_id and not isinstance(load_balancer_id, str):
            raise TypeError("Expected argument 'load_balancer_id' to be a str")
        pulumi.set(__self__, "load_balancer_id", load_balancer_id)
        if max_connections and not isinstance(max_connections, int):
            raise TypeError("Expected argument 'max_connections' to be a int")
        pulumi.set(__self__, "max_connections", max_connections)
        if persistence_timeout and not isinstance(persistence_timeout, int):
            raise TypeError("Expected argument 'persistence_timeout' to be a int")
        pulumi.set(__self__, "persistence_timeout", persistence_timeout)
        if persistence_type and not isinstance(persistence_type, str):
            raise TypeError("Expected argument 'persistence_type' to be a str")
        pulumi.set(__self__, "persistence_type", persistence_type)
        if port and not isinstance(port, int):
            raise TypeError("Expected argument 'port' to be a int")
        pulumi.set(__self__, "port", port)
        if protocol and not isinstance(protocol, str):
            raise TypeError("Expected argument 'protocol' to be a str")
        pulumi.set(__self__, "protocol", protocol)
        if proxy_connect_timeout and not isinstance(proxy_connect_timeout, int):
            raise TypeError("Expected argument 'proxy_connect_timeout' to be a int")
        pulumi.set(__self__, "proxy_connect_timeout", proxy_connect_timeout)
        if proxy_protocol_type and not isinstance(proxy_protocol_type, str):
            raise TypeError("Expected argument 'proxy_protocol_type' to be a str")
        pulumi.set(__self__, "proxy_protocol_type", proxy_protocol_type)
        if proxy_read_timeout and not isinstance(proxy_read_timeout, int):
            raise TypeError("Expected argument 'proxy_read_timeout' to be a int")
        pulumi.set(__self__, "proxy_read_timeout", proxy_read_timeout)
        if proxy_send_timeout and not isinstance(proxy_send_timeout, int):
            raise TypeError("Expected argument 'proxy_send_timeout' to be a int")
        pulumi.set(__self__, "proxy_send_timeout", proxy_send_timeout)
        if scheduler and not isinstance(scheduler, str):
            raise TypeError("Expected argument 'scheduler' to be a str")
        pulumi.set(__self__, "scheduler", scheduler)
        if security_policy_id and not isinstance(security_policy_id, str):
            raise TypeError("Expected argument 'security_policy_id' to be a str")
        pulumi.set(__self__, "security_policy_id", security_policy_id)
        if send_timeout and not isinstance(send_timeout, int):
            raise TypeError("Expected argument 'send_timeout' to be a int")
        pulumi.set(__self__, "send_timeout", send_timeout)
        if server_group_id and not isinstance(server_group_id, str):
            raise TypeError("Expected argument 'server_group_id' to be a str")
        pulumi.set(__self__, "server_group_id", server_group_id)
        if start_port and not isinstance(start_port, int):
            raise TypeError("Expected argument 'start_port' to be a int")
        pulumi.set(__self__, "start_port", start_port)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if updated_time and not isinstance(updated_time, str):
            raise TypeError("Expected argument 'updated_time' to be a str")
        pulumi.set(__self__, "updated_time", updated_time)
        if waf_protection_enabled and not isinstance(waf_protection_enabled, str):
            raise TypeError("Expected argument 'waf_protection_enabled' to be a str")
        pulumi.set(__self__, "waf_protection_enabled", waf_protection_enabled)

    @property
    @pulumi.getter(name="aclIds")
    def acl_ids(self) -> Sequence[builtins.str]:
        """
        监听器绑定的访问控制策略组ID。仅AclStatus参数为on时返回。
        """
        return pulumi.get(self, "acl_ids")

    @property
    @pulumi.getter(name="aclStatus")
    def acl_status(self) -> builtins.str:
        """
        是否开启访问控制功能。取值如下：on：开启。off（默认值）：不开启。
        """
        return pulumi.get(self, "acl_status")

    @property
    @pulumi.getter(name="aclType")
    def acl_type(self) -> builtins.str:
        """
        访问控制的方式。white：白名单。black：黑名单。仅AclStatus参数为on时，本参数有效。
        """
        return pulumi.get(self, "acl_type")

    @property
    @pulumi.getter
    def bandwidth(self) -> builtins.int:
        """
        监听器的带宽上限，即此监听器独占CLB实例的带宽，单位为Mbps。-1（默认值）：此监听器不独占CLB的带，与其他监听器共享CLB实例未被独占的带宽。取值范围：1～CLB实例未被独占的带宽。
        """
        return pulumi.get(self, "bandwidth")

    @property
    @pulumi.getter(name="caCertificateId")
    def ca_certificate_id(self) -> builtins.str:
        """
        双向认证的CA证书。
        """
        return pulumi.get(self, "ca_certificate_id")

    @property
    @pulumi.getter(name="caEnabled")
    def ca_enabled(self) -> builtins.str:
        """
        是否开启双向认证。on：开启。off（默认值）：不开启。
        """
        return pulumi.get(self, "ca_enabled")

    @property
    @pulumi.getter(name="certCenterCertificateId")
    def cert_center_certificate_id(self) -> builtins.str:
        """
        证书中心的证书的ID。
        """
        return pulumi.get(self, "cert_center_certificate_id")

    @property
    @pulumi.getter(name="certificateId")
    def certificate_id(self) -> builtins.str:
        """
        CLB侧证书管理模块的证书的ID。
        """
        return pulumi.get(self, "certificate_id")

    @property
    @pulumi.getter(name="certificateSource")
    def certificate_source(self) -> builtins.str:
        """
        证书的来源。clb (默认)：CLB上传的证书。cert_center：证书中心上传的证书。user：用户上传的证书。
        """
        return pulumi.get(self, "certificate_source")

    @property
    @pulumi.getter(name="clientBodyTimeout")
    def client_body_timeout(self) -> builtins.int:
        """
        读取客户端请求正文的超时时间。此超时时间仅针对两个连续的读操作之间设置，而非整个请求的传输过程。取值范围为 30-120秒，默认为60秒。仅参数Protocol取HTTP或HTTPS时，本参数有效
        """
        return pulumi.get(self, "client_body_timeout")

    @property
    @pulumi.getter(name="clientHeaderTimeout")
    def client_header_timeout(self) -> builtins.int:
        """
        读取客户端请求头的超时时间。取值范围为30-120秒。默认为60秒。仅参数Protocol取HTTP或HTTPS时，本参数有效。
        """
        return pulumi.get(self, "client_header_timeout")

    @property
    @pulumi.getter(name="connectionDrainEnabled")
    def connection_drain_enabled(self) -> builtins.str:
        """
        监听器是否开启连接优雅中断功能。on：开启。off：不开启。参数Protocol返回为HTTP或HTTPS时，该参数固定返回off。
        """
        return pulumi.get(self, "connection_drain_enabled")

    @property
    @pulumi.getter(name="connectionDrainTimeout")
    def connection_drain_timeout(self) -> builtins.int:
        """
        连接优雅中断的超时时间，单位为秒。参数ConnectionDrainEnabled返回为off时，该参数返回0。
        """
        return pulumi.get(self, "connection_drain_timeout")

    @property
    @pulumi.getter
    def cookie(self) -> builtins.str:
        """
        后端服务器配置的会话保持的Cookie名称。仅参数PersistenceType取server时，本参数有效且必填。只能包含字母、数字、下划线（_）和中划线（-）。长度限制在1～200字符之间。
        """
        return pulumi.get(self, "cookie")

    @property
    @pulumi.getter
    def cps(self) -> builtins.int:
        """
        每秒新建连接数的上限。-1（默认值）：不限制，即CLB实例的新建连接数上限。取值范围：1～CLB实例的新连接数上限。
        """
        return pulumi.get(self, "cps")

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> builtins.str:
        """
        监听器的创建时间。
        """
        return pulumi.get(self, "created_time")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        监听器的描述。必须以字母、数字或中文开头，可包含字母、数字、中文及以下特殊字符：英文逗号（,）、点（.）、下划线（_）、空格（ ）、等号（=）、中划线（-）、中文逗号（，）、中文句号（。）。长度限制为0 ～ 255个字符。不填则默认值为空字符串。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def enabled(self) -> builtins.str:
        """
        是否启用监听器。on（默认值）：开启。off：不开启。
        """
        return pulumi.get(self, "enabled")

    @property
    @pulumi.getter(name="endPort")
    def end_port(self) -> builtins.int:
        """
        全端口监听的结束端口，取值范围为1-65535。参数Port为“0”时，该参数必须传入，且该参数取值应大于tartPort。
        """
        return pulumi.get(self, "end_port")

    @property
    @pulumi.getter(name="establishedTimeout")
    def established_timeout(self) -> builtins.int:
        """
        监听器的连接超时时间。仅参数Protocol取TCP或UDP时，本参数有效。取值如下：TCP协议：10-900秒，默认为900秒。UDP协议：1-300秒，默认为90秒。
        """
        return pulumi.get(self, "established_timeout")

    @property
    @pulumi.getter(name="healthCheck")
    def health_check(self) -> 'outputs.GetListenerHealthCheckResult':
        """
        健康检查相关信息。
        """
        return pulumi.get(self, "health_check")

    @property
    @pulumi.getter(name="http2Enabled")
    def http2_enabled(self) -> builtins.str:
        """
        监听器是否开启前端HTTP 2.0协议。仅参数`Protocol取HTTPS时，本参数有效。取值如下：|on：开启。off（默认值）：不开启。
        """
        return pulumi.get(self, "http2_enabled")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        Uniquely identifies the resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="keepaliveTimeout")
    def keepalive_timeout(self) -> builtins.int:
        """
        客户端与CLB之间的长连接超时时间。取值范围为 0-900秒，默认为75秒。0表示禁用长连接。仅参数Protocol取HTTP或HTTPS时，本参数有效。
        """
        return pulumi.get(self, "keepalive_timeout")

    @property
    @pulumi.getter(name="listenerId")
    def listener_id(self) -> builtins.str:
        """
        监听器的ID。
        """
        return pulumi.get(self, "listener_id")

    @property
    @pulumi.getter(name="listenerName")
    def listener_name(self) -> builtins.str:
        """
        监听器的名称。必须以字母、数字或中文开头，可包含字母、数字、中文及以下特殊字符：点号（.）、下划线_）和中划线（-）。长度限制在1～128字符之间。不填则默认将“协议-端口”作为监听器名称。
        """
        return pulumi.get(self, "listener_name")

    @property
    @pulumi.getter(name="loadBalancerId")
    def load_balancer_id(self) -> builtins.str:
        """
        CLB实例的ID。
        """
        return pulumi.get(self, "load_balancer_id")

    @property
    @pulumi.getter(name="maxConnections")
    def max_connections(self) -> builtins.int:
        """
        最大并发连接数的上限。-1（默认值）：不限制，CLB实例的最大并发连接数上限。取值范围：1～CLB实例的最大并发连接数上限。
        """
        return pulumi.get(self, "max_connections")

    @property
    @pulumi.getter(name="persistenceTimeout")
    def persistence_timeout(self) -> builtins.int:
        """
        会话保持的超时时间，单位为秒。取值范围根据参数PersistenceType取值有所不同。PersistenceType置为source_ip时，取值范围为1～3600。PersistenceType配置为insert时，取值范围为1～86400。
        """
        return pulumi.get(self, "persistence_timeout")

    @property
    @pulumi.getter(name="persistenceType")
    def persistence_type(self) -> builtins.str:
        """
        会话保持的类型。取值如下：off（默认值）：不启用会话保持。source_ip：源地址IP，仅参数ProtocolTCP或UDP时，本取值有效。insert：植入Cookie，仅参数Protocol取HTTP或HTTPS且Scheduler取wrr时，本取值生效。server：重写Cookie，仅参数Protocol取HTTP或HTTPS且Scheduler取wrr时，本取值生效。。
        """
        return pulumi.get(self, "persistence_type")

    @property
    @pulumi.getter
    def port(self) -> builtins.int:
        """
        监听器接收请求使用的端口。取值范围为 0～65535。参数Protocol为“TCP”或“UDP”时，支持传入0，表示用全端口监听。
        """
        return pulumi.get(self, "port")

    @property
    @pulumi.getter
    def protocol(self) -> builtins.str:
        """
        监听器的协议。
        """
        return pulumi.get(self, "protocol")

    @property
    @pulumi.getter(name="proxyConnectTimeout")
    def proxy_connect_timeout(self) -> builtins.int:
        """
        CLB与后端服务器之间的连接建立超时时间。建议大于健康检查超时时间。取值范围为 4-120秒，默认为4。仅参数Protocol取HTTP或HTTPS时，本参数有效。
        """
        return pulumi.get(self, "proxy_connect_timeout")

    @property
    @pulumi.getter(name="proxyProtocolType")
    def proxy_protocol_type(self) -> builtins.str:
        """
        是否启用Proxy-Protocol协议。仅参数Protocol取TCP或UDP时，本参数有效。取值如下：off（默认值）：关闭。standard：开启。
        """
        return pulumi.get(self, "proxy_protocol_type")

    @property
    @pulumi.getter(name="proxyReadTimeout")
    def proxy_read_timeout(self) -> builtins.int:
        """
        CLB从后端服务器读取响应的超时时间。此超时时间仅针对两个连续的读操作之间设置，而非整个响应的传输过程。取值范围为30-3600秒，默认为60秒。仅参数Protocol取HTTP或HTTPS时，本参数有效。
        """
        return pulumi.get(self, "proxy_read_timeout")

    @property
    @pulumi.getter(name="proxySendTimeout")
    def proxy_send_timeout(self) -> builtins.int:
        """
        CLB将请求传输到后端服务器的超时时间。此超时仅针对两个连续的写操作之间设置，而非整个请求的传输过程。取值范围为30-3600秒，默认为60秒。仅参数Protocol取HTTP或HTTPS时，本参数有效。
        """
        return pulumi.get(self, "proxy_send_timeout")

    @property
    @pulumi.getter
    def scheduler(self) -> builtins.str:
        """
        监听器使用的调度算法。wrr（默认值）：加权轮询。wlc：加权最小连接数。sh：源地址哈希。
        """
        return pulumi.get(self, "scheduler")

    @property
    @pulumi.getter(name="securityPolicyId")
    def security_policy_id(self) -> builtins.str:
        """
        HTTPS监听器的TLS安全策略。仅参数Protocol取HTTPS时，本参数有效。 取值如下：default*policy（默认值）：支持SSL v3、TLS v1.0、TLS v1.1、TLS v1.2。tls*cipher*policy*1*0：支持TLS v1.0、TLS v1.1、TLS v1.2。tls*cipher*policy*1*1：支持TLS v1.1、TLS v1.2。tls*cipher*policy*1*2：支持TLS v1.2。tls*cipher*policy*1*2*strict：支持TLS v1.2。
        """
        return pulumi.get(self, "security_policy_id")

    @property
    @pulumi.getter(name="sendTimeout")
    def send_timeout(self) -> builtins.int:
        """
        CLB向客户端发送响应的超时时间。此超时仅针对两个连续的写操作之间设置，而非整响应的传输过程。取值范围为 1-3600秒，默认为60秒。仅参数Protocol取HTTP或HTTPS时，本参数有效。
        """
        return pulumi.get(self, "send_timeout")

    @property
    @pulumi.getter(name="serverGroupId")
    def server_group_id(self) -> builtins.str:
        """
        监听器关联的后端服务器组 ID。
        """
        return pulumi.get(self, "server_group_id")

    @property
    @pulumi.getter(name="startPort")
    def start_port(self) -> builtins.int:
        """
        全端口监听的起始端口，取值范围为1-65535。参数Port为“0”时，该参数必须传入。
        """
        return pulumi.get(self, "start_port")

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        监听器的状态。Creating：创建中。Active：运行中。Deleting: 删除中。Disabled: 已停用。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetListenerTagResult']:
        """
        监听器所属标签。
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="updatedTime")
    def updated_time(self) -> builtins.str:
        """
        监听器最近一次的操作时间。
        """
        return pulumi.get(self, "updated_time")

    @property
    @pulumi.getter(name="wafProtectionEnabled")
    def waf_protection_enabled(self) -> builtins.str:
        """
        是否将经过七层监听器的流量送至Web应用防火墙进行检测和过滤。on：是。off：否。
        """
        return pulumi.get(self, "waf_protection_enabled")


class AwaitableGetListenerResult(GetListenerResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetListenerResult(
            acl_ids=self.acl_ids,
            acl_status=self.acl_status,
            acl_type=self.acl_type,
            bandwidth=self.bandwidth,
            ca_certificate_id=self.ca_certificate_id,
            ca_enabled=self.ca_enabled,
            cert_center_certificate_id=self.cert_center_certificate_id,
            certificate_id=self.certificate_id,
            certificate_source=self.certificate_source,
            client_body_timeout=self.client_body_timeout,
            client_header_timeout=self.client_header_timeout,
            connection_drain_enabled=self.connection_drain_enabled,
            connection_drain_timeout=self.connection_drain_timeout,
            cookie=self.cookie,
            cps=self.cps,
            created_time=self.created_time,
            description=self.description,
            enabled=self.enabled,
            end_port=self.end_port,
            established_timeout=self.established_timeout,
            health_check=self.health_check,
            http2_enabled=self.http2_enabled,
            id=self.id,
            keepalive_timeout=self.keepalive_timeout,
            listener_id=self.listener_id,
            listener_name=self.listener_name,
            load_balancer_id=self.load_balancer_id,
            max_connections=self.max_connections,
            persistence_timeout=self.persistence_timeout,
            persistence_type=self.persistence_type,
            port=self.port,
            protocol=self.protocol,
            proxy_connect_timeout=self.proxy_connect_timeout,
            proxy_protocol_type=self.proxy_protocol_type,
            proxy_read_timeout=self.proxy_read_timeout,
            proxy_send_timeout=self.proxy_send_timeout,
            scheduler=self.scheduler,
            security_policy_id=self.security_policy_id,
            send_timeout=self.send_timeout,
            server_group_id=self.server_group_id,
            start_port=self.start_port,
            status=self.status,
            tags=self.tags,
            updated_time=self.updated_time,
            waf_protection_enabled=self.waf_protection_enabled)


def get_listener(id: Optional[builtins.str] = None,
                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetListenerResult:
    """
    Data Source schema for Byteplus::CLB::Listener


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('bytepluscc:clb/getListener:getListener', __args__, opts=opts, typ=GetListenerResult).value

    return AwaitableGetListenerResult(
        acl_ids=pulumi.get(__ret__, 'acl_ids'),
        acl_status=pulumi.get(__ret__, 'acl_status'),
        acl_type=pulumi.get(__ret__, 'acl_type'),
        bandwidth=pulumi.get(__ret__, 'bandwidth'),
        ca_certificate_id=pulumi.get(__ret__, 'ca_certificate_id'),
        ca_enabled=pulumi.get(__ret__, 'ca_enabled'),
        cert_center_certificate_id=pulumi.get(__ret__, 'cert_center_certificate_id'),
        certificate_id=pulumi.get(__ret__, 'certificate_id'),
        certificate_source=pulumi.get(__ret__, 'certificate_source'),
        client_body_timeout=pulumi.get(__ret__, 'client_body_timeout'),
        client_header_timeout=pulumi.get(__ret__, 'client_header_timeout'),
        connection_drain_enabled=pulumi.get(__ret__, 'connection_drain_enabled'),
        connection_drain_timeout=pulumi.get(__ret__, 'connection_drain_timeout'),
        cookie=pulumi.get(__ret__, 'cookie'),
        cps=pulumi.get(__ret__, 'cps'),
        created_time=pulumi.get(__ret__, 'created_time'),
        description=pulumi.get(__ret__, 'description'),
        enabled=pulumi.get(__ret__, 'enabled'),
        end_port=pulumi.get(__ret__, 'end_port'),
        established_timeout=pulumi.get(__ret__, 'established_timeout'),
        health_check=pulumi.get(__ret__, 'health_check'),
        http2_enabled=pulumi.get(__ret__, 'http2_enabled'),
        id=pulumi.get(__ret__, 'id'),
        keepalive_timeout=pulumi.get(__ret__, 'keepalive_timeout'),
        listener_id=pulumi.get(__ret__, 'listener_id'),
        listener_name=pulumi.get(__ret__, 'listener_name'),
        load_balancer_id=pulumi.get(__ret__, 'load_balancer_id'),
        max_connections=pulumi.get(__ret__, 'max_connections'),
        persistence_timeout=pulumi.get(__ret__, 'persistence_timeout'),
        persistence_type=pulumi.get(__ret__, 'persistence_type'),
        port=pulumi.get(__ret__, 'port'),
        protocol=pulumi.get(__ret__, 'protocol'),
        proxy_connect_timeout=pulumi.get(__ret__, 'proxy_connect_timeout'),
        proxy_protocol_type=pulumi.get(__ret__, 'proxy_protocol_type'),
        proxy_read_timeout=pulumi.get(__ret__, 'proxy_read_timeout'),
        proxy_send_timeout=pulumi.get(__ret__, 'proxy_send_timeout'),
        scheduler=pulumi.get(__ret__, 'scheduler'),
        security_policy_id=pulumi.get(__ret__, 'security_policy_id'),
        send_timeout=pulumi.get(__ret__, 'send_timeout'),
        server_group_id=pulumi.get(__ret__, 'server_group_id'),
        start_port=pulumi.get(__ret__, 'start_port'),
        status=pulumi.get(__ret__, 'status'),
        tags=pulumi.get(__ret__, 'tags'),
        updated_time=pulumi.get(__ret__, 'updated_time'),
        waf_protection_enabled=pulumi.get(__ret__, 'waf_protection_enabled'))
def get_listener_output(id: Optional[pulumi.Input[builtins.str]] = None,
                        opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetListenerResult]:
    """
    Data Source schema for Byteplus::CLB::Listener


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('bytepluscc:clb/getListener:getListener', __args__, opts=opts, typ=GetListenerResult)
    return __ret__.apply(lambda __response__: GetListenerResult(
        acl_ids=pulumi.get(__response__, 'acl_ids'),
        acl_status=pulumi.get(__response__, 'acl_status'),
        acl_type=pulumi.get(__response__, 'acl_type'),
        bandwidth=pulumi.get(__response__, 'bandwidth'),
        ca_certificate_id=pulumi.get(__response__, 'ca_certificate_id'),
        ca_enabled=pulumi.get(__response__, 'ca_enabled'),
        cert_center_certificate_id=pulumi.get(__response__, 'cert_center_certificate_id'),
        certificate_id=pulumi.get(__response__, 'certificate_id'),
        certificate_source=pulumi.get(__response__, 'certificate_source'),
        client_body_timeout=pulumi.get(__response__, 'client_body_timeout'),
        client_header_timeout=pulumi.get(__response__, 'client_header_timeout'),
        connection_drain_enabled=pulumi.get(__response__, 'connection_drain_enabled'),
        connection_drain_timeout=pulumi.get(__response__, 'connection_drain_timeout'),
        cookie=pulumi.get(__response__, 'cookie'),
        cps=pulumi.get(__response__, 'cps'),
        created_time=pulumi.get(__response__, 'created_time'),
        description=pulumi.get(__response__, 'description'),
        enabled=pulumi.get(__response__, 'enabled'),
        end_port=pulumi.get(__response__, 'end_port'),
        established_timeout=pulumi.get(__response__, 'established_timeout'),
        health_check=pulumi.get(__response__, 'health_check'),
        http2_enabled=pulumi.get(__response__, 'http2_enabled'),
        id=pulumi.get(__response__, 'id'),
        keepalive_timeout=pulumi.get(__response__, 'keepalive_timeout'),
        listener_id=pulumi.get(__response__, 'listener_id'),
        listener_name=pulumi.get(__response__, 'listener_name'),
        load_balancer_id=pulumi.get(__response__, 'load_balancer_id'),
        max_connections=pulumi.get(__response__, 'max_connections'),
        persistence_timeout=pulumi.get(__response__, 'persistence_timeout'),
        persistence_type=pulumi.get(__response__, 'persistence_type'),
        port=pulumi.get(__response__, 'port'),
        protocol=pulumi.get(__response__, 'protocol'),
        proxy_connect_timeout=pulumi.get(__response__, 'proxy_connect_timeout'),
        proxy_protocol_type=pulumi.get(__response__, 'proxy_protocol_type'),
        proxy_read_timeout=pulumi.get(__response__, 'proxy_read_timeout'),
        proxy_send_timeout=pulumi.get(__response__, 'proxy_send_timeout'),
        scheduler=pulumi.get(__response__, 'scheduler'),
        security_policy_id=pulumi.get(__response__, 'security_policy_id'),
        send_timeout=pulumi.get(__response__, 'send_timeout'),
        server_group_id=pulumi.get(__response__, 'server_group_id'),
        start_port=pulumi.get(__response__, 'start_port'),
        status=pulumi.get(__response__, 'status'),
        tags=pulumi.get(__response__, 'tags'),
        updated_time=pulumi.get(__response__, 'updated_time'),
        waf_protection_enabled=pulumi.get(__response__, 'waf_protection_enabled')))
