# 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 json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables

class GetRouteEntriesResult:
    """
    A collection of values returned by getRouteEntries.
    """
    def __init__(__self__, cidr_block=None, entries=None, id=None, instance_id=None, output_file=None, route_table_id=None, type=None):
        if cidr_block and not isinstance(cidr_block, str):
            raise TypeError("Expected argument 'cidr_block' to be a str")
        __self__.cidr_block = cidr_block
        """
        The destination CIDR block of the route entry.
        """
        if entries and not isinstance(entries, list):
            raise TypeError("Expected argument 'entries' to be a list")
        __self__.entries = entries
        """
        A list of Route Entries. Each element contains the following attributes:
        """
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        __self__.id = id
        """
        id is the provider-assigned unique ID for this managed resource.
        """
        if instance_id and not isinstance(instance_id, str):
            raise TypeError("Expected argument 'instance_id' to be a str")
        __self__.instance_id = instance_id
        """
        The instance ID of the next hop.
        """
        if output_file and not isinstance(output_file, str):
            raise TypeError("Expected argument 'output_file' to be a str")
        __self__.output_file = output_file
        if route_table_id and not isinstance(route_table_id, str):
            raise TypeError("Expected argument 'route_table_id' to be a str")
        __self__.route_table_id = route_table_id
        """
        The ID of the router table to which the route entry belongs.
        """
        if type and not isinstance(type, str):
            raise TypeError("Expected argument 'type' to be a str")
        __self__.type = type
        """
        The type of the route entry.
        """
class AwaitableGetRouteEntriesResult(GetRouteEntriesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetRouteEntriesResult(
            cidr_block=self.cidr_block,
            entries=self.entries,
            id=self.id,
            instance_id=self.instance_id,
            output_file=self.output_file,
            route_table_id=self.route_table_id,
            type=self.type)

def get_route_entries(cidr_block=None,instance_id=None,output_file=None,route_table_id=None,type=None,opts=None):
    """
    This data source provides a list of Route Entries owned by an Alibaba Cloud account.

    > **NOTE:** Available in 1.37.0+.

    > This content is derived from https://github.com/terraform-providers/terraform-provider-alicloud/blob/master/website/docs/d/route_entries.html.markdown.


    :param str cidr_block: The destination CIDR block of the route entry.
    :param str instance_id: The instance ID of the next hop.
    :param str route_table_id: The ID of the router table to which the route entry belongs.
    :param str type: The type of the route entry.
    """
    __args__ = dict()


    __args__['cidrBlock'] = cidr_block
    __args__['instanceId'] = instance_id
    __args__['outputFile'] = output_file
    __args__['routeTableId'] = route_table_id
    __args__['type'] = type
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = utilities.get_version()
    __ret__ = pulumi.runtime.invoke('alicloud:vpc/getRouteEntries:getRouteEntries', __args__, opts=opts).value

    return AwaitableGetRouteEntriesResult(
        cidr_block=__ret__.get('cidrBlock'),
        entries=__ret__.get('entries'),
        id=__ret__.get('id'),
        instance_id=__ret__.get('instanceId'),
        output_file=__ret__.get('outputFile'),
        route_table_id=__ret__.get('routeTableId'),
        type=__ret__.get('type'))
