다음을 통해 공유


Virtual Hubs - List

Lists all the VirtualHubs in a subscription.

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualHubs?api-version=2024-05-01

URI Parameters

Name In Required Type Description
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.

api-version
query True

string

Client API version.

Responses

Name Type Description
200 OK

ListVirtualHubsResult

Request successful. Returns the details of all the VirtualHubs in the subscription.

Other Status Codes

CloudError

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

VirtualHubList

Sample request

GET https://management.azure.com/subscriptions/subid/providers/Microsoft.Network/virtualHubs?api-version=2024-05-01

Sample response

{
  "value": [
    {
      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1",
      "etag": "w/\\00000000-0000-0000-0000-000000000000\\",
      "location": "West US",
      "name": "virtualHub1",
      "type": "Microsoft.Network/virtualHubs",
      "properties": {
        "provisioningState": "Succeeded",
        "virtualWan": {
          "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWans/virtualWan1"
        },
        "virtualHubRouteTableV2s": [
          {
            "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeTables/virtualHubRouteTable1",
            "etag": "w/\\00000000-0000-0000-0000-000000000000\\",
            "name": "rt2a",
            "properties": {
              "provisioningState": "Succeeded",
              "routes": [
                {
                  "destinationType": "CIDR",
                  "destinations": [
                    "20.10.0.0/16",
                    "20.20.0.0/16"
                  ],
                  "nextHopType": "IPAddress",
                  "nextHops": [
                    "10.0.0.68"
                  ]
                },
                {
                  "destinationType": "CIDR",
                  "destinations": [
                    "0.0.0.0/0"
                  ],
                  "nextHopType": "IPAddress",
                  "nextHops": [
                    "10.0.0.68"
                  ]
                }
              ],
              "attachedConnections": [
                "All_Vnets"
              ]
            }
          }
        ],
        "addressPrefix": "10.10.1.0/24",
        "sku": "Basic",
        "routingState": "Provisioned",
        "virtualRouterAsn": 65515,
        "virtualRouterIps": [
          "10.10.1.12",
          "10.10.1.13"
        ],
        "allowBranchToBranchTraffic": false,
        "preferredRoutingGateway": "ExpressRoute",
        "hubRoutingPreference": "ExpressRoute",
        "virtualRouterAutoScaleConfiguration": {
          "minCapacity": 2
        }
      }
    },
    {
      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub2",
      "etag": "w/\\00000000-0000-0000-0000-000000000000\\",
      "location": "East US",
      "name": "virtualHub2",
      "type": "Microsoft.Network/virtualHubs",
      "properties": {
        "provisioningState": "Succeeded",
        "virtualWan": {
          "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWans/virtualWan1"
        },
        "virtualHubRouteTableV2s": [
          {
            "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub2/routeTables/virtualHubRouteTable2",
            "etag": "w/\\00000000-0000-0000-0000-000000000000\\",
            "name": "rt2a",
            "properties": {
              "provisioningState": "Succeeded",
              "routes": [
                {
                  "destinationType": "CIDR",
                  "destinations": [
                    "20.10.0.0/16",
                    "20.20.0.0/16"
                  ],
                  "nextHopType": "IPAddress",
                  "nextHops": [
                    "10.0.0.68"
                  ]
                },
                {
                  "destinationType": "CIDR",
                  "destinations": [
                    "0.0.0.0/0"
                  ],
                  "nextHopType": "IPAddress",
                  "nextHops": [
                    "10.0.0.68"
                  ]
                }
              ],
              "attachedConnections": [
                "All_Vnets"
              ]
            }
          }
        ],
        "addressPrefix": "210.10.1.0/24",
        "sku": "Basic",
        "routingState": "Provisioned",
        "virtualRouterAsn": 65515,
        "virtualRouterIps": [
          "10.10.1.12",
          "10.10.1.13"
        ],
        "allowBranchToBranchTraffic": false,
        "preferredRoutingGateway": "ExpressRoute",
        "hubRoutingPreference": "ExpressRoute",
        "virtualRouterAutoScaleConfiguration": {
          "minCapacity": 2
        }
      }
    }
  ]
}

Definitions

Name Description
CloudError

An error response from the service.

CloudErrorBody

An error response from the service.

HubRoutingPreference

The hub routing preference gateway types

ListVirtualHubsResult

Result of the request to list VirtualHubs. It contains a list of VirtualHubs and a URL nextLink to get the next set of results.

PreferredRoutingGateway

The preferred routing gateway types

ProvisioningState

The current provisioning state.

RoutingState

The current routing state of the VirtualHub.

SubResource

Reference to another subresource.

VirtualHub

VirtualHub Resource.

VirtualHubRoute

VirtualHub route.

VirtualHubRouteTable

VirtualHub route table.

VirtualHubRouteTableV2

VirtualHubRouteTableV2 Resource.

VirtualHubRouteV2

VirtualHubRouteTableV2 route.

VirtualRouterAutoScaleConfiguration

The VirtualHub Router autoscale configuration.

CloudError

An error response from the service.

Name Type Description
error

CloudErrorBody

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

CloudErrorBody[]

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.

HubRoutingPreference

The hub routing preference gateway types

Name Type Description
ASPath

string

ExpressRoute

string

VpnGateway

string

ListVirtualHubsResult

Result of the request to list VirtualHubs. It contains a list of VirtualHubs and a URL nextLink to get the next set of results.

Name Type Description
nextLink

string

URL to get the next set of operation list results if there are any.

value

VirtualHub[]

List of VirtualHubs.

PreferredRoutingGateway

The preferred routing gateway types

Name Type Description
ExpressRoute

string

None

string

VpnGateway

string

ProvisioningState

The current provisioning state.

Name Type Description
Deleting

string

Failed

string

Succeeded

string

Updating

string

RoutingState

The current routing state of the VirtualHub.

Name Type Description
Failed

string

None

string

Provisioned

string

Provisioning

string

SubResource

Reference to another subresource.

Name Type Description
id

string

Resource ID.

VirtualHub

VirtualHub Resource.

Name Type Description
etag

string

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

id

string

Resource ID.

kind

string

Kind of service virtual hub. This is metadata used for the Azure portal experience for Route Server.

location

string

Resource location.

name

string

Resource name.

properties.addressPrefix

string

Address-prefix for this VirtualHub.

properties.allowBranchToBranchTraffic

boolean

Flag to control transit for VirtualRouter hub.

properties.azureFirewall

SubResource

The azureFirewall associated with this VirtualHub.

properties.bgpConnections

SubResource[]

List of references to Bgp Connections.

properties.expressRouteGateway

SubResource

The expressRouteGateway associated with this VirtualHub.

properties.hubRoutingPreference

HubRoutingPreference

The hubRoutingPreference of this VirtualHub.

properties.ipConfigurations

SubResource[]

List of references to IpConfigurations.

properties.p2SVpnGateway

SubResource

The P2SVpnGateway associated with this VirtualHub.

properties.preferredRoutingGateway

PreferredRoutingGateway

The preferred gateway to route on-prem traffic

properties.provisioningState

ProvisioningState

The provisioning state of the virtual hub resource.

properties.routeMaps

SubResource[]

List of references to RouteMaps.

properties.routeTable

VirtualHubRouteTable

The routeTable associated with this virtual hub.

properties.routingState

RoutingState

The routing state.

properties.securityPartnerProvider

SubResource

The securityPartnerProvider associated with this VirtualHub.

properties.securityProviderName

string

The Security Provider name.

properties.sku

string

The sku of this VirtualHub.

properties.virtualHubRouteTableV2s

VirtualHubRouteTableV2[]

List of all virtual hub route table v2s associated with this VirtualHub.

properties.virtualRouterAsn

integer

VirtualRouter ASN.

properties.virtualRouterAutoScaleConfiguration

VirtualRouterAutoScaleConfiguration

The VirtualHub Router autoscale configuration.

properties.virtualRouterIps

string[]

VirtualRouter IPs.

properties.virtualWan

SubResource

The VirtualWAN to which the VirtualHub belongs.

properties.vpnGateway

SubResource

The VpnGateway associated with this VirtualHub.

tags

object

Resource tags.

type

string

Resource type.

VirtualHubRoute

VirtualHub route.

Name Type Description
addressPrefixes

string[]

List of all addressPrefixes.

nextHopIpAddress

string

NextHop ip address.

VirtualHubRouteTable

VirtualHub route table.

Name Type Description
routes

VirtualHubRoute[]

List of all routes.

VirtualHubRouteTableV2

VirtualHubRouteTableV2 Resource.

Name Type Description
etag

string

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

id

string

Resource ID.

name

string

The name of the resource that is unique within a resource group. This name can be used to access the resource.

properties.attachedConnections

string[]

List of all connections attached to this route table v2.

properties.provisioningState

ProvisioningState

The provisioning state of the virtual hub route table v2 resource.

properties.routes

VirtualHubRouteV2[]

List of all routes.

VirtualHubRouteV2

VirtualHubRouteTableV2 route.

Name Type Description
destinationType

string

The type of destinations.

destinations

string[]

List of all destinations.

nextHopType

string

The type of next hops.

nextHops

string[]

NextHops ip address.

VirtualRouterAutoScaleConfiguration

The VirtualHub Router autoscale configuration.

Name Type Description
minCapacity

integer

The minimum number of scale units for VirtualHub Router.