# 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__ = [
    'GetDnsControlPolicyResult',
    'AwaitableGetDnsControlPolicyResult',
    'get_dns_control_policy',
    'get_dns_control_policy_output',
]

@pulumi.output_type
class GetDnsControlPolicyResult:
    """
    A collection of values returned by getDnsControlPolicy.
    """
    def __init__(__self__, account_id=None, description=None, destination=None, destination_group_lists=None, destination_type=None, domain_list_v1s=None, domain_lists=None, hit_cnt=None, id=None, internet_firewall_id=None, last_hit_time=None, rule_id=None, sources=None, status=None, use_count=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 description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if destination and not isinstance(destination, str):
            raise TypeError("Expected argument 'destination' to be a str")
        pulumi.set(__self__, "destination", destination)
        if destination_group_lists and not isinstance(destination_group_lists, list):
            raise TypeError("Expected argument 'destination_group_lists' to be a list")
        pulumi.set(__self__, "destination_group_lists", destination_group_lists)
        if destination_type and not isinstance(destination_type, str):
            raise TypeError("Expected argument 'destination_type' to be a str")
        pulumi.set(__self__, "destination_type", destination_type)
        if domain_list_v1s and not isinstance(domain_list_v1s, list):
            raise TypeError("Expected argument 'domain_list_v1s' to be a list")
        pulumi.set(__self__, "domain_list_v1s", domain_list_v1s)
        if domain_lists and not isinstance(domain_lists, list):
            raise TypeError("Expected argument 'domain_lists' to be a list")
        pulumi.set(__self__, "domain_lists", domain_lists)
        if hit_cnt and not isinstance(hit_cnt, int):
            raise TypeError("Expected argument 'hit_cnt' to be a int")
        pulumi.set(__self__, "hit_cnt", hit_cnt)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if internet_firewall_id and not isinstance(internet_firewall_id, str):
            raise TypeError("Expected argument 'internet_firewall_id' to be a str")
        pulumi.set(__self__, "internet_firewall_id", internet_firewall_id)
        if last_hit_time and not isinstance(last_hit_time, int):
            raise TypeError("Expected argument 'last_hit_time' to be a int")
        pulumi.set(__self__, "last_hit_time", last_hit_time)
        if rule_id and not isinstance(rule_id, str):
            raise TypeError("Expected argument 'rule_id' to be a str")
        pulumi.set(__self__, "rule_id", rule_id)
        if sources and not isinstance(sources, list):
            raise TypeError("Expected argument 'sources' to be a list")
        pulumi.set(__self__, "sources", sources)
        if status and not isinstance(status, bool):
            raise TypeError("Expected argument 'status' to be a bool")
        pulumi.set(__self__, "status", status)
        if use_count and not isinstance(use_count, int):
            raise TypeError("Expected argument 'use_count' to be a int")
        pulumi.set(__self__, "use_count", use_count)

    @property
    @pulumi.getter(name="accountId")
    def account_id(self) -> builtins.str:
        """
        用户的唯一标识ID。
        """
        return pulumi.get(self, "account_id")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        策略的描述信息。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def destination(self) -> builtins.str:
        """
        访问目的，可以是域名或域名地址簿的唯一标识ID。当前仅支持一个地址簿。
        """
        return pulumi.get(self, "destination")

    @property
    @pulumi.getter(name="destinationGroupLists")
    def destination_group_lists(self) -> Sequence[builtins.str]:
        """
        域名地址簿名称列表。
        """
        return pulumi.get(self, "destination_group_lists")

    @property
    @pulumi.getter(name="destinationType")
    def destination_type(self) -> builtins.str:
        """
        访问目的的类型。domain：域名；group：域名地址簿。
        """
        return pulumi.get(self, "destination_type")

    @property
    @pulumi.getter(name="domainListV1s")
    def domain_list_v1s(self) -> Sequence['outputs.GetDnsControlPolicyDomainListV1Result']:
        """
        域名地址簿的域名列表。
        """
        return pulumi.get(self, "domain_list_v1s")

    @property
    @pulumi.getter(name="domainLists")
    def domain_lists(self) -> Sequence[builtins.str]:
        """
        域名列表。
        """
        return pulumi.get(self, "domain_lists")

    @property
    @pulumi.getter(name="hitCnt")
    def hit_cnt(self) -> builtins.int:
        """
        命中计数，表示该域名黑名单访问控制策略被触发的次数。
        """
        return pulumi.get(self, "hit_cnt")

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

    @property
    @pulumi.getter(name="internetFirewallId")
    def internet_firewall_id(self) -> builtins.str:
        """
        互联网边界防火墙实例ID。
        """
        return pulumi.get(self, "internet_firewall_id")

    @property
    @pulumi.getter(name="lastHitTime")
    def last_hit_time(self) -> builtins.int:
        """
        最近命中时间戳，表示该域名黑名单访问控制策略最后一次被触发的时间。
        """
        return pulumi.get(self, "last_hit_time")

    @property
    @pulumi.getter(name="ruleId")
    def rule_id(self) -> builtins.str:
        """
        访问控制策略的唯一标识ID。
        """
        return pulumi.get(self, "rule_id")

    @property
    @pulumi.getter
    def sources(self) -> Sequence['outputs.GetDnsControlPolicySourceResult']:
        """
        访问源信息，包含VPC列表。
        """
        return pulumi.get(self, "sources")

    @property
    @pulumi.getter
    def status(self) -> builtins.bool:
        """
        域名黑名单访问控制策略的开关状态。false：关闭；true：开启。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter(name="useCount")
    def use_count(self) -> builtins.int:
        """
        该域名黑名单访问控制策略占用的策略数量。
        """
        return pulumi.get(self, "use_count")


class AwaitableGetDnsControlPolicyResult(GetDnsControlPolicyResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetDnsControlPolicyResult(
            account_id=self.account_id,
            description=self.description,
            destination=self.destination,
            destination_group_lists=self.destination_group_lists,
            destination_type=self.destination_type,
            domain_list_v1s=self.domain_list_v1s,
            domain_lists=self.domain_lists,
            hit_cnt=self.hit_cnt,
            id=self.id,
            internet_firewall_id=self.internet_firewall_id,
            last_hit_time=self.last_hit_time,
            rule_id=self.rule_id,
            sources=self.sources,
            status=self.status,
            use_count=self.use_count)


def get_dns_control_policy(id: Optional[builtins.str] = None,
                           opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDnsControlPolicyResult:
    """
    Data Source schema for Byteplus::FireWallCenter::DnsControlPolicy


    :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:firewallcenter/getDnsControlPolicy:getDnsControlPolicy', __args__, opts=opts, typ=GetDnsControlPolicyResult).value

    return AwaitableGetDnsControlPolicyResult(
        account_id=pulumi.get(__ret__, 'account_id'),
        description=pulumi.get(__ret__, 'description'),
        destination=pulumi.get(__ret__, 'destination'),
        destination_group_lists=pulumi.get(__ret__, 'destination_group_lists'),
        destination_type=pulumi.get(__ret__, 'destination_type'),
        domain_list_v1s=pulumi.get(__ret__, 'domain_list_v1s'),
        domain_lists=pulumi.get(__ret__, 'domain_lists'),
        hit_cnt=pulumi.get(__ret__, 'hit_cnt'),
        id=pulumi.get(__ret__, 'id'),
        internet_firewall_id=pulumi.get(__ret__, 'internet_firewall_id'),
        last_hit_time=pulumi.get(__ret__, 'last_hit_time'),
        rule_id=pulumi.get(__ret__, 'rule_id'),
        sources=pulumi.get(__ret__, 'sources'),
        status=pulumi.get(__ret__, 'status'),
        use_count=pulumi.get(__ret__, 'use_count'))
def get_dns_control_policy_output(id: Optional[pulumi.Input[builtins.str]] = None,
                                  opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetDnsControlPolicyResult]:
    """
    Data Source schema for Byteplus::FireWallCenter::DnsControlPolicy


    :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:firewallcenter/getDnsControlPolicy:getDnsControlPolicy', __args__, opts=opts, typ=GetDnsControlPolicyResult)
    return __ret__.apply(lambda __response__: GetDnsControlPolicyResult(
        account_id=pulumi.get(__response__, 'account_id'),
        description=pulumi.get(__response__, 'description'),
        destination=pulumi.get(__response__, 'destination'),
        destination_group_lists=pulumi.get(__response__, 'destination_group_lists'),
        destination_type=pulumi.get(__response__, 'destination_type'),
        domain_list_v1s=pulumi.get(__response__, 'domain_list_v1s'),
        domain_lists=pulumi.get(__response__, 'domain_lists'),
        hit_cnt=pulumi.get(__response__, 'hit_cnt'),
        id=pulumi.get(__response__, 'id'),
        internet_firewall_id=pulumi.get(__response__, 'internet_firewall_id'),
        last_hit_time=pulumi.get(__response__, 'last_hit_time'),
        rule_id=pulumi.get(__response__, 'rule_id'),
        sources=pulumi.get(__response__, 'sources'),
        status=pulumi.get(__response__, 'status'),
        use_count=pulumi.get(__response__, 'use_count')))
