GetRouteTable
Use this data source to access information about an existing Route Table.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.Network.GetRouteTable.InvokeAsync(new Azure.Network.GetRouteTableArgs
{
Name = "myroutetable",
ResourceGroupName = "some-resource-group",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/network"
"github.com/pulumi/pulumi/sdk/v2/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
})
}import pulumi
import pulumi_azure as azure
example = azure.network.get_route_table(name="myroutetable",
resource_group_name="some-resource-group")import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = pulumi.output(azure.network.getRouteTable({
name: "myroutetable",
resourceGroupName: "some-resource-group",
}, { async: true }));Using GetRouteTable
function getRouteTable(args: GetRouteTableArgs, opts?: InvokeOptions): Promise<GetRouteTableResult>function get_route_table(name=None, resource_group_name=None, opts=None)func LookupRouteTable(ctx *Context, args *LookupRouteTableArgs, opts ...InvokeOption) (*LookupRouteTableResult, error)Note: This function is named
LookupRouteTablein the Go SDK.
public static class GetRouteTable {
public static Task<GetRouteTableResult> InvokeAsync(GetRouteTableArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Name string
The name of the Route Table.
- Resource
Group stringName The name of the Resource Group in which the Route Table exists.
- Name string
The name of the Route Table.
- Resource
Group stringName The name of the Resource Group in which the Route Table exists.
- name string
The name of the Route Table.
- resource
Group stringName The name of the Resource Group in which the Route Table exists.
- name str
The name of the Route Table.
- resource_
group_ strname The name of the Resource Group in which the Route Table exists.
GetRouteTable Result
The following output properties are available:
- 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.
- Resource
Group stringName - Routes
List<Get
Route Table Route> One or more
routeblocks as documented below.- Subnets List<string>
The collection of Subnets associated with this route table.
- Dictionary<string, string>
A mapping of tags assigned to the 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.
- Resource
Group stringName - Routes
[]Get
Route Table Route One or more
routeblocks as documented below.- Subnets []string
The collection of Subnets associated with this route table.
- map[string]string
A mapping of tags assigned to the 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.
- resource
Group stringName - routes
Get
Route Table Route[] One or more
routeblocks as documented below.- subnets string[]
The collection of Subnets associated with this route table.
- {[key: string]: string}
A mapping of tags assigned to the 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_ strname - routes
List[Get
Route Table Route] One or more
routeblocks as documented below.- subnets List[str]
The collection of Subnets associated with this route table.
- Dict[str, str]
A mapping of tags assigned to the Route Table.
Supporting Types
GetRouteTableRoute
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Address
Prefix string The destination CIDR to which the route applies.
- Name string
The name of the Route Table.
- Next
Hop stringIn Ip Address Contains the IP address packets should be forwarded to.
- Next
Hop stringType The type of Azure hop the packet should be sent to.
- Address
Prefix string The destination CIDR to which the route applies.
- Name string
The name of the Route Table.
- Next
Hop stringIn Ip Address Contains the IP address packets should be forwarded to.
- Next
Hop stringType The type of Azure hop the packet should be sent to.
- address
Prefix string The destination CIDR to which the route applies.
- name string
The name of the Route Table.
- next
Hop stringIn Ip Address Contains the IP address packets should be forwarded to.
- next
Hop stringType 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_ strin_ ip_ address Contains the IP address packets should be forwarded to.
- next_
hop_ strtype The type of Azure hop the packet should be sent to.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.