// *** 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! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AliCloud.Vpc
{
    public static class GetRouteTables
    {
        /// <summary>
        /// This data source provides a list of Route Tables owned by an Alibaba Cloud account.
        /// 
        /// &gt; **NOTE:** Available in 1.36.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var config = new Config();
        ///     var name = config.Get("name") ?? "route-tables-datasource-example-name";
        ///     var fooNetwork = new AliCloud.Vpc.Network("fooNetwork", new()
        ///     {
        ///         CidrBlock = "172.16.0.0/12",
        ///         VpcName = name,
        ///     });
        /// 
        ///     var fooRouteTable = new AliCloud.Vpc.RouteTable("fooRouteTable", new()
        ///     {
        ///         Description = name,
        ///         RouteTableName = name,
        ///         VpcId = fooNetwork.Id,
        ///     });
        /// 
        ///     var fooRouteTables = AliCloud.Vpc.GetRouteTables.Invoke(new()
        ///     {
        ///         Ids = new[]
        ///         {
        ///             fooRouteTable.Id,
        ///         },
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["routeTableIds"] = fooRouteTables.Apply(getRouteTablesResult =&gt; getRouteTablesResult.Ids),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetRouteTablesResult> InvokeAsync(GetRouteTablesArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetRouteTablesResult>("alicloud:vpc/getRouteTables:getRouteTables", args ?? new GetRouteTablesArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides a list of Route Tables owned by an Alibaba Cloud account.
        /// 
        /// &gt; **NOTE:** Available in 1.36.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var config = new Config();
        ///     var name = config.Get("name") ?? "route-tables-datasource-example-name";
        ///     var fooNetwork = new AliCloud.Vpc.Network("fooNetwork", new()
        ///     {
        ///         CidrBlock = "172.16.0.0/12",
        ///         VpcName = name,
        ///     });
        /// 
        ///     var fooRouteTable = new AliCloud.Vpc.RouteTable("fooRouteTable", new()
        ///     {
        ///         Description = name,
        ///         RouteTableName = name,
        ///         VpcId = fooNetwork.Id,
        ///     });
        /// 
        ///     var fooRouteTables = AliCloud.Vpc.GetRouteTables.Invoke(new()
        ///     {
        ///         Ids = new[]
        ///         {
        ///             fooRouteTable.Id,
        ///         },
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["routeTableIds"] = fooRouteTables.Apply(getRouteTablesResult =&gt; getRouteTablesResult.Ids),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetRouteTablesResult> Invoke(GetRouteTablesInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetRouteTablesResult>("alicloud:vpc/getRouteTables:getRouteTables", args ?? new GetRouteTablesInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetRouteTablesArgs : global::Pulumi.InvokeArgs
    {
        [Input("ids")]
        private List<string>? _ids;

        /// <summary>
        /// A list of Route Tables IDs.
        /// </summary>
        public List<string> Ids
        {
            get => _ids ?? (_ids = new List<string>());
            set => _ids = value;
        }

        /// <summary>
        /// A regex string to filter route tables by name.
        /// </summary>
        [Input("nameRegex")]
        public string? NameRegex { get; set; }

        [Input("outputFile")]
        public string? OutputFile { get; set; }

        [Input("pageNumber")]
        public int? PageNumber { get; set; }

        [Input("pageSize")]
        public int? PageSize { get; set; }

        /// <summary>
        /// The Id of resource group which route tables belongs.
        /// </summary>
        [Input("resourceGroupId")]
        public string? ResourceGroupId { get; set; }

        /// <summary>
        /// The route table name.
        /// </summary>
        [Input("routeTableName")]
        public string? RouteTableName { get; set; }

        /// <summary>
        /// The router ID.
        /// </summary>
        [Input("routerId")]
        public string? RouterId { get; set; }

        /// <summary>
        /// The route type of route table. Valid values: `VRouter` and `VBR`.
        /// </summary>
        [Input("routerType")]
        public string? RouterType { get; set; }

        /// <summary>
        /// The status of resource. Valid values: `Available` and `Pending`.
        /// </summary>
        [Input("status")]
        public string? Status { get; set; }

        [Input("tags")]
        private Dictionary<string, object>? _tags;

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        public Dictionary<string, object> Tags
        {
            get => _tags ?? (_tags = new Dictionary<string, object>());
            set => _tags = value;
        }

        /// <summary>
        /// Vpc id of the route table.
        /// </summary>
        [Input("vpcId")]
        public string? VpcId { get; set; }

        public GetRouteTablesArgs()
        {
        }
        public static new GetRouteTablesArgs Empty => new GetRouteTablesArgs();
    }

    public sealed class GetRouteTablesInvokeArgs : global::Pulumi.InvokeArgs
    {
        [Input("ids")]
        private InputList<string>? _ids;

        /// <summary>
        /// A list of Route Tables IDs.
        /// </summary>
        public InputList<string> Ids
        {
            get => _ids ?? (_ids = new InputList<string>());
            set => _ids = value;
        }

        /// <summary>
        /// A regex string to filter route tables by name.
        /// </summary>
        [Input("nameRegex")]
        public Input<string>? NameRegex { get; set; }

        [Input("outputFile")]
        public Input<string>? OutputFile { get; set; }

        [Input("pageNumber")]
        public Input<int>? PageNumber { get; set; }

        [Input("pageSize")]
        public Input<int>? PageSize { get; set; }

        /// <summary>
        /// The Id of resource group which route tables belongs.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        /// <summary>
        /// The route table name.
        /// </summary>
        [Input("routeTableName")]
        public Input<string>? RouteTableName { get; set; }

        /// <summary>
        /// The router ID.
        /// </summary>
        [Input("routerId")]
        public Input<string>? RouterId { get; set; }

        /// <summary>
        /// The route type of route table. Valid values: `VRouter` and `VBR`.
        /// </summary>
        [Input("routerType")]
        public Input<string>? RouterType { get; set; }

        /// <summary>
        /// The status of resource. Valid values: `Available` and `Pending`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// Vpc id of the route table.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

        public GetRouteTablesInvokeArgs()
        {
        }
        public static new GetRouteTablesInvokeArgs Empty => new GetRouteTablesInvokeArgs();
    }


    [OutputType]
    public sealed class GetRouteTablesResult
    {
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// (Optional) A list of Route Tables IDs.
        /// </summary>
        public readonly ImmutableArray<string> Ids;
        public readonly string? NameRegex;
        /// <summary>
        /// A list of Route Tables names.
        /// </summary>
        public readonly ImmutableArray<string> Names;
        public readonly string? OutputFile;
        public readonly int? PageNumber;
        public readonly int? PageSize;
        /// <summary>
        /// The Id of resource group which route tables belongs.
        /// </summary>
        public readonly string? ResourceGroupId;
        /// <summary>
        /// The route table name.
        /// </summary>
        public readonly string? RouteTableName;
        /// <summary>
        /// Router Id of the route table.
        /// </summary>
        public readonly string? RouterId;
        /// <summary>
        /// The route type.
        /// </summary>
        public readonly string? RouterType;
        /// <summary>
        /// The status of route table.
        /// </summary>
        public readonly string? Status;
        /// <summary>
        /// A list of Route Tables. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetRouteTablesTableResult> Tables;
        public readonly ImmutableDictionary<string, object>? Tags;
        public readonly int TotalCount;
        /// <summary>
        /// The VPC ID.
        /// </summary>
        public readonly string? VpcId;

        [OutputConstructor]
        private GetRouteTablesResult(
            string id,

            ImmutableArray<string> ids,

            string? nameRegex,

            ImmutableArray<string> names,

            string? outputFile,

            int? pageNumber,

            int? pageSize,

            string? resourceGroupId,

            string? routeTableName,

            string? routerId,

            string? routerType,

            string? status,

            ImmutableArray<Outputs.GetRouteTablesTableResult> tables,

            ImmutableDictionary<string, object>? tags,

            int totalCount,

            string? vpcId)
        {
            Id = id;
            Ids = ids;
            NameRegex = nameRegex;
            Names = names;
            OutputFile = outputFile;
            PageNumber = pageNumber;
            PageSize = pageSize;
            ResourceGroupId = resourceGroupId;
            RouteTableName = routeTableName;
            RouterId = routerId;
            RouterType = routerType;
            Status = status;
            Tables = tables;
            Tags = tags;
            TotalCount = totalCount;
            VpcId = vpcId;
        }
    }
}
