Can anyone please guide me on how to achieve the below using python sdk which i have tested from powershell .
$vnet = @{
Name = 'myVNet'
ResourceGroupName = 'CreateVNetQS-rg'
Location = 'EastUS'
AddressPrefix = '10.0.0.0/16'
}
$virtualNetwork = New-AzVirtualNetwork @vnet
$subnet = @{
Name = 'default'
VirtualNetwork = $virtualNetwork
AddressPrefix = '10.0.0.0/24'
}
$subnetConfig = Add-AzVirtualNetworkSubnetConfig @subnet
$virtualNetwork | Set-AzVirtualNetwork
I have followed this document :
Reference:
You can change the parameters as per your requirement , for that you can refer the below references: