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

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.network.getVirtualHubRouteTable

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Uses this data source to access information about an existing Virtual Hub Route Table.

    Virtual Hub Route Table Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.network.getVirtualHubRouteTable({
        name: "example-hub-route-table",
        resourceGroupName: "example-resources",
        virtualHubName: "example-hub-name",
    });
    export const virtualHubRouteTableId = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.network.get_virtual_hub_route_table(name="example-hub-route-table",
        resource_group_name="example-resources",
        virtual_hub_name="example-hub-name")
    pulumi.export("virtualHubRouteTableId", example.id)
    
    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 {
    		example, err := network.LookupVirtualHubRouteTable(ctx, &network.LookupVirtualHubRouteTableArgs{
    			Name:              "example-hub-route-table",
    			ResourceGroupName: "example-resources",
    			VirtualHubName:    "example-hub-name",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("virtualHubRouteTableId", example.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.Network.GetVirtualHubRouteTable.Invoke(new()
        {
            Name = "example-hub-route-table",
            ResourceGroupName = "example-resources",
            VirtualHubName = "example-hub-name",
        });
    
        return new Dictionary<string, object?>
        {
            ["virtualHubRouteTableId"] = example.Apply(getVirtualHubRouteTableResult => getVirtualHubRouteTableResult.Id),
        };
    });
    
    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.GetVirtualHubRouteTableArgs;
    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.getVirtualHubRouteTable(GetVirtualHubRouteTableArgs.builder()
                .name("example-hub-route-table")
                .resourceGroupName("example-resources")
                .virtualHubName("example-hub-name")
                .build());
    
            ctx.export("virtualHubRouteTableId", example.applyValue(getVirtualHubRouteTableResult -> getVirtualHubRouteTableResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:network:getVirtualHubRouteTable
          Arguments:
            name: example-hub-route-table
            resourceGroupName: example-resources
            virtualHubName: example-hub-name
    outputs:
      virtualHubRouteTableId: ${example.id}
    

    Using getVirtualHubRouteTable

    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 getVirtualHubRouteTable(args: GetVirtualHubRouteTableArgs, opts?: InvokeOptions): Promise<GetVirtualHubRouteTableResult>
    function getVirtualHubRouteTableOutput(args: GetVirtualHubRouteTableOutputArgs, opts?: InvokeOptions): Output<GetVirtualHubRouteTableResult>
    def get_virtual_hub_route_table(name: Optional[str] = None,
                                    resource_group_name: Optional[str] = None,
                                    virtual_hub_name: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetVirtualHubRouteTableResult
    def get_virtual_hub_route_table_output(name: Optional[pulumi.Input[str]] = None,
                                    resource_group_name: Optional[pulumi.Input[str]] = None,
                                    virtual_hub_name: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetVirtualHubRouteTableResult]
    func LookupVirtualHubRouteTable(ctx *Context, args *LookupVirtualHubRouteTableArgs, opts ...InvokeOption) (*LookupVirtualHubRouteTableResult, error)
    func LookupVirtualHubRouteTableOutput(ctx *Context, args *LookupVirtualHubRouteTableOutputArgs, opts ...InvokeOption) LookupVirtualHubRouteTableResultOutput

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

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

    The following arguments are supported:

    Name string
    The name of the Virtual Hub Route Table.
    ResourceGroupName string
    The Name of the Resource Group where the Virtual Hub Route Table exists.
    VirtualHubName string
    The name which should be used for Virtual Hub Route Table.
    Name string
    The name of the Virtual Hub Route Table.
    ResourceGroupName string
    The Name of the Resource Group where the Virtual Hub Route Table exists.
    VirtualHubName string
    The name which should be used for Virtual Hub Route Table.
    name String
    The name of the Virtual Hub Route Table.
    resourceGroupName String
    The Name of the Resource Group where the Virtual Hub Route Table exists.
    virtualHubName String
    The name which should be used for Virtual Hub Route Table.
    name string
    The name of the Virtual Hub Route Table.
    resourceGroupName string
    The Name of the Resource Group where the Virtual Hub Route Table exists.
    virtualHubName string
    The name which should be used for Virtual Hub Route Table.
    name str
    The name of the Virtual Hub Route Table.
    resource_group_name str
    The Name of the Resource Group where the Virtual Hub Route Table exists.
    virtual_hub_name str
    The name which should be used for Virtual Hub Route Table.
    name String
    The name of the Virtual Hub Route Table.
    resourceGroupName String
    The Name of the Resource Group where the Virtual Hub Route Table exists.
    virtualHubName String
    The name which should be used for Virtual Hub Route Table.

    getVirtualHubRouteTable Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Labels List<string>
    List of labels associated with this route table.
    Name string
    The name which is used for this route.
    ResourceGroupName string
    Routes List<GetVirtualHubRouteTableRoute>
    A route block as defined below.
    VirtualHubId string
    The ID of the Virtual Hub within which this route table is created
    VirtualHubName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Labels []string
    List of labels associated with this route table.
    Name string
    The name which is used for this route.
    ResourceGroupName string
    Routes []GetVirtualHubRouteTableRouteType
    A route block as defined below.
    VirtualHubId string
    The ID of the Virtual Hub within which this route table is created
    VirtualHubName string
    id String
    The provider-assigned unique ID for this managed resource.
    labels List<String>
    List of labels associated with this route table.
    name String
    The name which is used for this route.
    resourceGroupName String
    routes List<GetVirtualHubRouteTableRoute>
    A route block as defined below.
    virtualHubId String
    The ID of the Virtual Hub within which this route table is created
    virtualHubName String
    id string
    The provider-assigned unique ID for this managed resource.
    labels string[]
    List of labels associated with this route table.
    name string
    The name which is used for this route.
    resourceGroupName string
    routes GetVirtualHubRouteTableRoute[]
    A route block as defined below.
    virtualHubId string
    The ID of the Virtual Hub within which this route table is created
    virtualHubName string
    id str
    The provider-assigned unique ID for this managed resource.
    labels Sequence[str]
    List of labels associated with this route table.
    name str
    The name which is used for this route.
    resource_group_name str
    routes Sequence[GetVirtualHubRouteTableRoute]
    A route block as defined below.
    virtual_hub_id str
    The ID of the Virtual Hub within which this route table is created
    virtual_hub_name str
    id String
    The provider-assigned unique ID for this managed resource.
    labels List<String>
    List of labels associated with this route table.
    name String
    The name which is used for this route.
    resourceGroupName String
    routes List<Property Map>
    A route block as defined below.
    virtualHubId String
    The ID of the Virtual Hub within which this route table is created
    virtualHubName String

    Supporting Types

    GetVirtualHubRouteTableRoute

    Destinations List<string>
    A list of destination addresses for this route.
    DestinationsType string
    The type of destinations.
    Name string
    The name of the Virtual Hub Route Table.
    NextHop string
    The next hop's resource ID.
    NextHopType string
    The type of next hop.
    Destinations []string
    A list of destination addresses for this route.
    DestinationsType string
    The type of destinations.
    Name string
    The name of the Virtual Hub Route Table.
    NextHop string
    The next hop's resource ID.
    NextHopType string
    The type of next hop.
    destinations List<String>
    A list of destination addresses for this route.
    destinationsType String
    The type of destinations.
    name String
    The name of the Virtual Hub Route Table.
    nextHop String
    The next hop's resource ID.
    nextHopType String
    The type of next hop.
    destinations string[]
    A list of destination addresses for this route.
    destinationsType string
    The type of destinations.
    name string
    The name of the Virtual Hub Route Table.
    nextHop string
    The next hop's resource ID.
    nextHopType string
    The type of next hop.
    destinations Sequence[str]
    A list of destination addresses for this route.
    destinations_type str
    The type of destinations.
    name str
    The name of the Virtual Hub Route Table.
    next_hop str
    The next hop's resource ID.
    next_hop_type str
    The type of next hop.
    destinations List<String>
    A list of destination addresses for this route.
    destinationsType String
    The type of destinations.
    name String
    The name of the Virtual Hub Route Table.
    nextHop String
    The next hop's resource ID.
    nextHopType String
    The type of next hop.

    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 v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi