1. Packages
  2. Azure Native v2
  3. API Docs
  4. network
  5. VirtualHubBgpConnection
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.network.VirtualHubBgpConnection

Explore with Pulumi AI

These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

Virtual Appliance Site resource. Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.

Other available API versions: 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01, 2024-05-01.

Example Usage

VirtualHubRouteTableV2Put

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var virtualHubBgpConnection = new AzureNative.Network.VirtualHubBgpConnection("virtualHubBgpConnection", new()
    {
        ConnectionName = "conn1",
        HubVirtualNetworkConnection = new AzureNative.Network.Inputs.SubResourceArgs
        {
            Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubVirtualNetworkConnections/hubVnetConn1",
        },
        PeerAsn = 20000,
        PeerIp = "192.168.1.5",
        ResourceGroupName = "rg1",
        VirtualHubName = "hub1",
    });

});
Copy
package main

import (
	network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := network.NewVirtualHubBgpConnection(ctx, "virtualHubBgpConnection", &network.VirtualHubBgpConnectionArgs{
			ConnectionName: pulumi.String("conn1"),
			HubVirtualNetworkConnection: &network.SubResourceArgs{
				Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubVirtualNetworkConnections/hubVnetConn1"),
			},
			PeerAsn:           pulumi.Float64(20000),
			PeerIp:            pulumi.String("192.168.1.5"),
			ResourceGroupName: pulumi.String("rg1"),
			VirtualHubName:    pulumi.String("hub1"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.VirtualHubBgpConnection;
import com.pulumi.azurenative.network.VirtualHubBgpConnectionArgs;
import com.pulumi.azurenative.network.inputs.SubResourceArgs;
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) {
        var virtualHubBgpConnection = new VirtualHubBgpConnection("virtualHubBgpConnection", VirtualHubBgpConnectionArgs.builder()
            .connectionName("conn1")
            .hubVirtualNetworkConnection(SubResourceArgs.builder()
                .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubVirtualNetworkConnections/hubVnetConn1")
                .build())
            .peerAsn(20000)
            .peerIp("192.168.1.5")
            .resourceGroupName("rg1")
            .virtualHubName("hub1")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const virtualHubBgpConnection = new azure_native.network.VirtualHubBgpConnection("virtualHubBgpConnection", {
    connectionName: "conn1",
    hubVirtualNetworkConnection: {
        id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubVirtualNetworkConnections/hubVnetConn1",
    },
    peerAsn: 20000,
    peerIp: "192.168.1.5",
    resourceGroupName: "rg1",
    virtualHubName: "hub1",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

virtual_hub_bgp_connection = azure_native.network.VirtualHubBgpConnection("virtualHubBgpConnection",
    connection_name="conn1",
    hub_virtual_network_connection={
        "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubVirtualNetworkConnections/hubVnetConn1",
    },
    peer_asn=20000,
    peer_ip="192.168.1.5",
    resource_group_name="rg1",
    virtual_hub_name="hub1")
Copy
resources:
  virtualHubBgpConnection:
    type: azure-native:network:VirtualHubBgpConnection
    properties:
      connectionName: conn1
      hubVirtualNetworkConnection:
        id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubVirtualNetworkConnections/hubVnetConn1
      peerAsn: 20000
      peerIp: 192.168.1.5
      resourceGroupName: rg1
      virtualHubName: hub1
Copy

Create VirtualHubBgpConnection Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new VirtualHubBgpConnection(name: string, args: VirtualHubBgpConnectionArgs, opts?: CustomResourceOptions);
@overload
def VirtualHubBgpConnection(resource_name: str,
                            args: VirtualHubBgpConnectionArgs,
                            opts: Optional[ResourceOptions] = None)

@overload
def VirtualHubBgpConnection(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            resource_group_name: Optional[str] = None,
                            virtual_hub_name: Optional[str] = None,
                            connection_name: Optional[str] = None,
                            hub_virtual_network_connection: Optional[SubResourceArgs] = None,
                            id: Optional[str] = None,
                            name: Optional[str] = None,
                            peer_asn: Optional[float] = None,
                            peer_ip: Optional[str] = None)
func NewVirtualHubBgpConnection(ctx *Context, name string, args VirtualHubBgpConnectionArgs, opts ...ResourceOption) (*VirtualHubBgpConnection, error)
public VirtualHubBgpConnection(string name, VirtualHubBgpConnectionArgs args, CustomResourceOptions? opts = null)
public VirtualHubBgpConnection(String name, VirtualHubBgpConnectionArgs args)
public VirtualHubBgpConnection(String name, VirtualHubBgpConnectionArgs args, CustomResourceOptions options)
type: azure-native:network:VirtualHubBgpConnection
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. VirtualHubBgpConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. VirtualHubBgpConnectionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. VirtualHubBgpConnectionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. VirtualHubBgpConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. VirtualHubBgpConnectionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var virtualHubBgpConnectionResource = new AzureNative.Network.VirtualHubBgpConnection("virtualHubBgpConnectionResource", new()
{
    ResourceGroupName = "string",
    VirtualHubName = "string",
    ConnectionName = "string",
    HubVirtualNetworkConnection = 
    {
        { "id", "string" },
    },
    Id = "string",
    Name = "string",
    PeerAsn = 0,
    PeerIp = "string",
});
Copy
example, err := network.NewVirtualHubBgpConnection(ctx, "virtualHubBgpConnectionResource", &network.VirtualHubBgpConnectionArgs{
	ResourceGroupName: "string",
	VirtualHubName:    "string",
	ConnectionName:    "string",
	HubVirtualNetworkConnection: map[string]interface{}{
		"id": "string",
	},
	Id:      "string",
	Name:    "string",
	PeerAsn: 0,
	PeerIp:  "string",
})
Copy
var virtualHubBgpConnectionResource = new VirtualHubBgpConnection("virtualHubBgpConnectionResource", VirtualHubBgpConnectionArgs.builder()
    .resourceGroupName("string")
    .virtualHubName("string")
    .connectionName("string")
    .hubVirtualNetworkConnection(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .id("string")
    .name("string")
    .peerAsn(0)
    .peerIp("string")
    .build());
Copy
virtual_hub_bgp_connection_resource = azure_native.network.VirtualHubBgpConnection("virtualHubBgpConnectionResource",
    resource_group_name=string,
    virtual_hub_name=string,
    connection_name=string,
    hub_virtual_network_connection={
        id: string,
    },
    id=string,
    name=string,
    peer_asn=0,
    peer_ip=string)
Copy
const virtualHubBgpConnectionResource = new azure_native.network.VirtualHubBgpConnection("virtualHubBgpConnectionResource", {
    resourceGroupName: "string",
    virtualHubName: "string",
    connectionName: "string",
    hubVirtualNetworkConnection: {
        id: "string",
    },
    id: "string",
    name: "string",
    peerAsn: 0,
    peerIp: "string",
});
Copy
type: azure-native:network:VirtualHubBgpConnection
properties:
    connectionName: string
    hubVirtualNetworkConnection:
        id: string
    id: string
    name: string
    peerAsn: 0
    peerIp: string
    resourceGroupName: string
    virtualHubName: string
Copy

VirtualHubBgpConnection Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The VirtualHubBgpConnection resource accepts the following input properties:

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The resource group name of the VirtualHub.
VirtualHubName
This property is required.
Changes to this property will trigger replacement.
string
The name of the VirtualHub.
ConnectionName Changes to this property will trigger replacement. string
The name of the connection.
HubVirtualNetworkConnection Pulumi.AzureNative.Network.Inputs.SubResource
The reference to the HubVirtualNetworkConnection resource.
Id string
Resource ID.
Name string
Name of the connection.
PeerAsn double
Peer ASN.
PeerIp string
Peer IP.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The resource group name of the VirtualHub.
VirtualHubName
This property is required.
Changes to this property will trigger replacement.
string
The name of the VirtualHub.
ConnectionName Changes to this property will trigger replacement. string
The name of the connection.
HubVirtualNetworkConnection SubResourceArgs
The reference to the HubVirtualNetworkConnection resource.
Id string
Resource ID.
Name string
Name of the connection.
PeerAsn float64
Peer ASN.
PeerIp string
Peer IP.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The resource group name of the VirtualHub.
virtualHubName
This property is required.
Changes to this property will trigger replacement.
String
The name of the VirtualHub.
connectionName Changes to this property will trigger replacement. String
The name of the connection.
hubVirtualNetworkConnection SubResource
The reference to the HubVirtualNetworkConnection resource.
id String
Resource ID.
name String
Name of the connection.
peerAsn Double
Peer ASN.
peerIp String
Peer IP.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The resource group name of the VirtualHub.
virtualHubName
This property is required.
Changes to this property will trigger replacement.
string
The name of the VirtualHub.
connectionName Changes to this property will trigger replacement. string
The name of the connection.
hubVirtualNetworkConnection SubResource
The reference to the HubVirtualNetworkConnection resource.
id string
Resource ID.
name string
Name of the connection.
peerAsn number
Peer ASN.
peerIp string
Peer IP.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The resource group name of the VirtualHub.
virtual_hub_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the VirtualHub.
connection_name Changes to this property will trigger replacement. str
The name of the connection.
hub_virtual_network_connection SubResourceArgs
The reference to the HubVirtualNetworkConnection resource.
id str
Resource ID.
name str
Name of the connection.
peer_asn float
Peer ASN.
peer_ip str
Peer IP.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The resource group name of the VirtualHub.
virtualHubName
This property is required.
Changes to this property will trigger replacement.
String
The name of the VirtualHub.
connectionName Changes to this property will trigger replacement. String
The name of the connection.
hubVirtualNetworkConnection Property Map
The reference to the HubVirtualNetworkConnection resource.
id String
Resource ID.
name String
Name of the connection.
peerAsn Number
Peer ASN.
peerIp String
Peer IP.

Outputs

All input properties are implicitly available as output properties. Additionally, the VirtualHubBgpConnection resource produces the following output properties:

ConnectionState string
The current state of the VirtualHub to Peer.
Etag string
A unique read-only string that changes whenever the resource is updated.
Id string
The provider-assigned unique ID for this managed resource.
ProvisioningState string
The provisioning state of the resource.
Type string
Connection type.
ConnectionState string
The current state of the VirtualHub to Peer.
Etag string
A unique read-only string that changes whenever the resource is updated.
Id string
The provider-assigned unique ID for this managed resource.
ProvisioningState string
The provisioning state of the resource.
Type string
Connection type.
connectionState String
The current state of the VirtualHub to Peer.
etag String
A unique read-only string that changes whenever the resource is updated.
id String
The provider-assigned unique ID for this managed resource.
provisioningState String
The provisioning state of the resource.
type String
Connection type.
connectionState string
The current state of the VirtualHub to Peer.
etag string
A unique read-only string that changes whenever the resource is updated.
id string
The provider-assigned unique ID for this managed resource.
provisioningState string
The provisioning state of the resource.
type string
Connection type.
connection_state str
The current state of the VirtualHub to Peer.
etag str
A unique read-only string that changes whenever the resource is updated.
id str
The provider-assigned unique ID for this managed resource.
provisioning_state str
The provisioning state of the resource.
type str
Connection type.
connectionState String
The current state of the VirtualHub to Peer.
etag String
A unique read-only string that changes whenever the resource is updated.
id String
The provider-assigned unique ID for this managed resource.
provisioningState String
The provisioning state of the resource.
type String
Connection type.

Supporting Types

SubResource
, SubResourceArgs

Id string
Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
Id string
Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
id String
Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
id string
Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
id str
Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
id String
Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.

SubResourceResponse
, SubResourceResponseArgs

Id This property is required. string
Resource ID.
Id This property is required. string
Resource ID.
id This property is required. String
Resource ID.
id This property is required. string
Resource ID.
id This property is required. str
Resource ID.
id This property is required. String
Resource ID.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:network:VirtualHubBgpConnection conn1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi