# 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, allow_list_type=None, associated_instance_num=None, associated_instances=None, id=None, modify_mode=None, project_name=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 allow_list_type and not isinstance(allow_list_type, str):
            raise TypeError("Expected argument 'allow_list_type' to be a str")
        pulumi.set(__self__, "allow_list_type", allow_list_type)
        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)
        if modify_mode and not isinstance(modify_mode, str):
            raise TypeError("Expected argument 'modify_mode' to be a str")
        pulumi.set(__self__, "modify_mode", modify_mode)
        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)

    @property
    @pulumi.getter(name="allowList")
    def allow_list(self) -> builtins.str:
        """
        IP 白名单，多个 IP 地址请以英文逗号（,）隔开，不可重复。
        """
        return pulumi.get(self, "allow_list")

    @property
    @pulumi.getter(name="allowListDesc")
    def allow_list_desc(self) -> builtins.str:
        """
        白名单描述。
        """
        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:
        """
        白名单内的 IP 地址（或地址段）总数。
        """
        return pulumi.get(self, "allow_list_ip_num")

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

    @property
    @pulumi.getter(name="allowListType")
    def allow_list_type(self) -> builtins.str:
        """
        白名单内的IP地址类型，当前仅支持IPv4。
        """
        return pulumi.get(self, "allow_list_type")

    @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")

    @property
    @pulumi.getter(name="modifyMode")
    def modify_mode(self) -> builtins.str:
        """
        修改白名单的方式，支持设置为：Cover（默认）：使用 AllowList 参数中的值覆盖原白名单。Append：在原白名单中增加 AllowList 参数中输入的 IP 地址。Delete：在原白名单中删除 AllowList 参数中输入的 IP 地址。至少需要保留一个 IP 地址。
        """
        return pulumi.get(self, "modify_mode")

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> builtins.str:
        """
        白名单所属的项目名称，当该参数留空时，新建的白名单默认加入 default 项目
        """
        return pulumi.get(self, "project_name")


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,
            allow_list_type=self.allow_list_type,
            associated_instance_num=self.associated_instance_num,
            associated_instances=self.associated_instances,
            id=self.id,
            modify_mode=self.modify_mode,
            project_name=self.project_name)


def get_allow_list(id: Optional[builtins.str] = None,
                   opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAllowListResult:
    """
    Data Source schema for Byteplus::VEDBM::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:vedbm/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'),
        allow_list_type=pulumi.get(__ret__, 'allow_list_type'),
        associated_instance_num=pulumi.get(__ret__, 'associated_instance_num'),
        associated_instances=pulumi.get(__ret__, 'associated_instances'),
        id=pulumi.get(__ret__, 'id'),
        modify_mode=pulumi.get(__ret__, 'modify_mode'),
        project_name=pulumi.get(__ret__, 'project_name'))
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::VEDBM::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:vedbm/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'),
        allow_list_type=pulumi.get(__response__, 'allow_list_type'),
        associated_instance_num=pulumi.get(__response__, 'associated_instance_num'),
        associated_instances=pulumi.get(__response__, 'associated_instances'),
        id=pulumi.get(__response__, 'id'),
        modify_mode=pulumi.get(__response__, 'modify_mode'),
        project_name=pulumi.get(__response__, 'project_name')))
