# 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
from ._inputs import *

__all__ = ['NlbListenerArgs', 'NlbListener']

@pulumi.input_type
class NlbListenerArgs:
    def __init__(__self__, *,
                 load_balancer_id: pulumi.Input[builtins.str],
                 port: pulumi.Input[builtins.int],
                 protocol: pulumi.Input[builtins.str],
                 server_group_id: pulumi.Input[builtins.str],
                 certificate_id: Optional[pulumi.Input[builtins.str]] = None,
                 connection_timeout: Optional[pulumi.Input[builtins.int]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 enabled: Optional[pulumi.Input[builtins.bool]] = None,
                 end_port: Optional[pulumi.Input[builtins.int]] = None,
                 healths: Optional[pulumi.Input[Sequence[pulumi.Input['NlbListenerHealthArgs']]]] = None,
                 listener_name: Optional[pulumi.Input[builtins.str]] = None,
                 security_policy_id: Optional[pulumi.Input[builtins.str]] = None,
                 start_port: Optional[pulumi.Input[builtins.int]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input['NlbListenerTagArgs']]]] = None):
        """
        The set of arguments for constructing a NlbListener resource.
        :param pulumi.Input[builtins.str] load_balancer_id: 负载均衡实例ID。
        :param pulumi.Input[builtins.int] port: 监听器接收请求的端口，0表示启用全端口监听。
        :param pulumi.Input[builtins.str] protocol: 监听协议类型。TCP,UDP,TLS
        :param pulumi.Input[builtins.str] server_group_id: 监听器关联的服务器组ID。
        :param pulumi.Input[builtins.str] certificate_id: TLS监听器服务器证书的ID，仅支持传入证书中心 SSL 证书。。
        :param pulumi.Input[builtins.int] connection_timeout: 监听器的连接超时时间（秒）。
        :param pulumi.Input[builtins.str] description: 监听器描述信息。
        :param pulumi.Input[builtins.bool] enabled: 是否启用监听器。true：开启；false：关闭。
        :param pulumi.Input[builtins.int] end_port: 全端口监听的结束端口，仅当Port为0时有效。
        :param pulumi.Input[builtins.str] listener_name: 监听器名称。
        :param pulumi.Input[builtins.str] security_policy_id: TLS 安全策略ID，支持系统安全策略和自定义安全策略。系统安全策略取值：.tls*cipher*policy*1*0.tls*cipher*policy*1*1.tls*cipher*policy*1*2.tls*cipher*policy*1*2*strict.tls*cipher*policy*1*2*strict*with*1_3.自定义安全策略：输入自定义安全策略 ID。当Protocol为TLS 时，该参数为必填。。
        :param pulumi.Input[builtins.int] start_port: 全端口监听的起始端口，仅当Port为0时有效。
        """
        pulumi.set(__self__, "load_balancer_id", load_balancer_id)
        pulumi.set(__self__, "port", port)
        pulumi.set(__self__, "protocol", protocol)
        pulumi.set(__self__, "server_group_id", server_group_id)
        if certificate_id is not None:
            pulumi.set(__self__, "certificate_id", certificate_id)
        if connection_timeout is not None:
            pulumi.set(__self__, "connection_timeout", connection_timeout)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if enabled is not None:
            pulumi.set(__self__, "enabled", enabled)
        if end_port is not None:
            pulumi.set(__self__, "end_port", end_port)
        if healths is not None:
            pulumi.set(__self__, "healths", healths)
        if listener_name is not None:
            pulumi.set(__self__, "listener_name", listener_name)
        if security_policy_id is not None:
            pulumi.set(__self__, "security_policy_id", security_policy_id)
        if start_port is not None:
            pulumi.set(__self__, "start_port", start_port)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)

    @property
    @pulumi.getter(name="loadBalancerId")
    def load_balancer_id(self) -> pulumi.Input[builtins.str]:
        """
        负载均衡实例ID。
        """
        return pulumi.get(self, "load_balancer_id")

    @load_balancer_id.setter
    def load_balancer_id(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "load_balancer_id", value)

    @property
    @pulumi.getter
    def port(self) -> pulumi.Input[builtins.int]:
        """
        监听器接收请求的端口，0表示启用全端口监听。
        """
        return pulumi.get(self, "port")

    @port.setter
    def port(self, value: pulumi.Input[builtins.int]):
        pulumi.set(self, "port", value)

    @property
    @pulumi.getter
    def protocol(self) -> pulumi.Input[builtins.str]:
        """
        监听协议类型。TCP,UDP,TLS
        """
        return pulumi.get(self, "protocol")

    @protocol.setter
    def protocol(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "protocol", value)

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

    @server_group_id.setter
    def server_group_id(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "server_group_id", value)

    @property
    @pulumi.getter(name="certificateId")
    def certificate_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        TLS监听器服务器证书的ID，仅支持传入证书中心 SSL 证书。。
        """
        return pulumi.get(self, "certificate_id")

    @certificate_id.setter
    def certificate_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "certificate_id", value)

    @property
    @pulumi.getter(name="connectionTimeout")
    def connection_timeout(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        监听器的连接超时时间（秒）。
        """
        return pulumi.get(self, "connection_timeout")

    @connection_timeout.setter
    def connection_timeout(self, value: Optional[pulumi.Input[builtins.int]]):
        pulumi.set(self, "connection_timeout", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        监听器描述信息。
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter
    def enabled(self) -> Optional[pulumi.Input[builtins.bool]]:
        """
        是否启用监听器。true：开启；false：关闭。
        """
        return pulumi.get(self, "enabled")

    @enabled.setter
    def enabled(self, value: Optional[pulumi.Input[builtins.bool]]):
        pulumi.set(self, "enabled", value)

    @property
    @pulumi.getter(name="endPort")
    def end_port(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        全端口监听的结束端口，仅当Port为0时有效。
        """
        return pulumi.get(self, "end_port")

    @end_port.setter
    def end_port(self, value: Optional[pulumi.Input[builtins.int]]):
        pulumi.set(self, "end_port", value)

    @property
    @pulumi.getter
    def healths(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['NlbListenerHealthArgs']]]]:
        return pulumi.get(self, "healths")

    @healths.setter
    def healths(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['NlbListenerHealthArgs']]]]):
        pulumi.set(self, "healths", value)

    @property
    @pulumi.getter(name="listenerName")
    def listener_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        监听器名称。
        """
        return pulumi.get(self, "listener_name")

    @listener_name.setter
    def listener_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "listener_name", value)

    @property
    @pulumi.getter(name="securityPolicyId")
    def security_policy_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        TLS 安全策略ID，支持系统安全策略和自定义安全策略。系统安全策略取值：.tls*cipher*policy*1*0.tls*cipher*policy*1*1.tls*cipher*policy*1*2.tls*cipher*policy*1*2*strict.tls*cipher*policy*1*2*strict*with*1_3.自定义安全策略：输入自定义安全策略 ID。当Protocol为TLS 时，该参数为必填。。
        """
        return pulumi.get(self, "security_policy_id")

    @security_policy_id.setter
    def security_policy_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "security_policy_id", value)

    @property
    @pulumi.getter(name="startPort")
    def start_port(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        全端口监听的起始端口，仅当Port为0时有效。
        """
        return pulumi.get(self, "start_port")

    @start_port.setter
    def start_port(self, value: Optional[pulumi.Input[builtins.int]]):
        pulumi.set(self, "start_port", value)

    @property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['NlbListenerTagArgs']]]]:
        return pulumi.get(self, "tags")

    @tags.setter
    def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['NlbListenerTagArgs']]]]):
        pulumi.set(self, "tags", value)


@pulumi.input_type
class _NlbListenerState:
    def __init__(__self__, *,
                 certificate_id: Optional[pulumi.Input[builtins.str]] = None,
                 connection_timeout: Optional[pulumi.Input[builtins.int]] = None,
                 created_time: Optional[pulumi.Input[builtins.str]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 enabled: Optional[pulumi.Input[builtins.bool]] = None,
                 end_port: Optional[pulumi.Input[builtins.int]] = None,
                 healths: Optional[pulumi.Input[Sequence[pulumi.Input['NlbListenerHealthArgs']]]] = None,
                 listener_id: Optional[pulumi.Input[builtins.str]] = None,
                 listener_name: Optional[pulumi.Input[builtins.str]] = None,
                 load_balancer_id: Optional[pulumi.Input[builtins.str]] = None,
                 port: Optional[pulumi.Input[builtins.int]] = None,
                 protocol: Optional[pulumi.Input[builtins.str]] = None,
                 security_policy_id: Optional[pulumi.Input[builtins.str]] = None,
                 server_group_id: Optional[pulumi.Input[builtins.str]] = None,
                 start_port: Optional[pulumi.Input[builtins.int]] = None,
                 status: Optional[pulumi.Input[builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input['NlbListenerTagArgs']]]] = None,
                 updated_time: Optional[pulumi.Input[builtins.str]] = None):
        """
        Input properties used for looking up and filtering NlbListener resources.
        :param pulumi.Input[builtins.str] certificate_id: TLS监听器服务器证书的ID，仅支持传入证书中心 SSL 证书。。
        :param pulumi.Input[builtins.int] connection_timeout: 监听器的连接超时时间（秒）。
        :param pulumi.Input[builtins.str] created_time: 监听器的创建时间。
        :param pulumi.Input[builtins.str] description: 监听器描述信息。
        :param pulumi.Input[builtins.bool] enabled: 是否启用监听器。true：开启；false：关闭。
        :param pulumi.Input[builtins.int] end_port: 全端口监听的结束端口，仅当Port为0时有效。
        :param pulumi.Input[builtins.str] listener_id: 监听器唯一标识。
        :param pulumi.Input[builtins.str] listener_name: 监听器名称。
        :param pulumi.Input[builtins.str] load_balancer_id: 负载均衡实例ID。
        :param pulumi.Input[builtins.int] port: 监听器接收请求的端口，0表示启用全端口监听。
        :param pulumi.Input[builtins.str] protocol: 监听协议类型。TCP,UDP,TLS
        :param pulumi.Input[builtins.str] security_policy_id: TLS 安全策略ID，支持系统安全策略和自定义安全策略。系统安全策略取值：.tls*cipher*policy*1*0.tls*cipher*policy*1*1.tls*cipher*policy*1*2.tls*cipher*policy*1*2*strict.tls*cipher*policy*1*2*strict*with*1_3.自定义安全策略：输入自定义安全策略 ID。当Protocol为TLS 时，该参数为必填。。
        :param pulumi.Input[builtins.str] server_group_id: 监听器关联的服务器组ID。
        :param pulumi.Input[builtins.int] start_port: 全端口监听的起始端口，仅当Port为0时有效。
        :param pulumi.Input[builtins.str] status: 监听器的状态。
        :param pulumi.Input[builtins.str] updated_time: 监听器最近操作时间。
        """
        if certificate_id is not None:
            pulumi.set(__self__, "certificate_id", certificate_id)
        if connection_timeout is not None:
            pulumi.set(__self__, "connection_timeout", connection_timeout)
        if created_time is not None:
            pulumi.set(__self__, "created_time", created_time)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if enabled is not None:
            pulumi.set(__self__, "enabled", enabled)
        if end_port is not None:
            pulumi.set(__self__, "end_port", end_port)
        if healths is not None:
            pulumi.set(__self__, "healths", healths)
        if listener_id is not None:
            pulumi.set(__self__, "listener_id", listener_id)
        if listener_name is not None:
            pulumi.set(__self__, "listener_name", listener_name)
        if load_balancer_id is not None:
            pulumi.set(__self__, "load_balancer_id", load_balancer_id)
        if port is not None:
            pulumi.set(__self__, "port", port)
        if protocol is not None:
            pulumi.set(__self__, "protocol", protocol)
        if security_policy_id is not None:
            pulumi.set(__self__, "security_policy_id", security_policy_id)
        if server_group_id is not None:
            pulumi.set(__self__, "server_group_id", server_group_id)
        if start_port is not None:
            pulumi.set(__self__, "start_port", start_port)
        if status is not None:
            pulumi.set(__self__, "status", status)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if updated_time is not None:
            pulumi.set(__self__, "updated_time", updated_time)

    @property
    @pulumi.getter(name="certificateId")
    def certificate_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        TLS监听器服务器证书的ID，仅支持传入证书中心 SSL 证书。。
        """
        return pulumi.get(self, "certificate_id")

    @certificate_id.setter
    def certificate_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "certificate_id", value)

    @property
    @pulumi.getter(name="connectionTimeout")
    def connection_timeout(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        监听器的连接超时时间（秒）。
        """
        return pulumi.get(self, "connection_timeout")

    @connection_timeout.setter
    def connection_timeout(self, value: Optional[pulumi.Input[builtins.int]]):
        pulumi.set(self, "connection_timeout", value)

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

    @created_time.setter
    def created_time(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "created_time", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        监听器描述信息。
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter
    def enabled(self) -> Optional[pulumi.Input[builtins.bool]]:
        """
        是否启用监听器。true：开启；false：关闭。
        """
        return pulumi.get(self, "enabled")

    @enabled.setter
    def enabled(self, value: Optional[pulumi.Input[builtins.bool]]):
        pulumi.set(self, "enabled", value)

    @property
    @pulumi.getter(name="endPort")
    def end_port(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        全端口监听的结束端口，仅当Port为0时有效。
        """
        return pulumi.get(self, "end_port")

    @end_port.setter
    def end_port(self, value: Optional[pulumi.Input[builtins.int]]):
        pulumi.set(self, "end_port", value)

    @property
    @pulumi.getter
    def healths(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['NlbListenerHealthArgs']]]]:
        return pulumi.get(self, "healths")

    @healths.setter
    def healths(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['NlbListenerHealthArgs']]]]):
        pulumi.set(self, "healths", value)

    @property
    @pulumi.getter(name="listenerId")
    def listener_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        监听器唯一标识。
        """
        return pulumi.get(self, "listener_id")

    @listener_id.setter
    def listener_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "listener_id", value)

    @property
    @pulumi.getter(name="listenerName")
    def listener_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        监听器名称。
        """
        return pulumi.get(self, "listener_name")

    @listener_name.setter
    def listener_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "listener_name", value)

    @property
    @pulumi.getter(name="loadBalancerId")
    def load_balancer_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        负载均衡实例ID。
        """
        return pulumi.get(self, "load_balancer_id")

    @load_balancer_id.setter
    def load_balancer_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "load_balancer_id", value)

    @property
    @pulumi.getter
    def port(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        监听器接收请求的端口，0表示启用全端口监听。
        """
        return pulumi.get(self, "port")

    @port.setter
    def port(self, value: Optional[pulumi.Input[builtins.int]]):
        pulumi.set(self, "port", value)

    @property
    @pulumi.getter
    def protocol(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        监听协议类型。TCP,UDP,TLS
        """
        return pulumi.get(self, "protocol")

    @protocol.setter
    def protocol(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "protocol", value)

    @property
    @pulumi.getter(name="securityPolicyId")
    def security_policy_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        TLS 安全策略ID，支持系统安全策略和自定义安全策略。系统安全策略取值：.tls*cipher*policy*1*0.tls*cipher*policy*1*1.tls*cipher*policy*1*2.tls*cipher*policy*1*2*strict.tls*cipher*policy*1*2*strict*with*1_3.自定义安全策略：输入自定义安全策略 ID。当Protocol为TLS 时，该参数为必填。。
        """
        return pulumi.get(self, "security_policy_id")

    @security_policy_id.setter
    def security_policy_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "security_policy_id", value)

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

    @server_group_id.setter
    def server_group_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "server_group_id", value)

    @property
    @pulumi.getter(name="startPort")
    def start_port(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        全端口监听的起始端口，仅当Port为0时有效。
        """
        return pulumi.get(self, "start_port")

    @start_port.setter
    def start_port(self, value: Optional[pulumi.Input[builtins.int]]):
        pulumi.set(self, "start_port", value)

    @property
    @pulumi.getter
    def status(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        监听器的状态。
        """
        return pulumi.get(self, "status")

    @status.setter
    def status(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "status", value)

    @property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['NlbListenerTagArgs']]]]:
        return pulumi.get(self, "tags")

    @tags.setter
    def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['NlbListenerTagArgs']]]]):
        pulumi.set(self, "tags", value)

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

    @updated_time.setter
    def updated_time(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "updated_time", value)


@pulumi.type_token("bytepluscc:clb/nlbListener:NlbListener")
class NlbListener(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 certificate_id: Optional[pulumi.Input[builtins.str]] = None,
                 connection_timeout: Optional[pulumi.Input[builtins.int]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 enabled: Optional[pulumi.Input[builtins.bool]] = None,
                 end_port: Optional[pulumi.Input[builtins.int]] = None,
                 healths: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NlbListenerHealthArgs', 'NlbListenerHealthArgsDict']]]]] = None,
                 listener_name: Optional[pulumi.Input[builtins.str]] = None,
                 load_balancer_id: Optional[pulumi.Input[builtins.str]] = None,
                 port: Optional[pulumi.Input[builtins.int]] = None,
                 protocol: Optional[pulumi.Input[builtins.str]] = None,
                 security_policy_id: Optional[pulumi.Input[builtins.str]] = None,
                 server_group_id: Optional[pulumi.Input[builtins.str]] = None,
                 start_port: Optional[pulumi.Input[builtins.int]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NlbListenerTagArgs', 'NlbListenerTagArgsDict']]]]] = None,
                 __props__=None):
        """
        监听器负责根据指定的协议和端口，监听NLB实例接收到的用户访问请求。NLB将按照该监听器关联的服务器组配置的调度算法，将访问请求转发至该服务器组内健康的后端服务器。

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        c_lbnlb_listener_demo = bytepluscc.clb.NlbListener("CLBNLBListenerDemo",
            load_balancer_id="nlb-11zz9w3jqptz449iegfwvxxxx",
            protocol="TCP",
            port=0,
            server_group_id="rsp-11zz9wdewa3uo49ieggq8xxxx",
            connection_timeout=60,
            description="CLBNLBListenerDemo description",
            enabled=True,
            listener_name="CLBNLBListenerDemo",
            tags=[{
                "key": "env",
                "value": "Test",
            }])
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:clb/nlbListener:NlbListener example "listener_id"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] certificate_id: TLS监听器服务器证书的ID，仅支持传入证书中心 SSL 证书。。
        :param pulumi.Input[builtins.int] connection_timeout: 监听器的连接超时时间（秒）。
        :param pulumi.Input[builtins.str] description: 监听器描述信息。
        :param pulumi.Input[builtins.bool] enabled: 是否启用监听器。true：开启；false：关闭。
        :param pulumi.Input[builtins.int] end_port: 全端口监听的结束端口，仅当Port为0时有效。
        :param pulumi.Input[builtins.str] listener_name: 监听器名称。
        :param pulumi.Input[builtins.str] load_balancer_id: 负载均衡实例ID。
        :param pulumi.Input[builtins.int] port: 监听器接收请求的端口，0表示启用全端口监听。
        :param pulumi.Input[builtins.str] protocol: 监听协议类型。TCP,UDP,TLS
        :param pulumi.Input[builtins.str] security_policy_id: TLS 安全策略ID，支持系统安全策略和自定义安全策略。系统安全策略取值：.tls*cipher*policy*1*0.tls*cipher*policy*1*1.tls*cipher*policy*1*2.tls*cipher*policy*1*2*strict.tls*cipher*policy*1*2*strict*with*1_3.自定义安全策略：输入自定义安全策略 ID。当Protocol为TLS 时，该参数为必填。。
        :param pulumi.Input[builtins.str] server_group_id: 监听器关联的服务器组ID。
        :param pulumi.Input[builtins.int] start_port: 全端口监听的起始端口，仅当Port为0时有效。
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: NlbListenerArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        监听器负责根据指定的协议和端口，监听NLB实例接收到的用户访问请求。NLB将按照该监听器关联的服务器组配置的调度算法，将访问请求转发至该服务器组内健康的后端服务器。

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        c_lbnlb_listener_demo = bytepluscc.clb.NlbListener("CLBNLBListenerDemo",
            load_balancer_id="nlb-11zz9w3jqptz449iegfwvxxxx",
            protocol="TCP",
            port=0,
            server_group_id="rsp-11zz9wdewa3uo49ieggq8xxxx",
            connection_timeout=60,
            description="CLBNLBListenerDemo description",
            enabled=True,
            listener_name="CLBNLBListenerDemo",
            tags=[{
                "key": "env",
                "value": "Test",
            }])
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:clb/nlbListener:NlbListener example "listener_id"
        ```

        :param str resource_name: The name of the resource.
        :param NlbListenerArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(NlbListenerArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 certificate_id: Optional[pulumi.Input[builtins.str]] = None,
                 connection_timeout: Optional[pulumi.Input[builtins.int]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 enabled: Optional[pulumi.Input[builtins.bool]] = None,
                 end_port: Optional[pulumi.Input[builtins.int]] = None,
                 healths: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NlbListenerHealthArgs', 'NlbListenerHealthArgsDict']]]]] = None,
                 listener_name: Optional[pulumi.Input[builtins.str]] = None,
                 load_balancer_id: Optional[pulumi.Input[builtins.str]] = None,
                 port: Optional[pulumi.Input[builtins.int]] = None,
                 protocol: Optional[pulumi.Input[builtins.str]] = None,
                 security_policy_id: Optional[pulumi.Input[builtins.str]] = None,
                 server_group_id: Optional[pulumi.Input[builtins.str]] = None,
                 start_port: Optional[pulumi.Input[builtins.int]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NlbListenerTagArgs', 'NlbListenerTagArgsDict']]]]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = NlbListenerArgs.__new__(NlbListenerArgs)

            __props__.__dict__["certificate_id"] = certificate_id
            __props__.__dict__["connection_timeout"] = connection_timeout
            __props__.__dict__["description"] = description
            __props__.__dict__["enabled"] = enabled
            __props__.__dict__["end_port"] = end_port
            __props__.__dict__["healths"] = healths
            __props__.__dict__["listener_name"] = listener_name
            if load_balancer_id is None and not opts.urn:
                raise TypeError("Missing required property 'load_balancer_id'")
            __props__.__dict__["load_balancer_id"] = load_balancer_id
            if port is None and not opts.urn:
                raise TypeError("Missing required property 'port'")
            __props__.__dict__["port"] = port
            if protocol is None and not opts.urn:
                raise TypeError("Missing required property 'protocol'")
            __props__.__dict__["protocol"] = protocol
            __props__.__dict__["security_policy_id"] = security_policy_id
            if server_group_id is None and not opts.urn:
                raise TypeError("Missing required property 'server_group_id'")
            __props__.__dict__["server_group_id"] = server_group_id
            __props__.__dict__["start_port"] = start_port
            __props__.__dict__["tags"] = tags
            __props__.__dict__["created_time"] = None
            __props__.__dict__["listener_id"] = None
            __props__.__dict__["status"] = None
            __props__.__dict__["updated_time"] = None
        super(NlbListener, __self__).__init__(
            'bytepluscc:clb/nlbListener:NlbListener',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            certificate_id: Optional[pulumi.Input[builtins.str]] = None,
            connection_timeout: Optional[pulumi.Input[builtins.int]] = None,
            created_time: Optional[pulumi.Input[builtins.str]] = None,
            description: Optional[pulumi.Input[builtins.str]] = None,
            enabled: Optional[pulumi.Input[builtins.bool]] = None,
            end_port: Optional[pulumi.Input[builtins.int]] = None,
            healths: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NlbListenerHealthArgs', 'NlbListenerHealthArgsDict']]]]] = None,
            listener_id: Optional[pulumi.Input[builtins.str]] = None,
            listener_name: Optional[pulumi.Input[builtins.str]] = None,
            load_balancer_id: Optional[pulumi.Input[builtins.str]] = None,
            port: Optional[pulumi.Input[builtins.int]] = None,
            protocol: Optional[pulumi.Input[builtins.str]] = None,
            security_policy_id: Optional[pulumi.Input[builtins.str]] = None,
            server_group_id: Optional[pulumi.Input[builtins.str]] = None,
            start_port: Optional[pulumi.Input[builtins.int]] = None,
            status: Optional[pulumi.Input[builtins.str]] = None,
            tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NlbListenerTagArgs', 'NlbListenerTagArgsDict']]]]] = None,
            updated_time: Optional[pulumi.Input[builtins.str]] = None) -> 'NlbListener':
        """
        Get an existing NlbListener resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] certificate_id: TLS监听器服务器证书的ID，仅支持传入证书中心 SSL 证书。。
        :param pulumi.Input[builtins.int] connection_timeout: 监听器的连接超时时间（秒）。
        :param pulumi.Input[builtins.str] created_time: 监听器的创建时间。
        :param pulumi.Input[builtins.str] description: 监听器描述信息。
        :param pulumi.Input[builtins.bool] enabled: 是否启用监听器。true：开启；false：关闭。
        :param pulumi.Input[builtins.int] end_port: 全端口监听的结束端口，仅当Port为0时有效。
        :param pulumi.Input[builtins.str] listener_id: 监听器唯一标识。
        :param pulumi.Input[builtins.str] listener_name: 监听器名称。
        :param pulumi.Input[builtins.str] load_balancer_id: 负载均衡实例ID。
        :param pulumi.Input[builtins.int] port: 监听器接收请求的端口，0表示启用全端口监听。
        :param pulumi.Input[builtins.str] protocol: 监听协议类型。TCP,UDP,TLS
        :param pulumi.Input[builtins.str] security_policy_id: TLS 安全策略ID，支持系统安全策略和自定义安全策略。系统安全策略取值：.tls*cipher*policy*1*0.tls*cipher*policy*1*1.tls*cipher*policy*1*2.tls*cipher*policy*1*2*strict.tls*cipher*policy*1*2*strict*with*1_3.自定义安全策略：输入自定义安全策略 ID。当Protocol为TLS 时，该参数为必填。。
        :param pulumi.Input[builtins.str] server_group_id: 监听器关联的服务器组ID。
        :param pulumi.Input[builtins.int] start_port: 全端口监听的起始端口，仅当Port为0时有效。
        :param pulumi.Input[builtins.str] status: 监听器的状态。
        :param pulumi.Input[builtins.str] updated_time: 监听器最近操作时间。
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _NlbListenerState.__new__(_NlbListenerState)

        __props__.__dict__["certificate_id"] = certificate_id
        __props__.__dict__["connection_timeout"] = connection_timeout
        __props__.__dict__["created_time"] = created_time
        __props__.__dict__["description"] = description
        __props__.__dict__["enabled"] = enabled
        __props__.__dict__["end_port"] = end_port
        __props__.__dict__["healths"] = healths
        __props__.__dict__["listener_id"] = listener_id
        __props__.__dict__["listener_name"] = listener_name
        __props__.__dict__["load_balancer_id"] = load_balancer_id
        __props__.__dict__["port"] = port
        __props__.__dict__["protocol"] = protocol
        __props__.__dict__["security_policy_id"] = security_policy_id
        __props__.__dict__["server_group_id"] = server_group_id
        __props__.__dict__["start_port"] = start_port
        __props__.__dict__["status"] = status
        __props__.__dict__["tags"] = tags
        __props__.__dict__["updated_time"] = updated_time
        return NlbListener(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="certificateId")
    def certificate_id(self) -> pulumi.Output[builtins.str]:
        """
        TLS监听器服务器证书的ID，仅支持传入证书中心 SSL 证书。。
        """
        return pulumi.get(self, "certificate_id")

    @property
    @pulumi.getter(name="connectionTimeout")
    def connection_timeout(self) -> pulumi.Output[builtins.int]:
        """
        监听器的连接超时时间（秒）。
        """
        return pulumi.get(self, "connection_timeout")

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

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[builtins.str]:
        """
        监听器描述信息。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def enabled(self) -> pulumi.Output[builtins.bool]:
        """
        是否启用监听器。true：开启；false：关闭。
        """
        return pulumi.get(self, "enabled")

    @property
    @pulumi.getter(name="endPort")
    def end_port(self) -> pulumi.Output[builtins.int]:
        """
        全端口监听的结束端口，仅当Port为0时有效。
        """
        return pulumi.get(self, "end_port")

    @property
    @pulumi.getter
    def healths(self) -> pulumi.Output[Sequence['outputs.NlbListenerHealth']]:
        return pulumi.get(self, "healths")

    @property
    @pulumi.getter(name="listenerId")
    def listener_id(self) -> pulumi.Output[builtins.str]:
        """
        监听器唯一标识。
        """
        return pulumi.get(self, "listener_id")

    @property
    @pulumi.getter(name="listenerName")
    def listener_name(self) -> pulumi.Output[builtins.str]:
        """
        监听器名称。
        """
        return pulumi.get(self, "listener_name")

    @property
    @pulumi.getter(name="loadBalancerId")
    def load_balancer_id(self) -> pulumi.Output[builtins.str]:
        """
        负载均衡实例ID。
        """
        return pulumi.get(self, "load_balancer_id")

    @property
    @pulumi.getter
    def port(self) -> pulumi.Output[builtins.int]:
        """
        监听器接收请求的端口，0表示启用全端口监听。
        """
        return pulumi.get(self, "port")

    @property
    @pulumi.getter
    def protocol(self) -> pulumi.Output[builtins.str]:
        """
        监听协议类型。TCP,UDP,TLS
        """
        return pulumi.get(self, "protocol")

    @property
    @pulumi.getter(name="securityPolicyId")
    def security_policy_id(self) -> pulumi.Output[builtins.str]:
        """
        TLS 安全策略ID，支持系统安全策略和自定义安全策略。系统安全策略取值：.tls*cipher*policy*1*0.tls*cipher*policy*1*1.tls*cipher*policy*1*2.tls*cipher*policy*1*2*strict.tls*cipher*policy*1*2*strict*with*1_3.自定义安全策略：输入自定义安全策略 ID。当Protocol为TLS 时，该参数为必填。。
        """
        return pulumi.get(self, "security_policy_id")

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

    @property
    @pulumi.getter(name="startPort")
    def start_port(self) -> pulumi.Output[builtins.int]:
        """
        全端口监听的起始端口，仅当Port为0时有效。
        """
        return pulumi.get(self, "start_port")

    @property
    @pulumi.getter
    def status(self) -> pulumi.Output[builtins.str]:
        """
        监听器的状态。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter
    def tags(self) -> pulumi.Output[Sequence['outputs.NlbListenerTag']]:
        return pulumi.get(self, "tags")

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

