# 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

__all__ = [
    'GetDnatentryResult',
    'AwaitableGetDnatentryResult',
    'get_dnatentry',
    'get_dnatentry_output',
]

@pulumi.output_type
class GetDnatentryResult:
    """
    A collection of values returned by getDnatentry.
    """
    def __init__(__self__, dnat_entry_id=None, dnat_entry_name=None, external_ip=None, external_port=None, id=None, internal_ip=None, internal_port=None, nat_gateway_id=None, port_type=None, protocol=None, status=None):
        if dnat_entry_id and not isinstance(dnat_entry_id, str):
            raise TypeError("Expected argument 'dnat_entry_id' to be a str")
        pulumi.set(__self__, "dnat_entry_id", dnat_entry_id)
        if dnat_entry_name and not isinstance(dnat_entry_name, str):
            raise TypeError("Expected argument 'dnat_entry_name' to be a str")
        pulumi.set(__self__, "dnat_entry_name", dnat_entry_name)
        if external_ip and not isinstance(external_ip, str):
            raise TypeError("Expected argument 'external_ip' to be a str")
        pulumi.set(__self__, "external_ip", external_ip)
        if external_port and not isinstance(external_port, str):
            raise TypeError("Expected argument 'external_port' to be a str")
        pulumi.set(__self__, "external_port", external_port)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if internal_ip and not isinstance(internal_ip, str):
            raise TypeError("Expected argument 'internal_ip' to be a str")
        pulumi.set(__self__, "internal_ip", internal_ip)
        if internal_port and not isinstance(internal_port, str):
            raise TypeError("Expected argument 'internal_port' to be a str")
        pulumi.set(__self__, "internal_port", internal_port)
        if nat_gateway_id and not isinstance(nat_gateway_id, str):
            raise TypeError("Expected argument 'nat_gateway_id' to be a str")
        pulumi.set(__self__, "nat_gateway_id", nat_gateway_id)
        if port_type and not isinstance(port_type, str):
            raise TypeError("Expected argument 'port_type' to be a str")
        pulumi.set(__self__, "port_type", port_type)
        if protocol and not isinstance(protocol, str):
            raise TypeError("Expected argument 'protocol' to be a str")
        pulumi.set(__self__, "protocol", protocol)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)

    @property
    @pulumi.getter(name="dnatEntryId")
    def dnat_entry_id(self) -> builtins.str:
        """
        DNAT规则的ID。
        """
        return pulumi.get(self, "dnat_entry_id")

    @property
    @pulumi.getter(name="dnatEntryName")
    def dnat_entry_name(self) -> builtins.str:
        """
        DNAT规则的名称。
        """
        return pulumi.get(self, "dnat_entry_name")

    @property
    @pulumi.getter(name="externalIp")
    def external_ip(self) -> builtins.str:
        """
        NAT网关用于网络地址转换的IP地址。当NAT网关为公网NAT网关时，传入其绑定的公网IP地址。当NAT网关为私网NAT网关时，传入其中转IP地址。
        """
        return pulumi.get(self, "external_ip")

    @property
    @pulumi.getter(name="externalPort")
    def external_port(self) -> builtins.str:
        """
        接收来自公网外部请求的端口或端口段。
        """
        return pulumi.get(self, "external_port")

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

    @property
    @pulumi.getter(name="internalIp")
    def internal_ip(self) -> builtins.str:
        """
        云服务器实例的私网IP。
        """
        return pulumi.get(self, "internal_ip")

    @property
    @pulumi.getter(name="internalPort")
    def internal_port(self) -> builtins.str:
        """
        云服务器实例私网IP的端口或端口段。
        """
        return pulumi.get(self, "internal_port")

    @property
    @pulumi.getter(name="natGatewayId")
    def nat_gateway_id(self) -> builtins.str:
        """
        DNAT规则所属NAT网关的ID。
        """
        return pulumi.get(self, "nat_gateway_id")

    @property
    @pulumi.getter(name="portType")
    def port_type(self) -> builtins.str:
        """
        DNAT规则的端口类型。specified：指定端口。any：任意端口。即IP映射。
        """
        return pulumi.get(self, "port_type")

    @property
    @pulumi.getter
    def protocol(self) -> builtins.str:
        """
        协议类型。tcp：转发TCP协议的报文。udp：转发UDP协议的报文。
        """
        return pulumi.get(self, "protocol")

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        DNAT规则的状态。Creating：创建中。Deleting：删除中。Available：可用。
        """
        return pulumi.get(self, "status")


class AwaitableGetDnatentryResult(GetDnatentryResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetDnatentryResult(
            dnat_entry_id=self.dnat_entry_id,
            dnat_entry_name=self.dnat_entry_name,
            external_ip=self.external_ip,
            external_port=self.external_port,
            id=self.id,
            internal_ip=self.internal_ip,
            internal_port=self.internal_port,
            nat_gateway_id=self.nat_gateway_id,
            port_type=self.port_type,
            protocol=self.protocol,
            status=self.status)


def get_dnatentry(id: Optional[builtins.str] = None,
                  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDnatentryResult:
    """
    Data Source schema for Byteplus::NatGateway::Dnatentry


    :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:natgateway/getDnatentry:getDnatentry', __args__, opts=opts, typ=GetDnatentryResult).value

    return AwaitableGetDnatentryResult(
        dnat_entry_id=pulumi.get(__ret__, 'dnat_entry_id'),
        dnat_entry_name=pulumi.get(__ret__, 'dnat_entry_name'),
        external_ip=pulumi.get(__ret__, 'external_ip'),
        external_port=pulumi.get(__ret__, 'external_port'),
        id=pulumi.get(__ret__, 'id'),
        internal_ip=pulumi.get(__ret__, 'internal_ip'),
        internal_port=pulumi.get(__ret__, 'internal_port'),
        nat_gateway_id=pulumi.get(__ret__, 'nat_gateway_id'),
        port_type=pulumi.get(__ret__, 'port_type'),
        protocol=pulumi.get(__ret__, 'protocol'),
        status=pulumi.get(__ret__, 'status'))
def get_dnatentry_output(id: Optional[pulumi.Input[builtins.str]] = None,
                         opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetDnatentryResult]:
    """
    Data Source schema for Byteplus::NatGateway::Dnatentry


    :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:natgateway/getDnatentry:getDnatentry', __args__, opts=opts, typ=GetDnatentryResult)
    return __ret__.apply(lambda __response__: GetDnatentryResult(
        dnat_entry_id=pulumi.get(__response__, 'dnat_entry_id'),
        dnat_entry_name=pulumi.get(__response__, 'dnat_entry_name'),
        external_ip=pulumi.get(__response__, 'external_ip'),
        external_port=pulumi.get(__response__, 'external_port'),
        id=pulumi.get(__response__, 'id'),
        internal_ip=pulumi.get(__response__, 'internal_ip'),
        internal_port=pulumi.get(__response__, 'internal_port'),
        nat_gateway_id=pulumi.get(__response__, 'nat_gateway_id'),
        port_type=pulumi.get(__response__, 'port_type'),
        protocol=pulumi.get(__response__, 'protocol'),
        status=pulumi.get(__response__, 'status')))
