# 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__ = ['ResolverRuleArgs', 'ResolverRule']

@pulumi.input_type
class ResolverRuleArgs:
    def __init__(__self__, *,
                 name: pulumi.Input[builtins.str],
                 type: pulumi.Input[builtins.str],
                 endpoint_id: Optional[pulumi.Input[builtins.int]] = None,
                 forward_ips: Optional[pulumi.Input[Sequence[pulumi.Input['ResolverRuleForwardIPArgs']]]] = None,
                 line: Optional[pulumi.Input[builtins.str]] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input['ResolverRuleTagArgs']]]] = None,
                 vp_cs: Optional[pulumi.Input[Sequence[pulumi.Input['ResolverRuleVpCArgs']]]] = None,
                 zone_name: Optional[pulumi.Input[builtins.str]] = None):
        """
        The set of arguments for constructing a ResolverRule resource.
        :param pulumi.Input[builtins.str] name: 转发规则的名称。支持 UTF-8 格式。
        :param pulumi.Input[builtins.str] type: 转发规则类型。OUTBOUND：转发到外部的 DNS 服务器。LINE：自定义公网递归 DNS 服务器的出口 IP 地址的运营商。
        :param pulumi.Input[builtins.int] endpoint_id: 终端节点的 ID。该参数仅在 Type 参数是 OUTBOUND 时有效且为必选参数。
        :param pulumi.Input[builtins.str] line: 递归 DNS 服务器的出口 IP 地址的运营商。该参数仅在 Type 参数是 LINE 时有效。支持的取值：移动：中国移动，电信：中国电信，联通：中国联通
        :param pulumi.Input[builtins.str] project_name: 转发规则所属的项目名称。默认为 default。
        :param pulumi.Input[builtins.str] zone_name: 转发规则转发规则所关联的域名。您可以输入一个或多个域名。多个域名之间使用英文逗号, 分隔。最多支持输入 500 个域名。该参数仅在 Type 参数是 OUTBOUND 时有效且为必选参数。如果您把该参数设置为 *，则转发规则适用于 VPC 关联的所有域名。
        """
        pulumi.set(__self__, "name", name)
        pulumi.set(__self__, "type", type)
        if endpoint_id is not None:
            pulumi.set(__self__, "endpoint_id", endpoint_id)
        if forward_ips is not None:
            pulumi.set(__self__, "forward_ips", forward_ips)
        if line is not None:
            pulumi.set(__self__, "line", line)
        if project_name is not None:
            pulumi.set(__self__, "project_name", project_name)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if vp_cs is not None:
            pulumi.set(__self__, "vp_cs", vp_cs)
        if zone_name is not None:
            pulumi.set(__self__, "zone_name", zone_name)

    @property
    @pulumi.getter
    def name(self) -> pulumi.Input[builtins.str]:
        """
        转发规则的名称。支持 UTF-8 格式。
        """
        return pulumi.get(self, "name")

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

    @property
    @pulumi.getter
    def type(self) -> pulumi.Input[builtins.str]:
        """
        转发规则类型。OUTBOUND：转发到外部的 DNS 服务器。LINE：自定义公网递归 DNS 服务器的出口 IP 地址的运营商。
        """
        return pulumi.get(self, "type")

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

    @property
    @pulumi.getter(name="endpointId")
    def endpoint_id(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        终端节点的 ID。该参数仅在 Type 参数是 OUTBOUND 时有效且为必选参数。
        """
        return pulumi.get(self, "endpoint_id")

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

    @property
    @pulumi.getter(name="forwardIPs")
    def forward_ips(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ResolverRuleForwardIPArgs']]]]:
        return pulumi.get(self, "forward_ips")

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

    @property
    @pulumi.getter
    def line(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        递归 DNS 服务器的出口 IP 地址的运营商。该参数仅在 Type 参数是 LINE 时有效。支持的取值：移动：中国移动，电信：中国电信，联通：中国联通
        """
        return pulumi.get(self, "line")

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

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        转发规则所属的项目名称。默认为 default。
        """
        return pulumi.get(self, "project_name")

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

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

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

    @property
    @pulumi.getter(name="vpCs")
    def vp_cs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ResolverRuleVpCArgs']]]]:
        return pulumi.get(self, "vp_cs")

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

    @property
    @pulumi.getter(name="zoneName")
    def zone_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        转发规则转发规则所关联的域名。您可以输入一个或多个域名。多个域名之间使用英文逗号, 分隔。最多支持输入 500 个域名。该参数仅在 Type 参数是 OUTBOUND 时有效且为必选参数。如果您把该参数设置为 *，则转发规则适用于 VPC 关联的所有域名。
        """
        return pulumi.get(self, "zone_name")

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


@pulumi.input_type
class _ResolverRuleState:
    def __init__(__self__, *,
                 created_time: Optional[pulumi.Input[builtins.str]] = None,
                 enable: Optional[pulumi.Input[builtins.bool]] = None,
                 endpoint_id: Optional[pulumi.Input[builtins.int]] = None,
                 forward_ips: Optional[pulumi.Input[Sequence[pulumi.Input['ResolverRuleForwardIPArgs']]]] = None,
                 last_operator: Optional[pulumi.Input[builtins.str]] = None,
                 line: Optional[pulumi.Input[builtins.str]] = None,
                 name: Optional[pulumi.Input[builtins.str]] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 rule_id: Optional[pulumi.Input[builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input['ResolverRuleTagArgs']]]] = None,
                 type: Optional[pulumi.Input[builtins.str]] = None,
                 updated_time: Optional[pulumi.Input[builtins.str]] = None,
                 vp_cs: Optional[pulumi.Input[Sequence[pulumi.Input['ResolverRuleVpCArgs']]]] = None,
                 zone_name: Optional[pulumi.Input[builtins.str]] = None):
        """
        Input properties used for looking up and filtering ResolverRule resources.
        :param pulumi.Input[builtins.str] created_time: 转发规则的创建时间
        :param pulumi.Input[builtins.bool] enable: 转发规则是否被启用。true：启用。false：禁用。
        :param pulumi.Input[builtins.int] endpoint_id: 终端节点的 ID。该参数仅在 Type 参数是 OUTBOUND 时有效且为必选参数。
        :param pulumi.Input[builtins.str] last_operator: 最近一次更新转发规则的账号的 ID
        :param pulumi.Input[builtins.str] line: 递归 DNS 服务器的出口 IP 地址的运营商。该参数仅在 Type 参数是 LINE 时有效。支持的取值：移动：中国移动，电信：中国电信，联通：中国联通
        :param pulumi.Input[builtins.str] name: 转发规则的名称。支持 UTF-8 格式。
        :param pulumi.Input[builtins.str] project_name: 转发规则所属的项目名称。默认为 default。
        :param pulumi.Input[builtins.str] rule_id: 转发规则的 ID。
        :param pulumi.Input[builtins.str] type: 转发规则类型。OUTBOUND：转发到外部的 DNS 服务器。LINE：自定义公网递归 DNS 服务器的出口 IP 地址的运营商。
        :param pulumi.Input[builtins.str] updated_time: 转发规则的更新时间
        :param pulumi.Input[builtins.str] zone_name: 转发规则转发规则所关联的域名。您可以输入一个或多个域名。多个域名之间使用英文逗号, 分隔。最多支持输入 500 个域名。该参数仅在 Type 参数是 OUTBOUND 时有效且为必选参数。如果您把该参数设置为 *，则转发规则适用于 VPC 关联的所有域名。
        """
        if created_time is not None:
            pulumi.set(__self__, "created_time", created_time)
        if enable is not None:
            pulumi.set(__self__, "enable", enable)
        if endpoint_id is not None:
            pulumi.set(__self__, "endpoint_id", endpoint_id)
        if forward_ips is not None:
            pulumi.set(__self__, "forward_ips", forward_ips)
        if last_operator is not None:
            pulumi.set(__self__, "last_operator", last_operator)
        if line is not None:
            pulumi.set(__self__, "line", line)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if project_name is not None:
            pulumi.set(__self__, "project_name", project_name)
        if rule_id is not None:
            pulumi.set(__self__, "rule_id", rule_id)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if type is not None:
            pulumi.set(__self__, "type", type)
        if updated_time is not None:
            pulumi.set(__self__, "updated_time", updated_time)
        if vp_cs is not None:
            pulumi.set(__self__, "vp_cs", vp_cs)
        if zone_name is not None:
            pulumi.set(__self__, "zone_name", zone_name)

    @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 enable(self) -> Optional[pulumi.Input[builtins.bool]]:
        """
        转发规则是否被启用。true：启用。false：禁用。
        """
        return pulumi.get(self, "enable")

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

    @property
    @pulumi.getter(name="endpointId")
    def endpoint_id(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        终端节点的 ID。该参数仅在 Type 参数是 OUTBOUND 时有效且为必选参数。
        """
        return pulumi.get(self, "endpoint_id")

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

    @property
    @pulumi.getter(name="forwardIPs")
    def forward_ips(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ResolverRuleForwardIPArgs']]]]:
        return pulumi.get(self, "forward_ips")

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

    @property
    @pulumi.getter(name="lastOperator")
    def last_operator(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        最近一次更新转发规则的账号的 ID
        """
        return pulumi.get(self, "last_operator")

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

    @property
    @pulumi.getter
    def line(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        递归 DNS 服务器的出口 IP 地址的运营商。该参数仅在 Type 参数是 LINE 时有效。支持的取值：移动：中国移动，电信：中国电信，联通：中国联通
        """
        return pulumi.get(self, "line")

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

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        转发规则的名称。支持 UTF-8 格式。
        """
        return pulumi.get(self, "name")

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

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        转发规则所属的项目名称。默认为 default。
        """
        return pulumi.get(self, "project_name")

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

    @property
    @pulumi.getter(name="ruleId")
    def rule_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        转发规则的 ID。
        """
        return pulumi.get(self, "rule_id")

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

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

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

    @property
    @pulumi.getter
    def type(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        转发规则类型。OUTBOUND：转发到外部的 DNS 服务器。LINE：自定义公网递归 DNS 服务器的出口 IP 地址的运营商。
        """
        return pulumi.get(self, "type")

    @type.setter
    def type(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "type", 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)

    @property
    @pulumi.getter(name="vpCs")
    def vp_cs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ResolverRuleVpCArgs']]]]:
        return pulumi.get(self, "vp_cs")

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

    @property
    @pulumi.getter(name="zoneName")
    def zone_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        转发规则转发规则所关联的域名。您可以输入一个或多个域名。多个域名之间使用英文逗号, 分隔。最多支持输入 500 个域名。该参数仅在 Type 参数是 OUTBOUND 时有效且为必选参数。如果您把该参数设置为 *，则转发规则适用于 VPC 关联的所有域名。
        """
        return pulumi.get(self, "zone_name")

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


@pulumi.type_token("bytepluscc:privatezone/resolverRule:ResolverRule")
class ResolverRule(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 endpoint_id: Optional[pulumi.Input[builtins.int]] = None,
                 forward_ips: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ResolverRuleForwardIPArgs', 'ResolverRuleForwardIPArgsDict']]]]] = None,
                 line: Optional[pulumi.Input[builtins.str]] = None,
                 name: Optional[pulumi.Input[builtins.str]] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ResolverRuleTagArgs', 'ResolverRuleTagArgsDict']]]]] = None,
                 type: Optional[pulumi.Input[builtins.str]] = None,
                 vp_cs: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ResolverRuleVpCArgs', 'ResolverRuleVpCArgsDict']]]]] = None,
                 zone_name: Optional[pulumi.Input[builtins.str]] = None,
                 __props__=None):
        """
        转发规则详细信息

        ## Import

        ```sh
        $ pulumi import bytepluscc:privatezone/resolverRule:ResolverRule example "rule_id"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.int] endpoint_id: 终端节点的 ID。该参数仅在 Type 参数是 OUTBOUND 时有效且为必选参数。
        :param pulumi.Input[builtins.str] line: 递归 DNS 服务器的出口 IP 地址的运营商。该参数仅在 Type 参数是 LINE 时有效。支持的取值：移动：中国移动，电信：中国电信，联通：中国联通
        :param pulumi.Input[builtins.str] name: 转发规则的名称。支持 UTF-8 格式。
        :param pulumi.Input[builtins.str] project_name: 转发规则所属的项目名称。默认为 default。
        :param pulumi.Input[builtins.str] type: 转发规则类型。OUTBOUND：转发到外部的 DNS 服务器。LINE：自定义公网递归 DNS 服务器的出口 IP 地址的运营商。
        :param pulumi.Input[builtins.str] zone_name: 转发规则转发规则所关联的域名。您可以输入一个或多个域名。多个域名之间使用英文逗号, 分隔。最多支持输入 500 个域名。该参数仅在 Type 参数是 OUTBOUND 时有效且为必选参数。如果您把该参数设置为 *，则转发规则适用于 VPC 关联的所有域名。
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: ResolverRuleArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        转发规则详细信息

        ## Import

        ```sh
        $ pulumi import bytepluscc:privatezone/resolverRule:ResolverRule example "rule_id"
        ```

        :param str resource_name: The name of the resource.
        :param ResolverRuleArgs 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(ResolverRuleArgs, 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,
                 endpoint_id: Optional[pulumi.Input[builtins.int]] = None,
                 forward_ips: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ResolverRuleForwardIPArgs', 'ResolverRuleForwardIPArgsDict']]]]] = None,
                 line: Optional[pulumi.Input[builtins.str]] = None,
                 name: Optional[pulumi.Input[builtins.str]] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ResolverRuleTagArgs', 'ResolverRuleTagArgsDict']]]]] = None,
                 type: Optional[pulumi.Input[builtins.str]] = None,
                 vp_cs: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ResolverRuleVpCArgs', 'ResolverRuleVpCArgsDict']]]]] = None,
                 zone_name: Optional[pulumi.Input[builtins.str]] = 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__ = ResolverRuleArgs.__new__(ResolverRuleArgs)

            __props__.__dict__["endpoint_id"] = endpoint_id
            __props__.__dict__["forward_ips"] = forward_ips
            __props__.__dict__["line"] = line
            if name is None and not opts.urn:
                raise TypeError("Missing required property 'name'")
            __props__.__dict__["name"] = name
            __props__.__dict__["project_name"] = project_name
            __props__.__dict__["tags"] = tags
            if type is None and not opts.urn:
                raise TypeError("Missing required property 'type'")
            __props__.__dict__["type"] = type
            __props__.__dict__["vp_cs"] = vp_cs
            __props__.__dict__["zone_name"] = zone_name
            __props__.__dict__["created_time"] = None
            __props__.__dict__["enable"] = None
            __props__.__dict__["last_operator"] = None
            __props__.__dict__["rule_id"] = None
            __props__.__dict__["updated_time"] = None
        super(ResolverRule, __self__).__init__(
            'bytepluscc:privatezone/resolverRule:ResolverRule',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            created_time: Optional[pulumi.Input[builtins.str]] = None,
            enable: Optional[pulumi.Input[builtins.bool]] = None,
            endpoint_id: Optional[pulumi.Input[builtins.int]] = None,
            forward_ips: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ResolverRuleForwardIPArgs', 'ResolverRuleForwardIPArgsDict']]]]] = None,
            last_operator: Optional[pulumi.Input[builtins.str]] = None,
            line: Optional[pulumi.Input[builtins.str]] = None,
            name: Optional[pulumi.Input[builtins.str]] = None,
            project_name: Optional[pulumi.Input[builtins.str]] = None,
            rule_id: Optional[pulumi.Input[builtins.str]] = None,
            tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ResolverRuleTagArgs', 'ResolverRuleTagArgsDict']]]]] = None,
            type: Optional[pulumi.Input[builtins.str]] = None,
            updated_time: Optional[pulumi.Input[builtins.str]] = None,
            vp_cs: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ResolverRuleVpCArgs', 'ResolverRuleVpCArgsDict']]]]] = None,
            zone_name: Optional[pulumi.Input[builtins.str]] = None) -> 'ResolverRule':
        """
        Get an existing ResolverRule 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] created_time: 转发规则的创建时间
        :param pulumi.Input[builtins.bool] enable: 转发规则是否被启用。true：启用。false：禁用。
        :param pulumi.Input[builtins.int] endpoint_id: 终端节点的 ID。该参数仅在 Type 参数是 OUTBOUND 时有效且为必选参数。
        :param pulumi.Input[builtins.str] last_operator: 最近一次更新转发规则的账号的 ID
        :param pulumi.Input[builtins.str] line: 递归 DNS 服务器的出口 IP 地址的运营商。该参数仅在 Type 参数是 LINE 时有效。支持的取值：移动：中国移动，电信：中国电信，联通：中国联通
        :param pulumi.Input[builtins.str] name: 转发规则的名称。支持 UTF-8 格式。
        :param pulumi.Input[builtins.str] project_name: 转发规则所属的项目名称。默认为 default。
        :param pulumi.Input[builtins.str] rule_id: 转发规则的 ID。
        :param pulumi.Input[builtins.str] type: 转发规则类型。OUTBOUND：转发到外部的 DNS 服务器。LINE：自定义公网递归 DNS 服务器的出口 IP 地址的运营商。
        :param pulumi.Input[builtins.str] updated_time: 转发规则的更新时间
        :param pulumi.Input[builtins.str] zone_name: 转发规则转发规则所关联的域名。您可以输入一个或多个域名。多个域名之间使用英文逗号, 分隔。最多支持输入 500 个域名。该参数仅在 Type 参数是 OUTBOUND 时有效且为必选参数。如果您把该参数设置为 *，则转发规则适用于 VPC 关联的所有域名。
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _ResolverRuleState.__new__(_ResolverRuleState)

        __props__.__dict__["created_time"] = created_time
        __props__.__dict__["enable"] = enable
        __props__.__dict__["endpoint_id"] = endpoint_id
        __props__.__dict__["forward_ips"] = forward_ips
        __props__.__dict__["last_operator"] = last_operator
        __props__.__dict__["line"] = line
        __props__.__dict__["name"] = name
        __props__.__dict__["project_name"] = project_name
        __props__.__dict__["rule_id"] = rule_id
        __props__.__dict__["tags"] = tags
        __props__.__dict__["type"] = type
        __props__.__dict__["updated_time"] = updated_time
        __props__.__dict__["vp_cs"] = vp_cs
        __props__.__dict__["zone_name"] = zone_name
        return ResolverRule(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> pulumi.Output[builtins.str]:
        """
        转发规则的创建时间
        """
        return pulumi.get(self, "created_time")

    @property
    @pulumi.getter
    def enable(self) -> pulumi.Output[builtins.bool]:
        """
        转发规则是否被启用。true：启用。false：禁用。
        """
        return pulumi.get(self, "enable")

    @property
    @pulumi.getter(name="endpointId")
    def endpoint_id(self) -> pulumi.Output[builtins.int]:
        """
        终端节点的 ID。该参数仅在 Type 参数是 OUTBOUND 时有效且为必选参数。
        """
        return pulumi.get(self, "endpoint_id")

    @property
    @pulumi.getter(name="forwardIPs")
    def forward_ips(self) -> pulumi.Output[Sequence['outputs.ResolverRuleForwardIP']]:
        return pulumi.get(self, "forward_ips")

    @property
    @pulumi.getter(name="lastOperator")
    def last_operator(self) -> pulumi.Output[builtins.str]:
        """
        最近一次更新转发规则的账号的 ID
        """
        return pulumi.get(self, "last_operator")

    @property
    @pulumi.getter
    def line(self) -> pulumi.Output[builtins.str]:
        """
        递归 DNS 服务器的出口 IP 地址的运营商。该参数仅在 Type 参数是 LINE 时有效。支持的取值：移动：中国移动，电信：中国电信，联通：中国联通
        """
        return pulumi.get(self, "line")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[builtins.str]:
        """
        转发规则的名称。支持 UTF-8 格式。
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> pulumi.Output[builtins.str]:
        """
        转发规则所属的项目名称。默认为 default。
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter(name="ruleId")
    def rule_id(self) -> pulumi.Output[builtins.str]:
        """
        转发规则的 ID。
        """
        return pulumi.get(self, "rule_id")

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

    @property
    @pulumi.getter
    def type(self) -> pulumi.Output[builtins.str]:
        """
        转发规则类型。OUTBOUND：转发到外部的 DNS 服务器。LINE：自定义公网递归 DNS 服务器的出口 IP 地址的运营商。
        """
        return pulumi.get(self, "type")

    @property
    @pulumi.getter(name="updatedTime")
    def updated_time(self) -> pulumi.Output[builtins.str]:
        """
        转发规则的更新时间
        """
        return pulumi.get(self, "updated_time")

    @property
    @pulumi.getter(name="vpCs")
    def vp_cs(self) -> pulumi.Output[Sequence['outputs.ResolverRuleVpC']]:
        return pulumi.get(self, "vp_cs")

    @property
    @pulumi.getter(name="zoneName")
    def zone_name(self) -> pulumi.Output[builtins.str]:
        """
        转发规则转发规则所关联的域名。您可以输入一个或多个域名。多个域名之间使用英文逗号, 分隔。最多支持输入 500 个域名。该参数仅在 Type 参数是 OUTBOUND 时有效且为必选参数。如果您把该参数设置为 *，则转发规则适用于 VPC 关联的所有域名。
        """
        return pulumi.get(self, "zone_name")

