Network Watchers - Get Topology

Gets the current network topology by resource group.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/topology?api-version=2023-09-01

URI Parameters

Name In Required Type Description
networkWatcherName
path True

string

The name of the network watcher.

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.

api-version
query True

string

Client API version.

Request Body

Name Type Description
targetResourceGroupName

string

The name of the target resource group to perform topology on.

targetSubnet

SubResource

The reference to the Subnet resource.

targetVirtualNetwork

SubResource

The reference to the Virtual Network resource.

Responses

Name Type Description
200 OK

Topology

Request successful. The operation returns the topology of resource group.

Other Status Codes

ErrorResponse

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 Topology

Sample Request

POST https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1/topology?api-version=2023-09-01

{
  "targetResourceGroupName": "rg2"
}

Sample Response

{
  "id": "ce592f46-8164-4bf2-ad36-b8e4acf6fb68",
  "createdDateTime": "2017-08-02T19:31:55.9461781Z",
  "lastModified": "2017-05-27T00:00:13.2005337Z",
  "resources": [
    {
      "name": "MultiTierApp0",
      "id": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/MultiTierApp0",
      "location": "westus",
      "associations": [
        {
          "name": "appNic0",
          "resourceId": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/networkInterfaces/appNic0",
          "associationType": "Contains"
        },
        {
          "name": "appNic10",
          "resourceId": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/networkInterfaces/appNic10",
          "associationType": "Contains"
        }
      ]
    }
  ]
}

Definitions

Name Description
AssociationType

The association type of the child resource to the parent resource.

ErrorDetails

Common error details representation.

ErrorResponse

The error object.

SubResource

Reference to another subresource.

Topology

Topology of the specified resource group.

TopologyAssociation

Resources that have an association with the parent resource.

TopologyParameters

Parameters that define the representation of topology.

TopologyResource

The network resource topology information for the given resource group.

AssociationType

The association type of the child resource to the parent resource.

Name Type Description
Associated

string

Contains

string

ErrorDetails

Common error details representation.

Name Type Description
code

string

Error code.

message

string

Error message.

target

string

Error target.

ErrorResponse

The error object.

Name Type Description
error

ErrorDetails

Error
The error details object.

SubResource

Reference to another subresource.

Name Type Description
id

string

Resource ID.

Topology

Topology of the specified resource group.

Name Type Description
createdDateTime

string

The datetime when the topology was initially created for the resource group.

id

string

GUID representing the operation id.

lastModified

string

The datetime when the topology was last modified.

resources

TopologyResource[]

A list of topology resources.

TopologyAssociation

Resources that have an association with the parent resource.

Name Type Description
associationType

AssociationType

The association type of the child resource to the parent resource.

name

string

The name of the resource that is associated with the parent resource.

resourceId

string

The ID of the resource that is associated with the parent resource.

TopologyParameters

Parameters that define the representation of topology.

Name Type Description
targetResourceGroupName

string

The name of the target resource group to perform topology on.

targetSubnet

SubResource

The reference to the Subnet resource.

targetVirtualNetwork

SubResource

The reference to the Virtual Network resource.

TopologyResource

The network resource topology information for the given resource group.

Name Type Description
associations

TopologyAssociation[]

Holds the associations the resource has with other resources in the resource group.

id

string

ID of the resource.

location

string

Resource location.

name

string

Name of the resource.