We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi
azure.network.getVirtualHubConnection
Explore with Pulumi AI
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/v6/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.
- Resource
Group stringName - The Name of the Resource Group where the Virtual Hub Connection exists.
- Virtual
Hub stringName - The name of the Virtual Hub where this Connection exists.
- Name string
- The name of the Connection which should be retrieved.
- Resource
Group stringName - The Name of the Resource Group where the Virtual Hub Connection exists.
- Virtual
Hub stringName - The name of the Virtual Hub where this Connection exists.
- name String
- The name of the Connection which should be retrieved.
- resource
Group StringName - The Name of the Resource Group where the Virtual Hub Connection exists.
- virtual
Hub StringName - The name of the Virtual Hub where this Connection exists.
- name string
- The name of the Connection which should be retrieved.
- resource
Group stringName - The Name of the Resource Group where the Virtual Hub Connection exists.
- virtual
Hub stringName - The name of the Virtual Hub where this Connection exists.
- name str
- The name of the Connection which should be retrieved.
- resource_
group_ strname - The Name of the Resource Group where the Virtual Hub Connection exists.
- virtual_
hub_ strname - The name of the Virtual Hub where this Connection exists.
- name String
- The name of the Connection which should be retrieved.
- resource
Group StringName - The Name of the Resource Group where the Virtual Hub Connection exists.
- virtual
Hub StringName - 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.
- Internet
Security boolEnabled - Whether Internet Security is enabled to secure internet traffic on this connection
- Name string
- The name which is used for this Static Route.
- Remote
Virtual stringNetwork Id - The ID of the Virtual Network which the Virtual Hub is connected
- Resource
Group stringName - Routings
List<Get
Virtual Hub Connection Routing> - A
routing
block as defined below. - Virtual
Hub stringId - The ID of the Virtual Hub within which this connection is created
- Virtual
Hub stringName
- Id string
- The provider-assigned unique ID for this managed resource.
- Internet
Security boolEnabled - Whether Internet Security is enabled to secure internet traffic on this connection
- Name string
- The name which is used for this Static Route.
- Remote
Virtual stringNetwork Id - The ID of the Virtual Network which the Virtual Hub is connected
- Resource
Group stringName - Routings
[]Get
Virtual Hub Connection Routing - A
routing
block as defined below. - Virtual
Hub stringId - The ID of the Virtual Hub within which this connection is created
- Virtual
Hub stringName
- id String
- The provider-assigned unique ID for this managed resource.
- internet
Security BooleanEnabled - Whether Internet Security is enabled to secure internet traffic on this connection
- name String
- The name which is used for this Static Route.
- remote
Virtual StringNetwork Id - The ID of the Virtual Network which the Virtual Hub is connected
- resource
Group StringName - routings
List<Get
Virtual Hub Connection Routing> - A
routing
block as defined below. - virtual
Hub StringId - The ID of the Virtual Hub within which this connection is created
- virtual
Hub StringName
- id string
- The provider-assigned unique ID for this managed resource.
- internet
Security booleanEnabled - Whether Internet Security is enabled to secure internet traffic on this connection
- name string
- The name which is used for this Static Route.
- remote
Virtual stringNetwork Id - The ID of the Virtual Network which the Virtual Hub is connected
- resource
Group stringName - routings
Get
Virtual Hub Connection Routing[] - A
routing
block as defined below. - virtual
Hub stringId - The ID of the Virtual Hub within which this connection is created
- virtual
Hub stringName
- id str
- The provider-assigned unique ID for this managed resource.
- internet_
security_ boolenabled - 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_ strnetwork_ id - The ID of the Virtual Network which the Virtual Hub is connected
- resource_
group_ strname - routings
Sequence[Get
Virtual Hub Connection Routing] - A
routing
block as defined below. - virtual_
hub_ strid - The ID of the Virtual Hub within which this connection is created
- virtual_
hub_ strname
- id String
- The provider-assigned unique ID for this managed resource.
- internet
Security BooleanEnabled - Whether Internet Security is enabled to secure internet traffic on this connection
- name String
- The name which is used for this Static Route.
- remote
Virtual StringNetwork Id - The ID of the Virtual Network which the Virtual Hub is connected
- resource
Group StringName - routings List<Property Map>
- A
routing
block as defined below. - virtual
Hub StringId - The ID of the Virtual Hub within which this connection is created
- virtual
Hub StringName
Supporting Types
GetVirtualHubConnectionRouting
- Associated
Route stringTable Id - The ID of the route table associated with this Virtual Hub connection.
- Inbound
Route stringMap Id - The ID of the Route Map associated with this Routing Configuration for inbound learned routes.
- Outbound
Route stringMap Id - The ID of the Route Map associated with this Routing Configuration for outbound advertised routes.
- Propagated
Route List<GetTables Virtual Hub Connection Routing Propagated Route Table> - A
propagated_route_table
block as defined below. - Static
Vnet stringLocal Route Override Criteria - 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 List<GetRoutes Virtual Hub Connection Routing Static Vnet Route> - A
static_vnet_route
block as defined below.
- Associated
Route stringTable Id - The ID of the route table associated with this Virtual Hub connection.
- Inbound
Route stringMap Id - The ID of the Route Map associated with this Routing Configuration for inbound learned routes.
- Outbound
Route stringMap Id - The ID of the Route Map associated with this Routing Configuration for outbound advertised routes.
- Propagated
Route []GetTables Virtual Hub Connection Routing Propagated Route Table - A
propagated_route_table
block as defined below. - Static
Vnet stringLocal Route Override Criteria - 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 []GetRoutes Virtual Hub Connection Routing Static Vnet Route - A
static_vnet_route
block as defined below.
- associated
Route StringTable Id - The ID of the route table associated with this Virtual Hub connection.
- inbound
Route StringMap Id - The ID of the Route Map associated with this Routing Configuration for inbound learned routes.
- outbound
Route StringMap Id - The ID of the Route Map associated with this Routing Configuration for outbound advertised routes.
- propagated
Route List<GetTables Virtual Hub Connection Routing Propagated Route Table> - A
propagated_route_table
block as defined below. - static
Vnet StringLocal Route Override Criteria - 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 List<GetRoutes Virtual Hub Connection Routing Static Vnet Route> - A
static_vnet_route
block as defined below.
- associated
Route stringTable Id - The ID of the route table associated with this Virtual Hub connection.
- inbound
Route stringMap Id - The ID of the Route Map associated with this Routing Configuration for inbound learned routes.
- outbound
Route stringMap Id - The ID of the Route Map associated with this Routing Configuration for outbound advertised routes.
- propagated
Route GetTables Virtual Hub Connection Routing Propagated Route Table[] - A
propagated_route_table
block as defined below. - static
Vnet stringLocal Route Override Criteria - 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 GetRoutes Virtual Hub Connection Routing Static Vnet Route[] - A
static_vnet_route
block as defined below.
- associated_
route_ strtable_ id - The ID of the route table associated with this Virtual Hub connection.
- inbound_
route_ strmap_ id - The ID of the Route Map associated with this Routing Configuration for inbound learned routes.
- outbound_
route_ strmap_ id - The ID of the Route Map associated with this Routing Configuration for outbound advertised routes.
- propagated_
route_ Sequence[Gettables Virtual Hub Connection Routing Propagated Route Table] - A
propagated_route_table
block as defined below. - static_
vnet_ strlocal_ route_ override_ criteria - 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_ Sequence[Getroutes Virtual Hub Connection Routing Static Vnet Route] - A
static_vnet_route
block as defined below.
- associated
Route StringTable Id - The ID of the route table associated with this Virtual Hub connection.
- inbound
Route StringMap Id - The ID of the Route Map associated with this Routing Configuration for inbound learned routes.
- outbound
Route StringMap Id - The ID of the Route Map associated with this Routing Configuration for outbound advertised routes.
- propagated
Route List<Property Map>Tables - A
propagated_route_table
block as defined below. - static
Vnet StringLocal Route Override Criteria - 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 List<Property Map>Routes - A
static_vnet_route
block as defined below.
GetVirtualHubConnectionRoutingPropagatedRouteTable
- Labels List<string>
- The list of labels assigned to this route table.
- Route
Table List<string>Ids - A list of Route Table IDs associated with this Virtual Hub Connection.
- Labels []string
- The list of labels assigned to this route table.
- Route
Table []stringIds - A list of Route Table IDs associated with this Virtual Hub Connection.
- labels List<String>
- The list of labels assigned to this route table.
- route
Table List<String>Ids - A list of Route Table IDs associated with this Virtual Hub Connection.
- labels string[]
- The list of labels assigned to this route table.
- route
Table string[]Ids - 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_ Sequence[str]ids - A list of Route Table IDs associated with this Virtual Hub Connection.
- labels List<String>
- The list of labels assigned to this route table.
- route
Table List<String>Ids - A list of Route Table IDs associated with this Virtual Hub Connection.
GetVirtualHubConnectionRoutingStaticVnetRoute
- Address
Prefixes List<string> - A list of CIDR Ranges which is used as Address Prefixes.
- Name string
- The name of the Connection which should be retrieved.
- Next
Hop stringIp Address - The IP Address which is used for the Next Hop.
- Address
Prefixes []string - A list of CIDR Ranges which is used as Address Prefixes.
- Name string
- The name of the Connection which should be retrieved.
- Next
Hop stringIp Address - The IP Address which is used for the Next Hop.
- address
Prefixes List<String> - A list of CIDR Ranges which is used as Address Prefixes.
- name String
- The name of the Connection which should be retrieved.
- next
Hop StringIp Address - The IP Address which is used for the Next Hop.
- address
Prefixes string[] - A list of CIDR Ranges which is used as Address Prefixes.
- name string
- The name of the Connection which should be retrieved.
- next
Hop stringIp Address - 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_ strip_ address - The IP Address which is used for the Next Hop.
- address
Prefixes List<String> - A list of CIDR Ranges which is used as Address Prefixes.
- name String
- The name of the Connection which should be retrieved.
- next
Hop StringIp Address - 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.