0

I am creating Application gateway using ARM templete now I want to check after select the virtual network subnet should not be allocated any other resource if allocated then show the message like Subnet must have only have Application Gateway.

enter image description here

DnyaneshSurya
  • 187
  • 1
  • 1
  • 14

1 Answers1

1

According to my understanding, you want to list all resources that are connected to the virtual network. If so, you can use the rest API Get Virtual Networks.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}}?api-version=2020-07-01

If one subnet has been allocated any other resource, it will return these configurations in subnet property. For more details, please refer to here.

For example

enter image description here

Jim Xu
  • 21,610
  • 2
  • 19
  • 39
  • Yes I agree with you and I am already using this API and managing validation Angular Side but I want to manage this API side so can you help how to Deserilize this in class of object . like Subnet is class and property like Name, Delegations, IpConfigurations and fetch the value from this result. – DnyaneshSurya Feb 19 '21 at 10:45