# 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__ = [
    'GetAllowListResult',
    'AwaitableGetAllowListResult',
    'get_allow_list',
    'get_allow_list_output',
]

@pulumi.output_type
class GetAllowListResult:
    """
    A collection of values returned by getAllowList.
    """
    def __init__(__self__, allow_list=None, allow_list_desc=None, allow_list_id=None, allow_list_ip_num=None, allow_list_name=None, apply_instance_num=None, associated_instance_num=None, associated_instances=None, id=None):
        if allow_list and not isinstance(allow_list, str):
            raise TypeError("Expected argument 'allow_list' to be a str")
        pulumi.set(__self__, "allow_list", allow_list)
        if allow_list_desc and not isinstance(allow_list_desc, str):
            raise TypeError("Expected argument 'allow_list_desc' to be a str")
        pulumi.set(__self__, "allow_list_desc", allow_list_desc)
        if allow_list_id and not isinstance(allow_list_id, str):
            raise TypeError("Expected argument 'allow_list_id' to be a str")
        pulumi.set(__self__, "allow_list_id", allow_list_id)
        if allow_list_ip_num and not isinstance(allow_list_ip_num, int):
            raise TypeError("Expected argument 'allow_list_ip_num' to be a int")
        pulumi.set(__self__, "allow_list_ip_num", allow_list_ip_num)
        if allow_list_name and not isinstance(allow_list_name, str):
            raise TypeError("Expected argument 'allow_list_name' to be a str")
        pulumi.set(__self__, "allow_list_name", allow_list_name)
        if apply_instance_num and not isinstance(apply_instance_num, int):
            raise TypeError("Expected argument 'apply_instance_num' to be a int")
        pulumi.set(__self__, "apply_instance_num", apply_instance_num)
        if associated_instance_num and not isinstance(associated_instance_num, int):
            raise TypeError("Expected argument 'associated_instance_num' to be a int")
        pulumi.set(__self__, "associated_instance_num", associated_instance_num)
        if associated_instances and not isinstance(associated_instances, list):
            raise TypeError("Expected argument 'associated_instances' to be a list")
        pulumi.set(__self__, "associated_instances", associated_instances)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)

    @property
    @pulumi.getter(name="allowList")
    def allow_list(self) -> builtins.str:
        """
        白名单规则列表。支持指定为 IP 地址或者 IP 网段。多个 IP 地址或网段之间使用英文逗号（,）分隔。每个白名单最多可配置 300 个 IP 地址或网段。
        """
        return pulumi.get(self, "allow_list")

    @property
    @pulumi.getter(name="allowListDesc")
    def allow_list_desc(self) -> builtins.str:
        """
        白名单描述。长度不超过200个字符。
        """
        return pulumi.get(self, "allow_list_desc")

    @property
    @pulumi.getter(name="allowListId")
    def allow_list_id(self) -> builtins.str:
        """
        白名单 ID。
        """
        return pulumi.get(self, "allow_list_id")

    @property
    @pulumi.getter(name="allowListIpNum")
    def allow_list_ip_num(self) -> builtins.int:
        """
        白名单指定的规则个数。
        """
        return pulumi.get(self, "allow_list_ip_num")

    @property
    @pulumi.getter(name="allowListName")
    def allow_list_name(self) -> builtins.str:
        """
        白名单规则名称。长度为 1～128 个字符。只能包含中文、字母、数字、下划线和连字符（-）。不能以数字或连字符（-）开头。白名单名称在当前地域下唯一。
        """
        return pulumi.get(self, "allow_list_name")

    @property
    @pulumi.getter(name="applyInstanceNum")
    def apply_instance_num(self) -> builtins.int:
        """
        此白名单已绑定的实例数量。若指定 AllowList 参数，则此字段必填，用于指定规则修改后预期将会影响到的实例个数。若预期影响个数与实际影响个数不符，则请求失败。
        """
        return pulumi.get(self, "apply_instance_num")

    @property
    @pulumi.getter(name="associatedInstanceNum")
    def associated_instance_num(self) -> builtins.int:
        """
        白名单绑定的实例个数。
        """
        return pulumi.get(self, "associated_instance_num")

    @property
    @pulumi.getter(name="associatedInstances")
    def associated_instances(self) -> Sequence['outputs.GetAllowListAssociatedInstanceResult']:
        """
        白名单绑定的实例信息。
        """
        return pulumi.get(self, "associated_instances")

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


class AwaitableGetAllowListResult(GetAllowListResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetAllowListResult(
            allow_list=self.allow_list,
            allow_list_desc=self.allow_list_desc,
            allow_list_id=self.allow_list_id,
            allow_list_ip_num=self.allow_list_ip_num,
            allow_list_name=self.allow_list_name,
            apply_instance_num=self.apply_instance_num,
            associated_instance_num=self.associated_instance_num,
            associated_instances=self.associated_instances,
            id=self.id)


def get_allow_list(id: Optional[builtins.str] = None,
                   opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAllowListResult:
    """
    Data Source schema for Byteplus::Kafka::AllowList


    :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:kafka/getAllowList:getAllowList', __args__, opts=opts, typ=GetAllowListResult).value

    return AwaitableGetAllowListResult(
        allow_list=pulumi.get(__ret__, 'allow_list'),
        allow_list_desc=pulumi.get(__ret__, 'allow_list_desc'),
        allow_list_id=pulumi.get(__ret__, 'allow_list_id'),
        allow_list_ip_num=pulumi.get(__ret__, 'allow_list_ip_num'),
        allow_list_name=pulumi.get(__ret__, 'allow_list_name'),
        apply_instance_num=pulumi.get(__ret__, 'apply_instance_num'),
        associated_instance_num=pulumi.get(__ret__, 'associated_instance_num'),
        associated_instances=pulumi.get(__ret__, 'associated_instances'),
        id=pulumi.get(__ret__, 'id'))
def get_allow_list_output(id: Optional[pulumi.Input[builtins.str]] = None,
                          opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAllowListResult]:
    """
    Data Source schema for Byteplus::Kafka::AllowList


    :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:kafka/getAllowList:getAllowList', __args__, opts=opts, typ=GetAllowListResult)
    return __ret__.apply(lambda __response__: GetAllowListResult(
        allow_list=pulumi.get(__response__, 'allow_list'),
        allow_list_desc=pulumi.get(__response__, 'allow_list_desc'),
        allow_list_id=pulumi.get(__response__, 'allow_list_id'),
        allow_list_ip_num=pulumi.get(__response__, 'allow_list_ip_num'),
        allow_list_name=pulumi.get(__response__, 'allow_list_name'),
        apply_instance_num=pulumi.get(__response__, 'apply_instance_num'),
        associated_instance_num=pulumi.get(__response__, 'associated_instance_num'),
        associated_instances=pulumi.get(__response__, 'associated_instances'),
        id=pulumi.get(__response__, 'id')))
