# 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__ = [
    'GetVpnGatewayResult',
    'AwaitableGetVpnGatewayResult',
    'get_vpn_gateway',
    'get_vpn_gateway_output',
]

@pulumi.output_type
class GetVpnGatewayResult:
    """
    A collection of values returned by getVpnGateway.
    """
    def __init__(__self__, asn=None, bandwidth=None, billing_type=None, business_status=None, connection_count=None, create_time=None, deleted_time=None, description=None, dual_tunnel_enabled=None, expired_time=None, id=None, ip_address=None, ip_stack_type=None, ip_version=None, ipsec_enabled=None, is_blocked=None, lock_reason=None, overdue_time=None, period=None, period_unit=None, project_name=None, route_count=None, secondary_ip_address=None, secondary_subnet_id=None, ssl_enabled=None, ssl_max_connections=None, status=None, subnet_id=None, tags=None, update_time=None, vpc_id=None, vpn_gateway_id=None, vpn_gateway_name=None):
        if asn and not isinstance(asn, int):
            raise TypeError("Expected argument 'asn' to be a int")
        pulumi.set(__self__, "asn", asn)
        if bandwidth and not isinstance(bandwidth, int):
            raise TypeError("Expected argument 'bandwidth' to be a int")
        pulumi.set(__self__, "bandwidth", bandwidth)
        if billing_type and not isinstance(billing_type, int):
            raise TypeError("Expected argument 'billing_type' to be a int")
        pulumi.set(__self__, "billing_type", billing_type)
        if business_status and not isinstance(business_status, str):
            raise TypeError("Expected argument 'business_status' to be a str")
        pulumi.set(__self__, "business_status", business_status)
        if connection_count and not isinstance(connection_count, int):
            raise TypeError("Expected argument 'connection_count' to be a int")
        pulumi.set(__self__, "connection_count", connection_count)
        if create_time and not isinstance(create_time, str):
            raise TypeError("Expected argument 'create_time' to be a str")
        pulumi.set(__self__, "create_time", create_time)
        if deleted_time and not isinstance(deleted_time, str):
            raise TypeError("Expected argument 'deleted_time' to be a str")
        pulumi.set(__self__, "deleted_time", deleted_time)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if dual_tunnel_enabled and not isinstance(dual_tunnel_enabled, bool):
            raise TypeError("Expected argument 'dual_tunnel_enabled' to be a bool")
        pulumi.set(__self__, "dual_tunnel_enabled", dual_tunnel_enabled)
        if expired_time and not isinstance(expired_time, str):
            raise TypeError("Expected argument 'expired_time' to be a str")
        pulumi.set(__self__, "expired_time", expired_time)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if ip_address and not isinstance(ip_address, str):
            raise TypeError("Expected argument 'ip_address' to be a str")
        pulumi.set(__self__, "ip_address", ip_address)
        if ip_stack_type and not isinstance(ip_stack_type, str):
            raise TypeError("Expected argument 'ip_stack_type' to be a str")
        pulumi.set(__self__, "ip_stack_type", ip_stack_type)
        if ip_version and not isinstance(ip_version, str):
            raise TypeError("Expected argument 'ip_version' to be a str")
        pulumi.set(__self__, "ip_version", ip_version)
        if ipsec_enabled and not isinstance(ipsec_enabled, bool):
            raise TypeError("Expected argument 'ipsec_enabled' to be a bool")
        pulumi.set(__self__, "ipsec_enabled", ipsec_enabled)
        if is_blocked and not isinstance(is_blocked, bool):
            raise TypeError("Expected argument 'is_blocked' to be a bool")
        pulumi.set(__self__, "is_blocked", is_blocked)
        if lock_reason and not isinstance(lock_reason, str):
            raise TypeError("Expected argument 'lock_reason' to be a str")
        pulumi.set(__self__, "lock_reason", lock_reason)
        if overdue_time and not isinstance(overdue_time, str):
            raise TypeError("Expected argument 'overdue_time' to be a str")
        pulumi.set(__self__, "overdue_time", overdue_time)
        if period and not isinstance(period, int):
            raise TypeError("Expected argument 'period' to be a int")
        pulumi.set(__self__, "period", period)
        if period_unit and not isinstance(period_unit, str):
            raise TypeError("Expected argument 'period_unit' to be a str")
        pulumi.set(__self__, "period_unit", period_unit)
        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)
        if route_count and not isinstance(route_count, int):
            raise TypeError("Expected argument 'route_count' to be a int")
        pulumi.set(__self__, "route_count", route_count)
        if secondary_ip_address and not isinstance(secondary_ip_address, str):
            raise TypeError("Expected argument 'secondary_ip_address' to be a str")
        pulumi.set(__self__, "secondary_ip_address", secondary_ip_address)
        if secondary_subnet_id and not isinstance(secondary_subnet_id, str):
            raise TypeError("Expected argument 'secondary_subnet_id' to be a str")
        pulumi.set(__self__, "secondary_subnet_id", secondary_subnet_id)
        if ssl_enabled and not isinstance(ssl_enabled, bool):
            raise TypeError("Expected argument 'ssl_enabled' to be a bool")
        pulumi.set(__self__, "ssl_enabled", ssl_enabled)
        if ssl_max_connections and not isinstance(ssl_max_connections, int):
            raise TypeError("Expected argument 'ssl_max_connections' to be a int")
        pulumi.set(__self__, "ssl_max_connections", ssl_max_connections)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if subnet_id and not isinstance(subnet_id, str):
            raise TypeError("Expected argument 'subnet_id' to be a str")
        pulumi.set(__self__, "subnet_id", subnet_id)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if update_time and not isinstance(update_time, str):
            raise TypeError("Expected argument 'update_time' to be a str")
        pulumi.set(__self__, "update_time", update_time)
        if vpc_id and not isinstance(vpc_id, str):
            raise TypeError("Expected argument 'vpc_id' to be a str")
        pulumi.set(__self__, "vpc_id", vpc_id)
        if vpn_gateway_id and not isinstance(vpn_gateway_id, str):
            raise TypeError("Expected argument 'vpn_gateway_id' to be a str")
        pulumi.set(__self__, "vpn_gateway_id", vpn_gateway_id)
        if vpn_gateway_name and not isinstance(vpn_gateway_name, str):
            raise TypeError("Expected argument 'vpn_gateway_name' to be a str")
        pulumi.set(__self__, "vpn_gateway_name", vpn_gateway_name)

    @property
    @pulumi.getter
    def asn(self) -> builtins.int:
        """
        VPN网关的ASN。
        """
        return pulumi.get(self, "asn")

    @property
    @pulumi.getter
    def bandwidth(self) -> builtins.int:
        """
        VPN网关的带宽规格。
        """
        return pulumi.get(self, "bandwidth")

    @property
    @pulumi.getter(name="billingType")
    def billing_type(self) -> builtins.int:
        """
        VPN网关的计费类型。1：包年包月。2：按量计费（按固定规格）
        """
        return pulumi.get(self, "billing_type")

    @property
    @pulumi.getter(name="businessStatus")
    def business_status(self) -> builtins.str:
        """
        VPN网关的计费状态。Normal: 正常。FinancialLocked: 被锁定。
        """
        return pulumi.get(self, "business_status")

    @property
    @pulumi.getter(name="connectionCount")
    def connection_count(self) -> builtins.int:
        """
        VPN网关关联IPsec连接的数量。
        """
        return pulumi.get(self, "connection_count")

    @property
    @pulumi.getter(name="createTime")
    def create_time(self) -> builtins.str:
        """
        创建VPN网关的时间。
        """
        return pulumi.get(self, "create_time")

    @property
    @pulumi.getter(name="deletedTime")
    def deleted_time(self) -> builtins.str:
        """
        预期资源强制回收时间。
        """
        return pulumi.get(self, "deleted_time")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        VPN网关的描述。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="dualTunnelEnabled")
    def dual_tunnel_enabled(self) -> builtins.bool:
        """
        VPN网关是否开启双隧道模式。true：开启false：关闭
        """
        return pulumi.get(self, "dual_tunnel_enabled")

    @property
    @pulumi.getter(name="expiredTime")
    def expired_time(self) -> builtins.str:
        """
        VPN网关的到期时间。
        """
        return pulumi.get(self, "expired_time")

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

    @property
    @pulumi.getter(name="ipAddress")
    def ip_address(self) -> builtins.str:
        """
        VPN网关的公网IP地址。
        """
        return pulumi.get(self, "ip_address")

    @property
    @pulumi.getter(name="ipStackType")
    def ip_stack_type(self) -> builtins.str:
        """
        VPN 网关的协议类型。ipv4*only：IPv4协议类型。ipv6*only：IPv6协议类型。ipv4_ipv6：双栈协议类型。
        """
        return pulumi.get(self, "ip_stack_type")

    @property
    @pulumi.getter(name="ipVersion")
    def ip_version(self) -> builtins.str:
        """
        VPN网关的IP地址类型。ipv4：IPv4地址类型。ipv6：IPv6地址类型。
        """
        return pulumi.get(self, "ip_version")

    @property
    @pulumi.getter(name="ipsecEnabled")
    def ipsec_enabled(self) -> builtins.bool:
        """
        是否开启IPSec功能。true：开启false：关闭。
        """
        return pulumi.get(self, "ipsec_enabled")

    @property
    @pulumi.getter(name="isBlocked")
    def is_blocked(self) -> builtins.bool:
        """
        当前资源的状态是否被封禁。true：封禁false：未封禁。
        """
        return pulumi.get(self, "is_blocked")

    @property
    @pulumi.getter(name="lockReason")
    def lock_reason(self) -> builtins.str:
        """
        VPN网关的锁定原因。financial：因欠费被锁定。security：因安全被锁定。unlock：未锁定。
        """
        return pulumi.get(self, "lock_reason")

    @property
    @pulumi.getter(name="overdueTime")
    def overdue_time(self) -> builtins.str:
        """
        资源冻结时间。仅当资源因为欠费冻结，此参数才会有返回值，否则均返回空值。
        """
        return pulumi.get(self, "overdue_time")

    @property
    @pulumi.getter
    def period(self) -> builtins.int:
        """
        包年包月类型VPN网关购买的时长，默认“1”。当PeriodUnit传入值为Month，Period取值范围：1~9、12、24、36。当PeriodUnit传入值为Year，Period取值范围：1～3。
        """
        return pulumi.get(self, "period")

    @property
    @pulumi.getter(name="periodUnit")
    def period_unit(self) -> builtins.str:
        """
        包年包月类型VPN网关购买时长的单位，默认“Month”。Month：月Year：年
        """
        return pulumi.get(self, "period_unit")

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> builtins.str:
        """
        VPN网关所属的项目。不填默认为default，即创建的资源属于default项目。您可调用ListProjects查询当前账号下项目的信息。
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter(name="routeCount")
    def route_count(self) -> builtins.int:
        """
        VPN网关的路由条目数量。
        """
        return pulumi.get(self, "route_count")

    @property
    @pulumi.getter(name="secondaryIpAddress")
    def secondary_ip_address(self) -> builtins.str:
        """
        VPN网关的第二个公网IP地址。仅双隧道模式的VPN网关实例返回该参数，单隧道模式的VPN网关实例不返回该参数。
        """
        return pulumi.get(self, "secondary_ip_address")

    @property
    @pulumi.getter(name="secondarySubnetId")
    def secondary_subnet_id(self) -> builtins.str:
        """
        VPN网关实例关联的第二个子网的ID。仅双隧道模式的VPN网关实例返回该参数，单隧道模式的VPN网关实例不返回该参数。
        """
        return pulumi.get(self, "secondary_subnet_id")

    @property
    @pulumi.getter(name="sslEnabled")
    def ssl_enabled(self) -> builtins.bool:
        """
        是否开启SSL VPN功能。true：开启false：关闭
        """
        return pulumi.get(self, "ssl_enabled")

    @property
    @pulumi.getter(name="sslMaxConnections")
    def ssl_max_connections(self) -> builtins.int:
        """
        VPN网关的最大SSL连接数。
        """
        return pulumi.get(self, "ssl_max_connections")

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        VPN网关的状态。Creating: 创建中Deleting: 删除中Pending：配置中Available：可用
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter(name="subnetId")
    def subnet_id(self) -> builtins.str:
        """
        VPN网关使用的端口所属子网的ID。
        """
        return pulumi.get(self, "subnet_id")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetVpnGatewayTagResult']:
        """
        VPN网关已添加的全部标签信息。
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="updateTime")
    def update_time(self) -> builtins.str:
        """
        更新VPN网关的时间。
        """
        return pulumi.get(self, "update_time")

    @property
    @pulumi.getter(name="vpcId")
    def vpc_id(self) -> builtins.str:
        """
        VPN网关所在VPC的ID。
        """
        return pulumi.get(self, "vpc_id")

    @property
    @pulumi.getter(name="vpnGatewayId")
    def vpn_gateway_id(self) -> builtins.str:
        """
        VPN网关的ID。
        """
        return pulumi.get(self, "vpn_gateway_id")

    @property
    @pulumi.getter(name="vpnGatewayName")
    def vpn_gateway_name(self) -> builtins.str:
        """
        VPN网关的名称。
        """
        return pulumi.get(self, "vpn_gateway_name")


class AwaitableGetVpnGatewayResult(GetVpnGatewayResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetVpnGatewayResult(
            asn=self.asn,
            bandwidth=self.bandwidth,
            billing_type=self.billing_type,
            business_status=self.business_status,
            connection_count=self.connection_count,
            create_time=self.create_time,
            deleted_time=self.deleted_time,
            description=self.description,
            dual_tunnel_enabled=self.dual_tunnel_enabled,
            expired_time=self.expired_time,
            id=self.id,
            ip_address=self.ip_address,
            ip_stack_type=self.ip_stack_type,
            ip_version=self.ip_version,
            ipsec_enabled=self.ipsec_enabled,
            is_blocked=self.is_blocked,
            lock_reason=self.lock_reason,
            overdue_time=self.overdue_time,
            period=self.period,
            period_unit=self.period_unit,
            project_name=self.project_name,
            route_count=self.route_count,
            secondary_ip_address=self.secondary_ip_address,
            secondary_subnet_id=self.secondary_subnet_id,
            ssl_enabled=self.ssl_enabled,
            ssl_max_connections=self.ssl_max_connections,
            status=self.status,
            subnet_id=self.subnet_id,
            tags=self.tags,
            update_time=self.update_time,
            vpc_id=self.vpc_id,
            vpn_gateway_id=self.vpn_gateway_id,
            vpn_gateway_name=self.vpn_gateway_name)


def get_vpn_gateway(id: Optional[builtins.str] = None,
                    opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetVpnGatewayResult:
    """
    Data Source schema for Byteplus::VPN::VPNGateway


    :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:vpn/getVpnGateway:getVpnGateway', __args__, opts=opts, typ=GetVpnGatewayResult).value

    return AwaitableGetVpnGatewayResult(
        asn=pulumi.get(__ret__, 'asn'),
        bandwidth=pulumi.get(__ret__, 'bandwidth'),
        billing_type=pulumi.get(__ret__, 'billing_type'),
        business_status=pulumi.get(__ret__, 'business_status'),
        connection_count=pulumi.get(__ret__, 'connection_count'),
        create_time=pulumi.get(__ret__, 'create_time'),
        deleted_time=pulumi.get(__ret__, 'deleted_time'),
        description=pulumi.get(__ret__, 'description'),
        dual_tunnel_enabled=pulumi.get(__ret__, 'dual_tunnel_enabled'),
        expired_time=pulumi.get(__ret__, 'expired_time'),
        id=pulumi.get(__ret__, 'id'),
        ip_address=pulumi.get(__ret__, 'ip_address'),
        ip_stack_type=pulumi.get(__ret__, 'ip_stack_type'),
        ip_version=pulumi.get(__ret__, 'ip_version'),
        ipsec_enabled=pulumi.get(__ret__, 'ipsec_enabled'),
        is_blocked=pulumi.get(__ret__, 'is_blocked'),
        lock_reason=pulumi.get(__ret__, 'lock_reason'),
        overdue_time=pulumi.get(__ret__, 'overdue_time'),
        period=pulumi.get(__ret__, 'period'),
        period_unit=pulumi.get(__ret__, 'period_unit'),
        project_name=pulumi.get(__ret__, 'project_name'),
        route_count=pulumi.get(__ret__, 'route_count'),
        secondary_ip_address=pulumi.get(__ret__, 'secondary_ip_address'),
        secondary_subnet_id=pulumi.get(__ret__, 'secondary_subnet_id'),
        ssl_enabled=pulumi.get(__ret__, 'ssl_enabled'),
        ssl_max_connections=pulumi.get(__ret__, 'ssl_max_connections'),
        status=pulumi.get(__ret__, 'status'),
        subnet_id=pulumi.get(__ret__, 'subnet_id'),
        tags=pulumi.get(__ret__, 'tags'),
        update_time=pulumi.get(__ret__, 'update_time'),
        vpc_id=pulumi.get(__ret__, 'vpc_id'),
        vpn_gateway_id=pulumi.get(__ret__, 'vpn_gateway_id'),
        vpn_gateway_name=pulumi.get(__ret__, 'vpn_gateway_name'))
def get_vpn_gateway_output(id: Optional[pulumi.Input[builtins.str]] = None,
                           opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetVpnGatewayResult]:
    """
    Data Source schema for Byteplus::VPN::VPNGateway


    :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:vpn/getVpnGateway:getVpnGateway', __args__, opts=opts, typ=GetVpnGatewayResult)
    return __ret__.apply(lambda __response__: GetVpnGatewayResult(
        asn=pulumi.get(__response__, 'asn'),
        bandwidth=pulumi.get(__response__, 'bandwidth'),
        billing_type=pulumi.get(__response__, 'billing_type'),
        business_status=pulumi.get(__response__, 'business_status'),
        connection_count=pulumi.get(__response__, 'connection_count'),
        create_time=pulumi.get(__response__, 'create_time'),
        deleted_time=pulumi.get(__response__, 'deleted_time'),
        description=pulumi.get(__response__, 'description'),
        dual_tunnel_enabled=pulumi.get(__response__, 'dual_tunnel_enabled'),
        expired_time=pulumi.get(__response__, 'expired_time'),
        id=pulumi.get(__response__, 'id'),
        ip_address=pulumi.get(__response__, 'ip_address'),
        ip_stack_type=pulumi.get(__response__, 'ip_stack_type'),
        ip_version=pulumi.get(__response__, 'ip_version'),
        ipsec_enabled=pulumi.get(__response__, 'ipsec_enabled'),
        is_blocked=pulumi.get(__response__, 'is_blocked'),
        lock_reason=pulumi.get(__response__, 'lock_reason'),
        overdue_time=pulumi.get(__response__, 'overdue_time'),
        period=pulumi.get(__response__, 'period'),
        period_unit=pulumi.get(__response__, 'period_unit'),
        project_name=pulumi.get(__response__, 'project_name'),
        route_count=pulumi.get(__response__, 'route_count'),
        secondary_ip_address=pulumi.get(__response__, 'secondary_ip_address'),
        secondary_subnet_id=pulumi.get(__response__, 'secondary_subnet_id'),
        ssl_enabled=pulumi.get(__response__, 'ssl_enabled'),
        ssl_max_connections=pulumi.get(__response__, 'ssl_max_connections'),
        status=pulumi.get(__response__, 'status'),
        subnet_id=pulumi.get(__response__, 'subnet_id'),
        tags=pulumi.get(__response__, 'tags'),
        update_time=pulumi.get(__response__, 'update_time'),
        vpc_id=pulumi.get(__response__, 'vpc_id'),
        vpn_gateway_id=pulumi.get(__response__, 'vpn_gateway_id'),
        vpn_gateway_name=pulumi.get(__response__, 'vpn_gateway_name')))
