Virtual Network Gateways - List Connections

Gets all the connections in a virtual network gateway.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/connections?api-version=2022-05-01

URI Parameters

Name In Required Type Description
resourceGroupName
path True
  • string

The name of the resource group.

subscriptionId
path True
  • string

The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

virtualNetworkGatewayName
path True
  • string

The name of the virtual network gateway.

api-version
query True
  • string

Client API version.

Responses

Name Type Description
200 OK

Request successful. The operation returns a list of VirtualNetworkGatewayConnection resource.

Other Status Codes

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

VirtualNetworkGatewaysListConnections

Sample Request

GET https://management.azure.com/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworkGateways/test-vpn-gateway-1/connections?api-version=2022-05-01

Sample Response

{
  "value": [
    {
      "name": "test-vpn-connection",
      "id": "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/connections/test-vpn-connection",
      "etag": "W/\\\"00000000-0000-0000-0000-000000000000\\\"",
      "type": "Microsoft.Network/connections",
      "location": "eastus",
      "properties": {
        "provisioningState": "Succeeded",
        "resourceGuid": "00000000-0000-0000-0000-000000000000",
        "virtualNetworkGateway1": {
          "id": "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworkGateways/test-vpn-gateway-1"
        },
        "virtualNetworkGateway2": {
          "id": "/subscriptions/subid/resourceGroups/testrg-2/providers/Microsoft.Network/virtualNetworkGateways/test-vpn-gateway-2"
        },
        "connectionType": "Vnet2Vnet",
        "routingWeight": 22,
        "enableBgp": true,
        "usePolicyBasedTrafficSelectors": false,
        "ipsecPolicies": [],
        "trafficSelectorPolicies": [],
        "ingressBytesTransferred": 0,
        "egressBytesTransferred": 0
      }
    }
  ]
}

Definitions

CloudError

An error response from the service.

CloudErrorBody

An error response from the service.

DhGroup

The DH Groups used in IKE Phase 1 for initial SA.

GatewayCustomBgpIpAddressIpConfiguration

GatewayCustomBgpIpAddressIpConfiguration for a virtual network gateway connection.

IkeEncryption

The IKE encryption algorithm (IKE phase 2).

IkeIntegrity

The IKE integrity algorithm (IKE phase 2).

IpsecEncryption

The IPSec encryption algorithm (IKE phase 1).

IpsecIntegrity

The IPSec integrity algorithm (IKE phase 1).

IpsecPolicy

An IPSec Policy configuration for a virtual network gateway connection.

PfsGroup

The Pfs Groups used in IKE Phase 2 for new child SA.

ProvisioningState

The current provisioning state.

SubResource

Reference to another subresource.

TrafficSelectorPolicy

An traffic selector policy for a virtual network gateway connection.

TunnelConnectionHealth

VirtualNetworkGatewayConnection properties.

VirtualNetworkConnectionGatewayReference

A reference to VirtualNetworkGateway or LocalNetworkGateway resource.

VirtualNetworkGatewayConnectionListEntity

A common class for general resource information.

VirtualNetworkGatewayConnectionMode

Gateway connection type.

VirtualNetworkGatewayConnectionProtocol

Connection protocol used for this connection.

VirtualNetworkGatewayConnectionStatus

Virtual Network Gateway connection status.

VirtualNetworkGatewayConnectionType

Gateway connection type.

VirtualNetworkGatewayListConnectionsResult

Response for the VirtualNetworkGatewayListConnections API service call.

CloudError

An error response from the service.

Name Type Description
error

Cloud error body.

CloudErrorBody

An error response from the service.

Name Type Description
code
  • string

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

details

A list of additional details about the error.

message
  • string

A message describing the error, intended to be suitable for display in a user interface.

target
  • string

The target of the particular error. For example, the name of the property in error.

DhGroup

The DH Groups used in IKE Phase 1 for initial SA.

Name Type Description
DHGroup1
  • string
DHGroup14
  • string
DHGroup2
  • string
DHGroup2048
  • string
DHGroup24
  • string
ECP256
  • string
ECP384
  • string
None
  • string

GatewayCustomBgpIpAddressIpConfiguration

GatewayCustomBgpIpAddressIpConfiguration for a virtual network gateway connection.

Name Type Description
customBgpIpAddress
  • string

The custom BgpPeeringAddress which belongs to IpconfigurationId.

ipConfigurationId
  • string

The IpconfigurationId of ipconfiguration which belongs to gateway.

IkeEncryption

The IKE encryption algorithm (IKE phase 2).

Name Type Description
AES128
  • string
AES192
  • string
AES256
  • string
DES
  • string
DES3
  • string
GCMAES128
  • string
GCMAES256
  • string

IkeIntegrity

The IKE integrity algorithm (IKE phase 2).

Name Type Description
GCMAES128
  • string
GCMAES256
  • string
MD5
  • string
SHA1
  • string
SHA256
  • string
SHA384
  • string

IpsecEncryption

The IPSec encryption algorithm (IKE phase 1).

Name Type Description
AES128
  • string
AES192
  • string
AES256
  • string
DES
  • string
DES3
  • string
GCMAES128
  • string
GCMAES192
  • string
GCMAES256
  • string
None
  • string

IpsecIntegrity

The IPSec integrity algorithm (IKE phase 1).

Name Type Description
GCMAES128
  • string
GCMAES192
  • string
GCMAES256
  • string
MD5
  • string
SHA1
  • string
SHA256
  • string

IpsecPolicy

An IPSec Policy configuration for a virtual network gateway connection.

Name Type Description
dhGroup

The DH Group used in IKE Phase 1 for initial SA.

ikeEncryption

The IKE encryption algorithm (IKE phase 2).

ikeIntegrity

The IKE integrity algorithm (IKE phase 2).

ipsecEncryption

The IPSec encryption algorithm (IKE phase 1).

ipsecIntegrity

The IPSec integrity algorithm (IKE phase 1).

pfsGroup

The Pfs Group used in IKE Phase 2 for new child SA.

saDataSizeKilobytes
  • integer

The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.

saLifeTimeSeconds
  • integer

The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.

PfsGroup

The Pfs Groups used in IKE Phase 2 for new child SA.

Name Type Description
ECP256
  • string
ECP384
  • string
None
  • string
PFS1
  • string
PFS14
  • string
PFS2
  • string
PFS2048
  • string
PFS24
  • string
PFSMM
  • string

ProvisioningState

The current provisioning state.

Name Type Description
Deleting
  • string
Failed
  • string
Succeeded
  • string
Updating
  • string

SubResource

Reference to another subresource.

Name Type Description
id
  • string

Resource ID.

TrafficSelectorPolicy

An traffic selector policy for a virtual network gateway connection.

Name Type Description
localAddressRanges
  • string[]

A collection of local address spaces in CIDR format.

remoteAddressRanges
  • string[]

A collection of remote address spaces in CIDR format.

TunnelConnectionHealth

VirtualNetworkGatewayConnection properties.

Name Type Description
connectionStatus

Virtual Network Gateway connection status.

egressBytesTransferred
  • integer

The Egress Bytes Transferred in this connection.

ingressBytesTransferred
  • integer

The Ingress Bytes Transferred in this connection.

lastConnectionEstablishedUtcTime
  • string

The time at which connection was established in Utc format.

tunnel
  • string

Tunnel name.

VirtualNetworkConnectionGatewayReference

A reference to VirtualNetworkGateway or LocalNetworkGateway resource.

Name Type Description
id
  • string

The ID of VirtualNetworkGateway or LocalNetworkGateway resource.

VirtualNetworkGatewayConnectionListEntity

A common class for general resource information.

Name Type Description
etag
  • string

A unique read-only string that changes whenever the resource is updated.

id
  • string

Resource ID.

location
  • string

Resource location.

name
  • string

Resource name.

properties.authorizationKey
  • string

The authorizationKey.

properties.connectionMode

The connection mode for this connection.

properties.connectionProtocol

Connection protocol used for this connection.

properties.connectionStatus

Virtual Network Gateway connection status.

properties.connectionType

Gateway connection type.

properties.egressBytesTransferred
  • integer

The egress bytes transferred in this connection.

properties.enableBgp
  • boolean

EnableBgp flag.

properties.enablePrivateLinkFastPath
  • boolean

Bypass the ExpressRoute gateway when accessing private-links. ExpressRoute FastPath (expressRouteGatewayBypass) must be enabled.

properties.expressRouteGatewayBypass
  • boolean

Bypass ExpressRoute Gateway for data forwarding.

properties.gatewayCustomBgpIpAddresses

GatewayCustomBgpIpAddresses to be used for virtual network gateway Connection.

properties.ingressBytesTransferred
  • integer

The ingress bytes transferred in this connection.

properties.ipsecPolicies

The IPSec Policies to be considered by this connection.

properties.localNetworkGateway2

The reference to local network gateway resource.

properties.peer

The reference to peerings resource.

properties.provisioningState

The provisioning state of the virtual network gateway connection resource.

properties.resourceGuid
  • string

The resource GUID property of the virtual network gateway connection resource.

properties.routingWeight
  • integer

The routing weight.

properties.sharedKey
  • string

The IPSec shared key.

properties.trafficSelectorPolicies

The Traffic Selector Policies to be considered by this connection.

properties.tunnelConnectionStatus

Collection of all tunnels' connection health status.

properties.usePolicyBasedTrafficSelectors
  • boolean

Enable policy-based traffic selectors.

properties.virtualNetworkGateway1

The reference to virtual network gateway resource.

properties.virtualNetworkGateway2

The reference to virtual network gateway resource.

tags
  • object

Resource tags.

type
  • string

Resource type.

VirtualNetworkGatewayConnectionMode

Gateway connection type.

Name Type Description
Default
  • string
InitiatorOnly
  • string
ResponderOnly
  • string

VirtualNetworkGatewayConnectionProtocol

Connection protocol used for this connection.

Name Type Description
IKEv1
  • string
IKEv2
  • string

VirtualNetworkGatewayConnectionStatus

Virtual Network Gateway connection status.

Name Type Description
Connected
  • string
Connecting
  • string
NotConnected
  • string
Unknown
  • string

VirtualNetworkGatewayConnectionType

Gateway connection type.

Name Type Description
ExpressRoute
  • string
IPsec
  • string
VPNClient
  • string
Vnet2Vnet
  • string

VirtualNetworkGatewayListConnectionsResult

Response for the VirtualNetworkGatewayListConnections API service call.

Name Type Description
nextLink
  • string

The URL to get the next set of results.

value

A list of VirtualNetworkGatewayConnection resources that exists in a resource group.