# 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__ = [
    'GetNlbSecurityPolicyResult',
    'AwaitableGetNlbSecurityPolicyResult',
    'get_nlb_security_policy',
    'get_nlb_security_policy_output',
]

@pulumi.output_type
class GetNlbSecurityPolicyResult:
    """
    A collection of values returned by getNlbSecurityPolicy.
    """
    def __init__(__self__, account_id=None, ciphers=None, created_time=None, id=None, project_name=None, related_listener_ids=None, security_policy_id=None, security_policy_name=None, status=None, tags=None, tls_versions=None, updated_time=None):
        if account_id and not isinstance(account_id, str):
            raise TypeError("Expected argument 'account_id' to be a str")
        pulumi.set(__self__, "account_id", account_id)
        if ciphers and not isinstance(ciphers, list):
            raise TypeError("Expected argument 'ciphers' to be a list")
        pulumi.set(__self__, "ciphers", ciphers)
        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 id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if project_name and not isinstance(project_name, str):
            raise TypeError("Expected argument 'project_name' to be a str")
        pulumi.set(__self__, "project_name", project_name)
        if related_listener_ids and not isinstance(related_listener_ids, list):
            raise TypeError("Expected argument 'related_listener_ids' to be a list")
        pulumi.set(__self__, "related_listener_ids", related_listener_ids)
        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 security_policy_name and not isinstance(security_policy_name, str):
            raise TypeError("Expected argument 'security_policy_name' to be a str")
        pulumi.set(__self__, "security_policy_name", security_policy_name)
        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 tls_versions and not isinstance(tls_versions, list):
            raise TypeError("Expected argument 'tls_versions' to be a list")
        pulumi.set(__self__, "tls_versions", tls_versions)
        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)

    @property
    @pulumi.getter(name="accountId")
    def account_id(self) -> builtins.str:
        """
        TLS 安全策略所属的账号ID。
        """
        return pulumi.get(self, "account_id")

    @property
    @pulumi.getter
    def ciphers(self) -> Sequence[builtins.str]:
        """
        TLS自定义安全策略的加密套件，不同的TLS协议版本支持的加密套件如下：TLSv1.0 & TLSv1.1：ECDHE-ECDSA-AES128-SHA，ECDHE-ECDSA-AES256-SHA，ECDHE-RSA-AES128-SHA，ECDHE-RSA-AES256-SHA，AES128-SHA，AES256-SHA，DES-CBC3-SHA。TLSv1.2：ECDHE-ECDSA-AES128-GCM-SHA256，ECDHE-ECDSA-AES256-GCM-SHA384，ECDHE-ECDSA-AES128-SHA256，ECDHE-ECDSA-AES256-SHA384，ECDHE-RSA-AES128-GCM-SHA256，ECDHE-RSA-AES256-GCM-SHA384，ECDHE-RSA-AES128-SHA256，ECDHE-RSA-AES256-SHA384，AES128-GCM-SHA256，AES256-GCM-SHA384，AES128-SHA256，AES256-SHA256。TLSv1.3：TLS*CHACHA20*POLY1305*SHA256，TLS*AES*256*GCM*SHA384，TLS*AES*128*GCM*SHA256，TLS*AES*128*CCM*8*SHA256，TLS*AES*128*CCM*SHA256，TLS*SM4*GCM*SM3，TLS*SM4*CCM*SM3。当传入此参数时，需要传入待支持的全部加密套件，不支持通过此接口仅新增/删除加密套件。仅传入Ciphers.N，未传入TlsVersions.N，则依据当前监听器支持的TLS 协议版本和请求中传入的加密套件做校验。传入TlsVersions.N和Ciphers.N，则依据请求中传入的TLS 协议版本和加密套件做校验。TLS*SM4*GCM*SM3和TLS*SM4*CCM*SM3两个加密套件正在邀测中，如需试用，请联系客户经理。
        """
        return pulumi.get(self, "ciphers")

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

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

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> builtins.str:
        """
        TLS自定义安全策略所属项目的名称。不传则默认为defaul。
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter(name="relatedListenerIds")
    def related_listener_ids(self) -> Sequence[builtins.str]:
        """
        TLS 安全策略关联的监听器。
        """
        return pulumi.get(self, "related_listener_ids")

    @property
    @pulumi.getter(name="securityPolicyId")
    def security_policy_id(self) -> builtins.str:
        """
        安全策略ID。
        """
        return pulumi.get(self, "security_policy_id")

    @property
    @pulumi.getter(name="securityPolicyName")
    def security_policy_name(self) -> builtins.str:
        """
        安全策略名称。必须以字母、数字或中文开头，可包含以下特殊字符：点（.）、下划线（_）和中划线（-）；长度限制为1 ～ 128个字符；该参数不传入，则默认为策略ID。
        """
        return pulumi.get(self, "security_policy_name")

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        TLS 自定义安全策略状态。Creating：创建中。Configuring：配置中。Active：正常。Deleting：删除中。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetNlbSecurityPolicyTagResult']:
        """
        标签列表。
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="tlsVersions")
    def tls_versions(self) -> Sequence[builtins.str]:
        """
        更新TLS自定义安全策略的TLS 协议版本。取值：TLSv1.0，TLSv1.1，TLSv1.2，TLSv1.3。当传入此参数时，需要传入待支持的全部TLS版本，不支持通过此接口仅新增/删除TLS协议版本。仅传入TlsVersions.N，未传入Ciphers.N，则依据请求中传入的TLS协议版本和当前监听器支持的加密套件做校验。传入TlsVersions.N和Ciphers.N，则依据请求中传入的TLS协议版本和加密套件做校验。
        """
        return pulumi.get(self, "tls_versions")

    @property
    @pulumi.getter(name="updatedTime")
    def updated_time(self) -> builtins.str:
        """
        更新时间。
        """
        return pulumi.get(self, "updated_time")


class AwaitableGetNlbSecurityPolicyResult(GetNlbSecurityPolicyResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetNlbSecurityPolicyResult(
            account_id=self.account_id,
            ciphers=self.ciphers,
            created_time=self.created_time,
            id=self.id,
            project_name=self.project_name,
            related_listener_ids=self.related_listener_ids,
            security_policy_id=self.security_policy_id,
            security_policy_name=self.security_policy_name,
            status=self.status,
            tags=self.tags,
            tls_versions=self.tls_versions,
            updated_time=self.updated_time)


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


    :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/getNlbSecurityPolicy:getNlbSecurityPolicy', __args__, opts=opts, typ=GetNlbSecurityPolicyResult).value

    return AwaitableGetNlbSecurityPolicyResult(
        account_id=pulumi.get(__ret__, 'account_id'),
        ciphers=pulumi.get(__ret__, 'ciphers'),
        created_time=pulumi.get(__ret__, 'created_time'),
        id=pulumi.get(__ret__, 'id'),
        project_name=pulumi.get(__ret__, 'project_name'),
        related_listener_ids=pulumi.get(__ret__, 'related_listener_ids'),
        security_policy_id=pulumi.get(__ret__, 'security_policy_id'),
        security_policy_name=pulumi.get(__ret__, 'security_policy_name'),
        status=pulumi.get(__ret__, 'status'),
        tags=pulumi.get(__ret__, 'tags'),
        tls_versions=pulumi.get(__ret__, 'tls_versions'),
        updated_time=pulumi.get(__ret__, 'updated_time'))
def get_nlb_security_policy_output(id: Optional[pulumi.Input[builtins.str]] = None,
                                   opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetNlbSecurityPolicyResult]:
    """
    Data Source schema for Byteplus::CLB::NLBSecurityPolicy


    :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/getNlbSecurityPolicy:getNlbSecurityPolicy', __args__, opts=opts, typ=GetNlbSecurityPolicyResult)
    return __ret__.apply(lambda __response__: GetNlbSecurityPolicyResult(
        account_id=pulumi.get(__response__, 'account_id'),
        ciphers=pulumi.get(__response__, 'ciphers'),
        created_time=pulumi.get(__response__, 'created_time'),
        id=pulumi.get(__response__, 'id'),
        project_name=pulumi.get(__response__, 'project_name'),
        related_listener_ids=pulumi.get(__response__, 'related_listener_ids'),
        security_policy_id=pulumi.get(__response__, 'security_policy_id'),
        security_policy_name=pulumi.get(__response__, 'security_policy_name'),
        status=pulumi.get(__response__, 'status'),
        tags=pulumi.get(__response__, 'tags'),
        tls_versions=pulumi.get(__response__, 'tls_versions'),
        updated_time=pulumi.get(__response__, 'updated_time')))
