We recommend using Azure Native.
Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi
azure.network.getVirtualHubRouteTable
Explore with Pulumi AI
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.
- Resource
Group stringName - The Name of the Resource Group where the Virtual Hub Route Table exists.
- Virtual
Hub stringName - The name which should be used for Virtual Hub Route Table.
- Name string
- The name of the Virtual Hub Route Table.
- Resource
Group stringName - The Name of the Resource Group where the Virtual Hub Route Table exists.
- Virtual
Hub stringName - The name which should be used for Virtual Hub Route Table.
- name String
- The name of the Virtual Hub Route Table.
- resource
Group StringName - The Name of the Resource Group where the Virtual Hub Route Table exists.
- virtual
Hub StringName - The name which should be used for Virtual Hub Route Table.
- name string
- The name of the Virtual Hub Route Table.
- resource
Group stringName - The Name of the Resource Group where the Virtual Hub Route Table exists.
- virtual
Hub stringName - The name which should be used for Virtual Hub Route Table.
- name str
- The name of the Virtual Hub Route Table.
- resource_
group_ strname - The Name of the Resource Group where the Virtual Hub Route Table exists.
- virtual_
hub_ strname - The name which should be used for Virtual Hub Route Table.
- name String
- The name of the Virtual Hub Route Table.
- resource
Group StringName - The Name of the Resource Group where the Virtual Hub Route Table exists.
- virtual
Hub StringName - 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.
- Resource
Group stringName - Routes
List<Get
Virtual Hub Route Table Route> - A
route
block as defined below. - Virtual
Hub stringId - The ID of the Virtual Hub within which this route table is created
- Virtual
Hub stringName
- 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.
- Resource
Group stringName - Routes
[]Get
Virtual Hub Route Table Route Type - A
route
block as defined below. - Virtual
Hub stringId - The ID of the Virtual Hub within which this route table is created
- Virtual
Hub stringName
- 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.
- resource
Group StringName - routes
List<Get
Virtual Hub Route Table Route> - A
route
block as defined below. - virtual
Hub StringId - The ID of the Virtual Hub within which this route table is created
- virtual
Hub StringName
- 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.
- resource
Group stringName - routes
Get
Virtual Hub Route Table Route[] - A
route
block as defined below. - virtual
Hub stringId - The ID of the Virtual Hub within which this route table is created
- virtual
Hub stringName
- 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_ strname - routes
Sequence[Get
Virtual Hub Route Table Route] - A
route
block as defined below. - virtual_
hub_ strid - The ID of the Virtual Hub within which this route table is created
- virtual_
hub_ strname
- 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.
- resource
Group StringName - routes List<Property Map>
- A
route
block as defined below. - virtual
Hub StringId - The ID of the Virtual Hub within which this route table is created
- virtual
Hub StringName
Supporting Types
GetVirtualHubRouteTableRoute
- Destinations List<string>
- A list of destination addresses for this route.
- Destinations
Type string - The type of destinations.
- Name string
- The name of the Virtual Hub Route Table.
- Next
Hop string - The next hop's resource ID.
- Next
Hop stringType - The type of next hop.
- Destinations []string
- A list of destination addresses for this route.
- Destinations
Type string - The type of destinations.
- Name string
- The name of the Virtual Hub Route Table.
- Next
Hop string - The next hop's resource ID.
- Next
Hop stringType - The type of next hop.
- destinations List<String>
- A list of destination addresses for this route.
- destinations
Type String - The type of destinations.
- name String
- The name of the Virtual Hub Route Table.
- next
Hop String - The next hop's resource ID.
- next
Hop StringType - The type of next hop.
- destinations string[]
- A list of destination addresses for this route.
- destinations
Type string - The type of destinations.
- name string
- The name of the Virtual Hub Route Table.
- next
Hop string - The next hop's resource ID.
- next
Hop stringType - 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_ strtype - The type of next hop.
- destinations List<String>
- A list of destination addresses for this route.
- destinations
Type String - The type of destinations.
- name String
- The name of the Virtual Hub Route Table.
- next
Hop String - The next hop's resource ID.
- next
Hop StringType - 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.