Skip to content

Commit

Permalink
Added AddressPrefixes on Subnet properties (#3714)
Browse files Browse the repository at this point in the history
* Added address prefixes to subnet

* Added example of multiple address prefixes.
  • Loading branch information
Am018 authored and jianghaolu committed Aug 24, 2018
1 parent 0cb6322 commit b45ebe6
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"parameters" : {
"api-version": "2018-08-01",
"subscriptionId" : "subid",
"resourceGroupName" : "rg1",
"virtualNetworkName" : "test-vnet",
"parameters": {
"properties": {
"addressSpace": {
"addressPrefixes": [
"10.0.0.0/16"
]
},
"subnets": [
{
"name": "test-2",
"properties": {
"addressPrefixes": [
"10.0.0.0/28",
"10.0.1.0/28"
]
}
}
]
}
}
},
"responses" : {
"200" : {
"body" : {
"name" : "test-vnet",
"id" : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet",
"type" : "Microsoft.Network/virtualNetworks",
"location" : "westus",
"properties" : {
"provisioningState" : "Succeeded",
"addressSpace" : {
"addressPrefixes" : [
"10.0.0.0/16"
]
},
"subnets": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-2",
"name": "test-2",
"properties": {
"addressPrefixes": [
"10.0.0.0/28",
"10.1.0.0/28"
],
"provisioningState": "Succeeded"
}
}
],
"virtualNetworkPeerings" : []
}
}
},
"201" : {
"body" : {
"name" : "test-vnet",
"id" : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet",
"type" : "Microsoft.Network/virtualNetworks",
"location" : "westus",
"properties" : {
"provisioningState" : "Succeeded",
"addressSpace" : {
"addressPrefixes" : [
"10.0.0.0/16"
]
},
"subnets": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-2",
"name": "test-2",
"properties": {
"addressPrefixes": [
"10.0.0.0/28",
"10.0.1.0/28"
],
"provisioningState": "Succeeded"
}
}
],
"virtualNetworkPeerings" : []
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@
"x-ms-examples": {
"Create virtual network": { "$ref": "./examples/VirtualNetworkCreate.json" },
"Create virtual network with subnet": { "$ref": "./examples/VirtualNetworkCreateSubnet.json" },
"Create virtual network with subnet containing address prefixes": { "$ref": "./examples/VirtualNetworkCreateSubnetWithAddressPrefixes.json" },
"Create virtual network with service endpoints": { "$ref": "./examples/VirtualNetworkCreateServiceEndpoints.json" }
}
},
Expand Down Expand Up @@ -866,6 +867,13 @@
"type": "string",
"description": "The address prefix for the subnet."
},
"addressPrefixes": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of address prefixes for the subnet."
},
"networkSecurityGroup": {
"$ref": "./networkSecurityGroup.json#/definitions/NetworkSecurityGroup",
"description": "The reference of the NetworkSecurityGroup resource."
Expand Down

0 comments on commit b45ebe6

Please sign in to comment.