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

We recommend using Azure Native.

Azure Classic v5.80.0 published on Monday, Jun 10, 2024 by Pulumi

azure.network.getVirtualHubConnection

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.80.0 published on Monday, Jun 10, 2024 by Pulumi

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

    Virtual Hub Connection Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.network.getVirtualHubConnection({
        name: "example-connection",
        resourceGroupName: "example-resources",
        virtualHubName: "example-hub-name",
    });
    export const virtualHubConnectionId = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.network.get_virtual_hub_connection(name="example-connection",
        resource_group_name="example-resources",
        virtual_hub_name="example-hub-name")
    pulumi.export("virtualHubConnectionId", example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := network.LookupVirtualHubConnection(ctx, &network.LookupVirtualHubConnectionArgs{
    			Name:              "example-connection",
    			ResourceGroupName: "example-resources",
    			VirtualHubName:    "example-hub-name",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("virtualHubConnectionId", 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.GetVirtualHubConnection.Invoke(new()
        {
            Name = "example-connection",
            ResourceGroupName = "example-resources",
            VirtualHubName = "example-hub-name",
        });
    
        return new Dictionary<string, object?>
        {
            ["virtualHubConnectionId"] = example.Apply(getVirtualHubConnectionResult => getVirtualHubConnectionResult.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.GetVirtualHubConnectionArgs;
    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.getVirtualHubConnection(GetVirtualHubConnectionArgs.builder()
                .name("example-connection")
                .resourceGroupName("example-resources")
                .virtualHubName("example-hub-name")
                .build());
    
            ctx.export("virtualHubConnectionId", example.applyValue(getVirtualHubConnectionResult -> getVirtualHubConnectionResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:network:getVirtualHubConnection
          Arguments:
            name: example-connection
            resourceGroupName: example-resources
            virtualHubName: example-hub-name
    outputs:
      virtualHubConnectionId: ${example.id}
    

    Using getVirtualHubConnection

    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 getVirtualHubConnection(args: GetVirtualHubConnectionArgs, opts?: InvokeOptions): Promise<GetVirtualHubConnectionResult>
    function getVirtualHubConnectionOutput(args: GetVirtualHubConnectionOutputArgs, opts?: InvokeOptions): Output<GetVirtualHubConnectionResult>
    def get_virtual_hub_connection(name: Optional[str] = None,
                                   resource_group_name: Optional[str] = None,
                                   virtual_hub_name: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetVirtualHubConnectionResult
    def get_virtual_hub_connection_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[GetVirtualHubConnectionResult]
    func LookupVirtualHubConnection(ctx *Context, args *LookupVirtualHubConnectionArgs, opts ...InvokeOption) (*LookupVirtualHubConnectionResult, error)
    func LookupVirtualHubConnectionOutput(ctx *Context, args *LookupVirtualHubConnectionOutputArgs, opts ...InvokeOption) LookupVirtualHubConnectionResultOutput

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

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

    The following arguments are supported:

    Name string
    The name of the Connection which should be retrieved.
    ResourceGroupName string
    The Name of the Resource Group where the Virtual Hub Connection exists.
    VirtualHubName string
    The name of the Virtual Hub where this Connection exists.
    Name string
    The name of the Connection which should be retrieved.
    ResourceGroupName string
    The Name of the Resource Group where the Virtual Hub Connection exists.
    VirtualHubName string
    The name of the Virtual Hub where this Connection exists.
    name String
    The name of the Connection which should be retrieved.
    resourceGroupName String
    The Name of the Resource Group where the Virtual Hub Connection exists.
    virtualHubName String
    The name of the Virtual Hub where this Connection exists.
    name string
    The name of the Connection which should be retrieved.
    resourceGroupName string
    The Name of the Resource Group where the Virtual Hub Connection exists.
    virtualHubName string
    The name of the Virtual Hub where this Connection exists.
    name str
    The name of the Connection which should be retrieved.
    resource_group_name str
    The Name of the Resource Group where the Virtual Hub Connection exists.
    virtual_hub_name str
    The name of the Virtual Hub where this Connection exists.
    name String
    The name of the Connection which should be retrieved.
    resourceGroupName String
    The Name of the Resource Group where the Virtual Hub Connection exists.
    virtualHubName String
    The name of the Virtual Hub where this Connection exists.

    getVirtualHubConnection Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    InternetSecurityEnabled bool
    Whether Internet Security is enabled to secure internet traffic on this connection
    Name string
    The name which is used for this Static Route.
    RemoteVirtualNetworkId string
    The ID of the Virtual Network which the Virtual Hub is connected
    ResourceGroupName string
    Routings List<GetVirtualHubConnectionRouting>
    A routing block as defined below.
    VirtualHubId string
    The ID of the Virtual Hub within which this connection is created
    VirtualHubName string
    Id string
    The provider-assigned unique ID for this managed resource.
    InternetSecurityEnabled bool
    Whether Internet Security is enabled to secure internet traffic on this connection
    Name string
    The name which is used for this Static Route.
    RemoteVirtualNetworkId string
    The ID of the Virtual Network which the Virtual Hub is connected
    ResourceGroupName string
    Routings []GetVirtualHubConnectionRouting
    A routing block as defined below.
    VirtualHubId string
    The ID of the Virtual Hub within which this connection is created
    VirtualHubName string
    id String
    The provider-assigned unique ID for this managed resource.
    internetSecurityEnabled Boolean
    Whether Internet Security is enabled to secure internet traffic on this connection
    name String
    The name which is used for this Static Route.
    remoteVirtualNetworkId String
    The ID of the Virtual Network which the Virtual Hub is connected
    resourceGroupName String
    routings List<GetVirtualHubConnectionRouting>
    A routing block as defined below.
    virtualHubId String
    The ID of the Virtual Hub within which this connection is created
    virtualHubName String
    id string
    The provider-assigned unique ID for this managed resource.
    internetSecurityEnabled boolean
    Whether Internet Security is enabled to secure internet traffic on this connection
    name string
    The name which is used for this Static Route.
    remoteVirtualNetworkId string
    The ID of the Virtual Network which the Virtual Hub is connected
    resourceGroupName string
    routings GetVirtualHubConnectionRouting[]
    A routing block as defined below.
    virtualHubId string
    The ID of the Virtual Hub within which this connection is created
    virtualHubName string
    id str
    The provider-assigned unique ID for this managed resource.
    internet_security_enabled bool
    Whether Internet Security is enabled to secure internet traffic on this connection
    name str
    The name which is used for this Static Route.
    remote_virtual_network_id str
    The ID of the Virtual Network which the Virtual Hub is connected
    resource_group_name str
    routings Sequence[GetVirtualHubConnectionRouting]
    A routing block as defined below.
    virtual_hub_id str
    The ID of the Virtual Hub within which this connection is created
    virtual_hub_name str
    id String
    The provider-assigned unique ID for this managed resource.
    internetSecurityEnabled Boolean
    Whether Internet Security is enabled to secure internet traffic on this connection
    name String
    The name which is used for this Static Route.
    remoteVirtualNetworkId String
    The ID of the Virtual Network which the Virtual Hub is connected
    resourceGroupName String
    routings List<Property Map>
    A routing block as defined below.
    virtualHubId String
    The ID of the Virtual Hub within which this connection is created
    virtualHubName String

    Supporting Types

    GetVirtualHubConnectionRouting

    AssociatedRouteTableId string
    The ID of the route table associated with this Virtual Hub connection.
    InboundRouteMapId string
    The ID of the Route Map associated with this Routing Configuration for inbound learned routes.
    OutboundRouteMapId string
    The ID of the Route Map associated with this Routing Configuration for outbound advertised routes.
    PropagatedRouteTables List<GetVirtualHubConnectionRoutingPropagatedRouteTable>
    A propagated_route_table block as defined below.
    StaticVnetLocalRouteOverrideCriteria string
    The static VNet local route override criteria that is used to determine whether NVA in spoke VNet is bypassed for traffic with destination in spoke VNet.
    StaticVnetRoutes List<GetVirtualHubConnectionRoutingStaticVnetRoute>
    A static_vnet_route block as defined below.
    AssociatedRouteTableId string
    The ID of the route table associated with this Virtual Hub connection.
    InboundRouteMapId string
    The ID of the Route Map associated with this Routing Configuration for inbound learned routes.
    OutboundRouteMapId string
    The ID of the Route Map associated with this Routing Configuration for outbound advertised routes.
    PropagatedRouteTables []GetVirtualHubConnectionRoutingPropagatedRouteTable
    A propagated_route_table block as defined below.
    StaticVnetLocalRouteOverrideCriteria string
    The static VNet local route override criteria that is used to determine whether NVA in spoke VNet is bypassed for traffic with destination in spoke VNet.
    StaticVnetRoutes []GetVirtualHubConnectionRoutingStaticVnetRoute
    A static_vnet_route block as defined below.
    associatedRouteTableId String
    The ID of the route table associated with this Virtual Hub connection.
    inboundRouteMapId String
    The ID of the Route Map associated with this Routing Configuration for inbound learned routes.
    outboundRouteMapId String
    The ID of the Route Map associated with this Routing Configuration for outbound advertised routes.
    propagatedRouteTables List<GetVirtualHubConnectionRoutingPropagatedRouteTable>
    A propagated_route_table block as defined below.
    staticVnetLocalRouteOverrideCriteria String
    The static VNet local route override criteria that is used to determine whether NVA in spoke VNet is bypassed for traffic with destination in spoke VNet.
    staticVnetRoutes List<GetVirtualHubConnectionRoutingStaticVnetRoute>
    A static_vnet_route block as defined below.
    associatedRouteTableId string
    The ID of the route table associated with this Virtual Hub connection.
    inboundRouteMapId string
    The ID of the Route Map associated with this Routing Configuration for inbound learned routes.
    outboundRouteMapId string
    The ID of the Route Map associated with this Routing Configuration for outbound advertised routes.
    propagatedRouteTables GetVirtualHubConnectionRoutingPropagatedRouteTable[]
    A propagated_route_table block as defined below.
    staticVnetLocalRouteOverrideCriteria string
    The static VNet local route override criteria that is used to determine whether NVA in spoke VNet is bypassed for traffic with destination in spoke VNet.
    staticVnetRoutes GetVirtualHubConnectionRoutingStaticVnetRoute[]
    A static_vnet_route block as defined below.
    associated_route_table_id str
    The ID of the route table associated with this Virtual Hub connection.
    inbound_route_map_id str
    The ID of the Route Map associated with this Routing Configuration for inbound learned routes.
    outbound_route_map_id str
    The ID of the Route Map associated with this Routing Configuration for outbound advertised routes.
    propagated_route_tables Sequence[GetVirtualHubConnectionRoutingPropagatedRouteTable]
    A propagated_route_table block as defined below.
    static_vnet_local_route_override_criteria str
    The static VNet local route override criteria that is used to determine whether NVA in spoke VNet is bypassed for traffic with destination in spoke VNet.
    static_vnet_routes Sequence[GetVirtualHubConnectionRoutingStaticVnetRoute]
    A static_vnet_route block as defined below.
    associatedRouteTableId String
    The ID of the route table associated with this Virtual Hub connection.
    inboundRouteMapId String
    The ID of the Route Map associated with this Routing Configuration for inbound learned routes.
    outboundRouteMapId String
    The ID of the Route Map associated with this Routing Configuration for outbound advertised routes.
    propagatedRouteTables List<Property Map>
    A propagated_route_table block as defined below.
    staticVnetLocalRouteOverrideCriteria String
    The static VNet local route override criteria that is used to determine whether NVA in spoke VNet is bypassed for traffic with destination in spoke VNet.
    staticVnetRoutes List<Property Map>
    A static_vnet_route block as defined below.

    GetVirtualHubConnectionRoutingPropagatedRouteTable

    Labels List<string>
    The list of labels assigned to this route table.
    RouteTableIds List<string>
    A list of Route Table IDs associated with this Virtual Hub Connection.
    Labels []string
    The list of labels assigned to this route table.
    RouteTableIds []string
    A list of Route Table IDs associated with this Virtual Hub Connection.
    labels List<String>
    The list of labels assigned to this route table.
    routeTableIds List<String>
    A list of Route Table IDs associated with this Virtual Hub Connection.
    labels string[]
    The list of labels assigned to this route table.
    routeTableIds string[]
    A list of Route Table IDs associated with this Virtual Hub Connection.
    labels Sequence[str]
    The list of labels assigned to this route table.
    route_table_ids Sequence[str]
    A list of Route Table IDs associated with this Virtual Hub Connection.
    labels List<String>
    The list of labels assigned to this route table.
    routeTableIds List<String>
    A list of Route Table IDs associated with this Virtual Hub Connection.

    GetVirtualHubConnectionRoutingStaticVnetRoute

    AddressPrefixes List<string>
    A list of CIDR Ranges which is used as Address Prefixes.
    Name string
    The name of the Connection which should be retrieved.
    NextHopIpAddress string
    The IP Address which is used for the Next Hop.
    AddressPrefixes []string
    A list of CIDR Ranges which is used as Address Prefixes.
    Name string
    The name of the Connection which should be retrieved.
    NextHopIpAddress string
    The IP Address which is used for the Next Hop.
    addressPrefixes List<String>
    A list of CIDR Ranges which is used as Address Prefixes.
    name String
    The name of the Connection which should be retrieved.
    nextHopIpAddress String
    The IP Address which is used for the Next Hop.
    addressPrefixes string[]
    A list of CIDR Ranges which is used as Address Prefixes.
    name string
    The name of the Connection which should be retrieved.
    nextHopIpAddress string
    The IP Address which is used for the Next Hop.
    address_prefixes Sequence[str]
    A list of CIDR Ranges which is used as Address Prefixes.
    name str
    The name of the Connection which should be retrieved.
    next_hop_ip_address str
    The IP Address which is used for the Next Hop.
    addressPrefixes List<String>
    A list of CIDR Ranges which is used as Address Prefixes.
    name String
    The name of the Connection which should be retrieved.
    nextHopIpAddress String
    The IP Address which is used for the 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 Classic v5.80.0 published on Monday, Jun 10, 2024 by Pulumi