Virtual Routers - Get
Gets the specified Virtual Router.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}?api-version=2024-03-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}?api-version=2024-03-01&$expand={$expand}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
resource
|
path | True |
string |
The name of the resource group. |
subscription
|
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. |
virtual
|
path | True |
string |
The name of the Virtual Router. |
api-version
|
query | True |
string |
Client API version. |
$expand
|
query |
string |
Expands referenced resources. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Request successful. The operation returns a Virtual Router 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
Get VirtualRouter
Sample request
Sample response
{
"name": "virtualRouter",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualRouters/virtualRouter",
"type": "Microsoft.Network/virtualRouters",
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"location": "West US",
"tags": {
"key1": "value1"
},
"properties": {
"provisioningState": "Succeeded",
"virtualRouterAsn": 10000,
"virtualRouterIps": [
"192.168.1.1",
"192.168.1.2"
],
"hostedGateway": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vnetGateway"
},
"peerings": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualRouters/virtualRouter/peerings/peering1"
}
]
}
}
Definitions
Name | Description |
---|---|
Error |
Common error representation. |
Error |
Common error details representation. |
Provisioning |
The current provisioning state. |
Sub |
Reference to another subresource. |
Virtual |
VirtualRouter Resource. |
Error
Common error representation.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
details |
Error details. |
|
innerError |
string |
Inner error message. |
message |
string |
Error message. |
target |
string |
Error target. |
ErrorDetails
Common error details representation.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
message |
string |
Error message. |
target |
string |
Error target. |
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. |
VirtualRouter
VirtualRouter Resource.
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.hostedGateway |
The Gateway on which VirtualRouter is hosted. |
|
properties.hostedSubnet |
The Subnet on which VirtualRouter is hosted. |
|
properties.peerings |
List of references to VirtualRouterPeerings. |
|
properties.provisioningState |
The provisioning state of the resource. |
|
properties.virtualRouterAsn |
integer |
VirtualRouter ASN. |
properties.virtualRouterIps |
string[] |
VirtualRouter IPs. |
tags |
object |
Resource tags. |
type |
string |
Resource type. |