1. Packages
  2. Azure Classic
  3. API Docs
  4. network
  5. getRouteTable

We recommend using Azure Native.

Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi

azure.network.getRouteTable

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi

    Use this data source to access information about an existing Route Table.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.network.getRouteTable({
        name: "myroutetable",
        resourceGroupName: "some-resource-group",
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.network.get_route_table(name="myroutetable",
        resource_group_name="some-resource-group")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := network.LookupRouteTable(ctx, &network.LookupRouteTableArgs{
    			Name:              "myroutetable",
    			ResourceGroupName: "some-resource-group",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.Network.GetRouteTable.Invoke(new()
        {
            Name = "myroutetable",
            ResourceGroupName = "some-resource-group",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.network.NetworkFunctions;
    import com.pulumi.azure.network.inputs.GetRouteTableArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = NetworkFunctions.getRouteTable(GetRouteTableArgs.builder()
                .name("myroutetable")
                .resourceGroupName("some-resource-group")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:network:getRouteTable
          Arguments:
            name: myroutetable
            resourceGroupName: some-resource-group
    

    Using getRouteTable

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getRouteTable(args: GetRouteTableArgs, opts?: InvokeOptions): Promise<GetRouteTableResult>
    function getRouteTableOutput(args: GetRouteTableOutputArgs, opts?: InvokeOptions): Output<GetRouteTableResult>
    def get_route_table(name: Optional[str] = None,
                        resource_group_name: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetRouteTableResult
    def get_route_table_output(name: Optional[pulumi.Input[str]] = None,
                        resource_group_name: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetRouteTableResult]
    func LookupRouteTable(ctx *Context, args *LookupRouteTableArgs, opts ...InvokeOption) (*LookupRouteTableResult, error)
    func LookupRouteTableOutput(ctx *Context, args *LookupRouteTableOutputArgs, opts ...InvokeOption) LookupRouteTableResultOutput

    > Note: This function is named LookupRouteTable in the Go SDK.

    public static class GetRouteTable 
    {
        public static Task<GetRouteTableResult> InvokeAsync(GetRouteTableArgs args, InvokeOptions? opts = null)
        public static Output<GetRouteTableResult> Invoke(GetRouteTableInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRouteTableResult> getRouteTable(GetRouteTableArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:network/getRouteTable:getRouteTable
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the Route Table.
    ResourceGroupName string
    The name of the Resource Group in which the Route Table exists.
    Name string
    The name of the Route Table.
    ResourceGroupName string
    The name of the Resource Group in which the Route Table exists.
    name String
    The name of the Route Table.
    resourceGroupName String
    The name of the Resource Group in which the Route Table exists.
    name string
    The name of the Route Table.
    resourceGroupName string
    The name of the Resource Group in which the Route Table exists.
    name str
    The name of the Route Table.
    resource_group_name str
    The name of the Resource Group in which the Route Table exists.
    name String
    The name of the Route Table.
    resourceGroupName String
    The name of the Resource Group in which the Route Table exists.

    getRouteTable Result

    The following output properties are available:

    BgpRoutePropagationEnabled bool
    Boolean flag which controls propagation of routes learned by BGP on that route table.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The Azure Region in which the Route Table exists.
    Name string
    The name of the Route.
    ResourceGroupName string
    Routes List<GetRouteTableRoute>
    One or more route blocks as documented below.
    Subnets List<string>
    The collection of Subnets associated with this route table.
    Tags Dictionary<string, string>
    A mapping of tags assigned to the Route Table.
    BgpRoutePropagationEnabled bool
    Boolean flag which controls propagation of routes learned by BGP on that route table.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The Azure Region in which the Route Table exists.
    Name string
    The name of the Route.
    ResourceGroupName string
    Routes []GetRouteTableRoute
    One or more route blocks as documented below.
    Subnets []string
    The collection of Subnets associated with this route table.
    Tags map[string]string
    A mapping of tags assigned to the Route Table.
    bgpRoutePropagationEnabled Boolean
    Boolean flag which controls propagation of routes learned by BGP on that route table.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The Azure Region in which the Route Table exists.
    name String
    The name of the Route.
    resourceGroupName String
    routes List<GetRouteTableRoute>
    One or more route blocks as documented below.
    subnets List<String>
    The collection of Subnets associated with this route table.
    tags Map<String,String>
    A mapping of tags assigned to the Route Table.
    bgpRoutePropagationEnabled boolean
    Boolean flag which controls propagation of routes learned by BGP on that route table.
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    The Azure Region in which the Route Table exists.
    name string
    The name of the Route.
    resourceGroupName string
    routes GetRouteTableRoute[]
    One or more route blocks as documented below.
    subnets string[]
    The collection of Subnets associated with this route table.
    tags {[key: string]: string}
    A mapping of tags assigned to the Route Table.
    bgp_route_propagation_enabled bool
    Boolean flag which controls propagation of routes learned by BGP on that route table.
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    The Azure Region in which the Route Table exists.
    name str
    The name of the Route.
    resource_group_name str
    routes Sequence[GetRouteTableRoute]
    One or more route blocks as documented below.
    subnets Sequence[str]
    The collection of Subnets associated with this route table.
    tags Mapping[str, str]
    A mapping of tags assigned to the Route Table.
    bgpRoutePropagationEnabled Boolean
    Boolean flag which controls propagation of routes learned by BGP on that route table.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The Azure Region in which the Route Table exists.
    name String
    The name of the Route.
    resourceGroupName String
    routes List<Property Map>
    One or more route blocks as documented below.
    subnets List<String>
    The collection of Subnets associated with this route table.
    tags Map<String>
    A mapping of tags assigned to the Route Table.

    Supporting Types

    GetRouteTableRoute

    AddressPrefix string
    The destination CIDR to which the route applies.
    Name string
    The name of the Route Table.
    NextHopInIpAddress string
    Contains the IP address packets should be forwarded to.
    NextHopType string
    The type of Azure hop the packet should be sent to.
    AddressPrefix string
    The destination CIDR to which the route applies.
    Name string
    The name of the Route Table.
    NextHopInIpAddress string
    Contains the IP address packets should be forwarded to.
    NextHopType string
    The type of Azure hop the packet should be sent to.
    addressPrefix String
    The destination CIDR to which the route applies.
    name String
    The name of the Route Table.
    nextHopInIpAddress String
    Contains the IP address packets should be forwarded to.
    nextHopType String
    The type of Azure hop the packet should be sent to.
    addressPrefix string
    The destination CIDR to which the route applies.
    name string
    The name of the Route Table.
    nextHopInIpAddress string
    Contains the IP address packets should be forwarded to.
    nextHopType string
    The type of Azure hop the packet should be sent to.
    address_prefix str
    The destination CIDR to which the route applies.
    name str
    The name of the Route Table.
    next_hop_in_ip_address str
    Contains the IP address packets should be forwarded to.
    next_hop_type str
    The type of Azure hop the packet should be sent to.
    addressPrefix String
    The destination CIDR to which the route applies.
    name String
    The name of the Route Table.
    nextHopInIpAddress String
    Contains the IP address packets should be forwarded to.
    nextHopType String
    The type of Azure hop the packet should be sent to.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi