@Thomas Stubergh You can use the Virtual Networks - List API to request the virtual networks in a resource group. The response has the ID value as shown below-
{
"value": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1",
"name": "vnet1",
"type": "Microsoft.Network/virtualNetworks",
"location": "westus",
"properties": {
"addressSpace": {
"addressPrefixes": [
"10.0.0.0/8"
]
}
You could also look into the built-in policy definitions as examples to understand how to build policies to achieve what you are looking for.
Please let me know if you need any further assistance and I will be glad to assist you further. Thank you!
- Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.