# 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__ = [
    'GetVpnAttachmentResult',
    'AwaitableGetVpnAttachmentResult',
    'get_vpn_attachment',
    'get_vpn_attachment_output',
]

@pulumi.output_type
class GetVpnAttachmentResult:
    """
    A collection of values returned by getVpnAttachment.
    """
    def __init__(__self__, auto_publish_route_enabled=None, created_time=None, description=None, health_check_revoke_route_enabled=None, id=None, ipv6_enabled=None, status=None, tags=None, transit_router_attachment_id=None, transit_router_attachment_name=None, transit_router_id=None, transit_router_route_table_id=None, updated_time=None, vpn_connection_id=None, zone_id=None):
        if auto_publish_route_enabled and not isinstance(auto_publish_route_enabled, bool):
            raise TypeError("Expected argument 'auto_publish_route_enabled' to be a bool")
        pulumi.set(__self__, "auto_publish_route_enabled", auto_publish_route_enabled)
        if created_time and not isinstance(created_time, str):
            raise TypeError("Expected argument 'created_time' to be a str")
        pulumi.set(__self__, "created_time", created_time)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if health_check_revoke_route_enabled and not isinstance(health_check_revoke_route_enabled, bool):
            raise TypeError("Expected argument 'health_check_revoke_route_enabled' to be a bool")
        pulumi.set(__self__, "health_check_revoke_route_enabled", health_check_revoke_route_enabled)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if ipv6_enabled and not isinstance(ipv6_enabled, bool):
            raise TypeError("Expected argument 'ipv6_enabled' to be a bool")
        pulumi.set(__self__, "ipv6_enabled", ipv6_enabled)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if transit_router_attachment_id and not isinstance(transit_router_attachment_id, str):
            raise TypeError("Expected argument 'transit_router_attachment_id' to be a str")
        pulumi.set(__self__, "transit_router_attachment_id", transit_router_attachment_id)
        if transit_router_attachment_name and not isinstance(transit_router_attachment_name, str):
            raise TypeError("Expected argument 'transit_router_attachment_name' to be a str")
        pulumi.set(__self__, "transit_router_attachment_name", transit_router_attachment_name)
        if transit_router_id and not isinstance(transit_router_id, str):
            raise TypeError("Expected argument 'transit_router_id' to be a str")
        pulumi.set(__self__, "transit_router_id", transit_router_id)
        if transit_router_route_table_id and not isinstance(transit_router_route_table_id, str):
            raise TypeError("Expected argument 'transit_router_route_table_id' to be a str")
        pulumi.set(__self__, "transit_router_route_table_id", transit_router_route_table_id)
        if updated_time and not isinstance(updated_time, str):
            raise TypeError("Expected argument 'updated_time' to be a str")
        pulumi.set(__self__, "updated_time", updated_time)
        if vpn_connection_id and not isinstance(vpn_connection_id, str):
            raise TypeError("Expected argument 'vpn_connection_id' to be a str")
        pulumi.set(__self__, "vpn_connection_id", vpn_connection_id)
        if zone_id and not isinstance(zone_id, str):
            raise TypeError("Expected argument 'zone_id' to be a str")
        pulumi.set(__self__, "zone_id", zone_id)

    @property
    @pulumi.getter(name="autoPublishRouteEnabled")
    def auto_publish_route_enabled(self) -> builtins.bool:
        """
        是否自动同步TR路由到网络实例路由表中。
        """
        return pulumi.get(self, "auto_publish_route_enabled")

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> builtins.str:
        """
        创建时间。
        """
        return pulumi.get(self, "created_time")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        网络实例连接的描述信息。必须以字母、数字或中文开头，可包含字母、数字、中文和以下特殊字符：英文逗号（,）、点号（.）、下划线（_）、空格（ ）、等号（=）、短横线（-）、中文逗号（，）、中文句号（。）。长度限制为0 ~ 255个字符。不传入该参数或该参数不传入数值时，默认为空字符串。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="healthCheckRevokeRouteEnabled")
    def health_check_revoke_route_enabled(self) -> builtins.bool:
        """
        是否开启健康检查收敛路由功能。true：是。仅当IPsec连接开启健康检查功能时生效，且只支持收敛静态路由，不支持收敛BGP路由。false：否。
        """
        return pulumi.get(self, "health_check_revoke_route_enabled")

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

    @property
    @pulumi.getter(name="ipv6Enabled")
    def ipv6_enabled(self) -> builtins.bool:
        """
        是否开启IPv6功能。
        """
        return pulumi.get(self, "ipv6_enabled")

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

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetVpnAttachmentTagResult']:
        """
        标签列表。
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="transitRouterAttachmentId")
    def transit_router_attachment_id(self) -> builtins.str:
        """
        网络实例连接的ID。
        """
        return pulumi.get(self, "transit_router_attachment_id")

    @property
    @pulumi.getter(name="transitRouterAttachmentName")
    def transit_router_attachment_name(self) -> builtins.str:
        """
        网络实例连接的名称。必须以字母、数字或中文开头，可包含字母、数字、中文和以下特殊字符：点号（.）、下划线（_）和短横线（-）。长度限制为1 ~ 128个字符。不传入该参数或该参数不传入数值时，默认为网络实例连接的ID。
        """
        return pulumi.get(self, "transit_router_attachment_name")

    @property
    @pulumi.getter(name="transitRouterId")
    def transit_router_id(self) -> builtins.str:
        """
        中转路由器实例的ID。
        """
        return pulumi.get(self, "transit_router_id")

    @property
    @pulumi.getter(name="transitRouterRouteTableId")
    def transit_router_route_table_id(self) -> builtins.str:
        """
        关联的TR路由表ID。
        """
        return pulumi.get(self, "transit_router_route_table_id")

    @property
    @pulumi.getter(name="updatedTime")
    def updated_time(self) -> builtins.str:
        """
        更新时间。
        """
        return pulumi.get(self, "updated_time")

    @property
    @pulumi.getter(name="vpnConnectionId")
    def vpn_connection_id(self) -> builtins.str:
        """
        IPsec连接的ID。
        """
        return pulumi.get(self, "vpn_connection_id")

    @property
    @pulumi.getter(name="zoneId")
    def zone_id(self) -> builtins.str:
        """
        IPsec连接所属可用区的ID。
        """
        return pulumi.get(self, "zone_id")


class AwaitableGetVpnAttachmentResult(GetVpnAttachmentResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetVpnAttachmentResult(
            auto_publish_route_enabled=self.auto_publish_route_enabled,
            created_time=self.created_time,
            description=self.description,
            health_check_revoke_route_enabled=self.health_check_revoke_route_enabled,
            id=self.id,
            ipv6_enabled=self.ipv6_enabled,
            status=self.status,
            tags=self.tags,
            transit_router_attachment_id=self.transit_router_attachment_id,
            transit_router_attachment_name=self.transit_router_attachment_name,
            transit_router_id=self.transit_router_id,
            transit_router_route_table_id=self.transit_router_route_table_id,
            updated_time=self.updated_time,
            vpn_connection_id=self.vpn_connection_id,
            zone_id=self.zone_id)


def get_vpn_attachment(id: Optional[builtins.str] = None,
                       opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetVpnAttachmentResult:
    """
    Data Source schema for Byteplus::TransitRouter::VpnAttachment


    :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:transitrouter/getVpnAttachment:getVpnAttachment', __args__, opts=opts, typ=GetVpnAttachmentResult).value

    return AwaitableGetVpnAttachmentResult(
        auto_publish_route_enabled=pulumi.get(__ret__, 'auto_publish_route_enabled'),
        created_time=pulumi.get(__ret__, 'created_time'),
        description=pulumi.get(__ret__, 'description'),
        health_check_revoke_route_enabled=pulumi.get(__ret__, 'health_check_revoke_route_enabled'),
        id=pulumi.get(__ret__, 'id'),
        ipv6_enabled=pulumi.get(__ret__, 'ipv6_enabled'),
        status=pulumi.get(__ret__, 'status'),
        tags=pulumi.get(__ret__, 'tags'),
        transit_router_attachment_id=pulumi.get(__ret__, 'transit_router_attachment_id'),
        transit_router_attachment_name=pulumi.get(__ret__, 'transit_router_attachment_name'),
        transit_router_id=pulumi.get(__ret__, 'transit_router_id'),
        transit_router_route_table_id=pulumi.get(__ret__, 'transit_router_route_table_id'),
        updated_time=pulumi.get(__ret__, 'updated_time'),
        vpn_connection_id=pulumi.get(__ret__, 'vpn_connection_id'),
        zone_id=pulumi.get(__ret__, 'zone_id'))
def get_vpn_attachment_output(id: Optional[pulumi.Input[builtins.str]] = None,
                              opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetVpnAttachmentResult]:
    """
    Data Source schema for Byteplus::TransitRouter::VpnAttachment


    :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:transitrouter/getVpnAttachment:getVpnAttachment', __args__, opts=opts, typ=GetVpnAttachmentResult)
    return __ret__.apply(lambda __response__: GetVpnAttachmentResult(
        auto_publish_route_enabled=pulumi.get(__response__, 'auto_publish_route_enabled'),
        created_time=pulumi.get(__response__, 'created_time'),
        description=pulumi.get(__response__, 'description'),
        health_check_revoke_route_enabled=pulumi.get(__response__, 'health_check_revoke_route_enabled'),
        id=pulumi.get(__response__, 'id'),
        ipv6_enabled=pulumi.get(__response__, 'ipv6_enabled'),
        status=pulumi.get(__response__, 'status'),
        tags=pulumi.get(__response__, 'tags'),
        transit_router_attachment_id=pulumi.get(__response__, 'transit_router_attachment_id'),
        transit_router_attachment_name=pulumi.get(__response__, 'transit_router_attachment_name'),
        transit_router_id=pulumi.get(__response__, 'transit_router_id'),
        transit_router_route_table_id=pulumi.get(__response__, 'transit_router_route_table_id'),
        updated_time=pulumi.get(__response__, 'updated_time'),
        vpn_connection_id=pulumi.get(__response__, 'vpn_connection_id'),
        zone_id=pulumi.get(__response__, 'zone_id')))
