# 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__ = [
    'GetTransitRouterRouteEntryResult',
    'AwaitableGetTransitRouterRouteEntryResult',
    'get_transit_router_route_entry',
    'get_transit_router_route_entry_output',
]

@pulumi.output_type
class GetTransitRouterRouteEntryResult:
    """
    A collection of values returned by getTransitRouterRouteEntry.
    """
    def __init__(__self__, as_paths=None, created_time=None, description=None, destination_cidr_block=None, id=None, status=None, transit_router_route_entry_id=None, transit_router_route_entry_name=None, transit_router_route_entry_next_hop_id=None, transit_router_route_entry_next_hop_type=None, transit_router_route_entry_type=None, transit_router_route_table_id=None, updated_time=None):
        if as_paths and not isinstance(as_paths, list):
            raise TypeError("Expected argument 'as_paths' to be a list")
        pulumi.set(__self__, "as_paths", as_paths)
        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 destination_cidr_block and not isinstance(destination_cidr_block, str):
            raise TypeError("Expected argument 'destination_cidr_block' to be a str")
        pulumi.set(__self__, "destination_cidr_block", destination_cidr_block)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if transit_router_route_entry_id and not isinstance(transit_router_route_entry_id, str):
            raise TypeError("Expected argument 'transit_router_route_entry_id' to be a str")
        pulumi.set(__self__, "transit_router_route_entry_id", transit_router_route_entry_id)
        if transit_router_route_entry_name and not isinstance(transit_router_route_entry_name, str):
            raise TypeError("Expected argument 'transit_router_route_entry_name' to be a str")
        pulumi.set(__self__, "transit_router_route_entry_name", transit_router_route_entry_name)
        if transit_router_route_entry_next_hop_id and not isinstance(transit_router_route_entry_next_hop_id, str):
            raise TypeError("Expected argument 'transit_router_route_entry_next_hop_id' to be a str")
        pulumi.set(__self__, "transit_router_route_entry_next_hop_id", transit_router_route_entry_next_hop_id)
        if transit_router_route_entry_next_hop_type and not isinstance(transit_router_route_entry_next_hop_type, str):
            raise TypeError("Expected argument 'transit_router_route_entry_next_hop_type' to be a str")
        pulumi.set(__self__, "transit_router_route_entry_next_hop_type", transit_router_route_entry_next_hop_type)
        if transit_router_route_entry_type and not isinstance(transit_router_route_entry_type, str):
            raise TypeError("Expected argument 'transit_router_route_entry_type' to be a str")
        pulumi.set(__self__, "transit_router_route_entry_type", transit_router_route_entry_type)
        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)

    @property
    @pulumi.getter(name="asPaths")
    def as_paths(self) -> Sequence[builtins.str]:
        """
        路由条目的AS路径。
        """
        return pulumi.get(self, "as_paths")

    @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:
        """
        TR路由表路由条目的描述信息。必须以字母、数字或中文开头，可包含字母、数字、中文和以下特殊字符：英文逗号（,）、点号（.）、下划线（_）、空格（ ）、等号（=）、短横线（-）、中文逗号（，）、中文句号（。）。长度限制为0 ~ 255个字符。不传入该参数或该参数不传入数值时，默认为空字符串。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="destinationCidrBlock")
    def destination_cidr_block(self) -> builtins.str:
        """
        路由条目的目标网段。
        """
        return pulumi.get(self, "destination_cidr_block")

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

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        路由条目的状态。Available：可用。Creating：创建中。Pending：配置中。Deleting：删除中。Conflicted：未生效。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter(name="transitRouterRouteEntryId")
    def transit_router_route_entry_id(self) -> builtins.str:
        """
        TR路由条目的ID。
        """
        return pulumi.get(self, "transit_router_route_entry_id")

    @property
    @pulumi.getter(name="transitRouterRouteEntryName")
    def transit_router_route_entry_name(self) -> builtins.str:
        """
        路由条目的名称。
        """
        return pulumi.get(self, "transit_router_route_entry_name")

    @property
    @pulumi.getter(name="transitRouterRouteEntryNextHopId")
    def transit_router_route_entry_next_hop_id(self) -> builtins.str:
        """
        路由条目的下一跳ID。
        """
        return pulumi.get(self, "transit_router_route_entry_next_hop_id")

    @property
    @pulumi.getter(name="transitRouterRouteEntryNextHopType")
    def transit_router_route_entry_next_hop_type(self) -> builtins.str:
        """
        路由条目的下一跳类型。取值如下：Attachment：网络实例，表示匹配该路由条目的流量会被转发到指定的网络实例。BlackHole：黑洞，表示匹配该路由条目的流量会被丢弃。
        """
        return pulumi.get(self, "transit_router_route_entry_next_hop_type")

    @property
    @pulumi.getter(name="transitRouterRouteEntryType")
    def transit_router_route_entry_type(self) -> builtins.str:
        """
        路由条目的类型。Static：静态路由。Propagated：自动学习路由。
        """
        return pulumi.get(self, "transit_router_route_entry_type")

    @property
    @pulumi.getter(name="transitRouterRouteTableId")
    def transit_router_route_table_id(self) -> builtins.str:
        """
        中转路由器实例关联的路由表的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")


class AwaitableGetTransitRouterRouteEntryResult(GetTransitRouterRouteEntryResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetTransitRouterRouteEntryResult(
            as_paths=self.as_paths,
            created_time=self.created_time,
            description=self.description,
            destination_cidr_block=self.destination_cidr_block,
            id=self.id,
            status=self.status,
            transit_router_route_entry_id=self.transit_router_route_entry_id,
            transit_router_route_entry_name=self.transit_router_route_entry_name,
            transit_router_route_entry_next_hop_id=self.transit_router_route_entry_next_hop_id,
            transit_router_route_entry_next_hop_type=self.transit_router_route_entry_next_hop_type,
            transit_router_route_entry_type=self.transit_router_route_entry_type,
            transit_router_route_table_id=self.transit_router_route_table_id,
            updated_time=self.updated_time)


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


    :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/getTransitRouterRouteEntry:getTransitRouterRouteEntry', __args__, opts=opts, typ=GetTransitRouterRouteEntryResult).value

    return AwaitableGetTransitRouterRouteEntryResult(
        as_paths=pulumi.get(__ret__, 'as_paths'),
        created_time=pulumi.get(__ret__, 'created_time'),
        description=pulumi.get(__ret__, 'description'),
        destination_cidr_block=pulumi.get(__ret__, 'destination_cidr_block'),
        id=pulumi.get(__ret__, 'id'),
        status=pulumi.get(__ret__, 'status'),
        transit_router_route_entry_id=pulumi.get(__ret__, 'transit_router_route_entry_id'),
        transit_router_route_entry_name=pulumi.get(__ret__, 'transit_router_route_entry_name'),
        transit_router_route_entry_next_hop_id=pulumi.get(__ret__, 'transit_router_route_entry_next_hop_id'),
        transit_router_route_entry_next_hop_type=pulumi.get(__ret__, 'transit_router_route_entry_next_hop_type'),
        transit_router_route_entry_type=pulumi.get(__ret__, 'transit_router_route_entry_type'),
        transit_router_route_table_id=pulumi.get(__ret__, 'transit_router_route_table_id'),
        updated_time=pulumi.get(__ret__, 'updated_time'))
def get_transit_router_route_entry_output(id: Optional[pulumi.Input[builtins.str]] = None,
                                          opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetTransitRouterRouteEntryResult]:
    """
    Data Source schema for Byteplus::TransitRouter::TransitRouterRouteEntry


    :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/getTransitRouterRouteEntry:getTransitRouterRouteEntry', __args__, opts=opts, typ=GetTransitRouterRouteEntryResult)
    return __ret__.apply(lambda __response__: GetTransitRouterRouteEntryResult(
        as_paths=pulumi.get(__response__, 'as_paths'),
        created_time=pulumi.get(__response__, 'created_time'),
        description=pulumi.get(__response__, 'description'),
        destination_cidr_block=pulumi.get(__response__, 'destination_cidr_block'),
        id=pulumi.get(__response__, 'id'),
        status=pulumi.get(__response__, 'status'),
        transit_router_route_entry_id=pulumi.get(__response__, 'transit_router_route_entry_id'),
        transit_router_route_entry_name=pulumi.get(__response__, 'transit_router_route_entry_name'),
        transit_router_route_entry_next_hop_id=pulumi.get(__response__, 'transit_router_route_entry_next_hop_id'),
        transit_router_route_entry_next_hop_type=pulumi.get(__response__, 'transit_router_route_entry_next_hop_type'),
        transit_router_route_entry_type=pulumi.get(__response__, 'transit_router_route_entry_type'),
        transit_router_route_table_id=pulumi.get(__response__, 'transit_router_route_table_id'),
        updated_time=pulumi.get(__response__, 'updated_time')))
