Skip to content

Commit

Permalink
Merge pull request #639 from cxznmhdcxz/ado30333573-vnet-IPAM
Browse files Browse the repository at this point in the history
[Network] `az network vnet create/update`: Add param `--ipam-pool-prefix-allocations`
  • Loading branch information
necusjz authored Dec 4, 2024
2 parents 9867f5a + ac3a818 commit 1ee44f1
Show file tree
Hide file tree
Showing 11 changed files with 8,005 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Commands/network/vnet/_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,24 @@ You may also create a subnet at the same time by specifying a subnet name and (o
```bash
network vnet create --address-prefixes 10.0.0.0/16 --name MyVirtualNetwork --resource-group MyResourceGroup --subnet-name MyAseSubnet --subnet-prefixes 10.0.0.0/24
```

### [2024-05-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL3ZpcnR1YWxuZXR3b3Jrcy97fQ==/2024-05-01.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{} 2024-05-01 -->

#### examples

- Create a virtual network with a specific address prefix and one subnet.
```bash
network vnet create -g MyResourceGroup -n MyVnet --address-prefix 10.0.0.0/16 --subnet-name MySubnet --subnet-prefixes 10.0.0.0/24
```

- Create a virtual network.
```bash
network vnet create --address-prefixes 10.0.0.0/16 --name MyVirtualNetwork --resource-group MyResourceGroup --subnet-name MyAseSubnet --subnet-prefixes 10.0.0.0/24
```

- Create virtual network with an IPAM pool allocation.
```bash
network vnet create -g MyResourceGroup -n MyVNet --ipam-allocations [0].number-of-ip-addresses=100 [0].id=ipam-pool-resource-id
```
11 changes: 11 additions & 0 deletions Commands/network/vnet/_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,14 @@ Delete a virtual network.
```bash
network vnet delete -g MyResourceGroup -n myVNet
```

### [2024-05-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL3ZpcnR1YWxuZXR3b3Jrcy97fQ==/2024-05-01.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{} 2024-05-01 -->

#### examples

- Delete a virtual network.
```bash
network vnet delete -g MyResourceGroup -n myVNet
```
22 changes: 22 additions & 0 deletions Commands/network/vnet/_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,25 @@ List virtual networks.
```bash
network vnet list --query "[?contains(addressSpace.addressPrefixes, '10.0.0.0/16')]"
```

### [2024-05-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL3ZpcnR1YWxuZXR3b3Jrcw==/2024-05-01.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/providers/microsoft.network/virtualnetworks 2024-05-01 -->
<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks 2024-05-01 -->

#### examples

- List all virtual networks in a subscription.
```bash
network vnet list
```

- List all virtual networks in a resource group.
```bash
network vnet list -g MyResourceGroup
```

- List virtual networks in a subscription which specify a certain address prefix.
```bash
network vnet list --query "[?contains(addressSpace.addressPrefixes, '10.0.0.0/16')]"
```
11 changes: 11 additions & 0 deletions Commands/network/vnet/_show.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,14 @@ Get the details of a virtual network.
```bash
network vnet show -g MyResourceGroup -n MyVNet
```

### [2024-05-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL3ZpcnR1YWxuZXR3b3Jrcy97fQ==/2024-05-01.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{} 2024-05-01 -->

#### examples

- Get details for MyVNet.
```bash
network vnet show -g MyResourceGroup -n MyVNet
```
21 changes: 21 additions & 0 deletions Commands/network/vnet/_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,24 @@ Update a virtual network.
```bash
network vnet update -g MyResourceGroup -n MyVNet --dns-servers null
```

### [2024-05-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL3ZpcnR1YWxuZXR3b3Jrcy97fQ==/2024-05-01.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{} 2024-05-01 -->

#### examples

- Update a virtual network with the IP address of a DNS server.
```bash
network vnet update -g MyResourceGroup -n MyVNet --dns-servers 10.2.0.8
```

- Update a virtual network.
```bash
network vnet update --address-prefixes 40.1.0.0/24 --name MyVNet --resource-group MyResourceGroup
```

- Update a virtual network to delete DNS server.
```bash
network vnet update -g MyResourceGroup -n MyVNet --dns-servers null
```
131 changes: 131 additions & 0 deletions Commands/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -141889,6 +141889,36 @@
"version": "2024-03-01"
}
]
},
{
"examples": [
{
"commands": [
"network vnet create -g MyResourceGroup -n MyVnet --address-prefix 10.0.0.0/16 --subnet-name MySubnet --subnet-prefixes 10.0.0.0/24"
],
"name": "Create a virtual network with a specific address prefix and one subnet."
},
{
"commands": [
"network vnet create --address-prefixes 10.0.0.0/16 --name MyVirtualNetwork --resource-group MyResourceGroup --subnet-name MyAseSubnet --subnet-prefixes 10.0.0.0/24"
],
"name": "Create a virtual network."
},
{
"commands": [
"network vnet create -g MyResourceGroup -n MyVNet --ipam-allocations [0].number-of-ip-addresses=100 [0].id=ipam-pool-resource-id"
],
"name": "Create virtual network with an IPAM pool allocation."
}
],
"name": "2024-05-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}",
"plane": "mgmt-plane",
"version": "2024-05-01"
}
]
}
]
},
Expand Down Expand Up @@ -141991,6 +142021,24 @@
"version": "2024-03-01"
}
]
},
{
"examples": [
{
"commands": [
"network vnet delete -g MyResourceGroup -n myVNet"
],
"name": "Delete a virtual network."
}
],
"name": "2024-05-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}",
"plane": "mgmt-plane",
"version": "2024-05-01"
}
]
}
]
},
Expand Down Expand Up @@ -142178,6 +142226,41 @@
"version": "2024-03-01"
}
]
},
{
"examples": [
{
"commands": [
"network vnet list"
],
"name": "List all virtual networks in a subscription."
},
{
"commands": [
"network vnet list -g MyResourceGroup"
],
"name": "List all virtual networks in a resource group."
},
{
"commands": [
"network vnet list --query \"[?contains(addressSpace.addressPrefixes, '10.0.0.0/16')]\""
],
"name": "List virtual networks in a subscription which specify a certain address prefix."
}
],
"name": "2024-05-01",
"resources": [
{
"id": "/subscriptions/{}/providers/microsoft.network/virtualnetworks",
"plane": "mgmt-plane",
"version": "2024-05-01"
},
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks",
"plane": "mgmt-plane",
"version": "2024-05-01"
}
]
}
]
},
Expand Down Expand Up @@ -142349,6 +142432,24 @@
"version": "2024-03-01"
}
]
},
{
"examples": [
{
"commands": [
"network vnet show -g MyResourceGroup -n MyVNet"
],
"name": "Get details for MyVNet."
}
],
"name": "2024-05-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}",
"plane": "mgmt-plane",
"version": "2024-05-01"
}
]
}
]
},
Expand Down Expand Up @@ -142511,6 +142612,36 @@
"version": "2024-03-01"
}
]
},
{
"examples": [
{
"commands": [
"network vnet update -g MyResourceGroup -n MyVNet --dns-servers 10.2.0.8"
],
"name": "Update a virtual network with the IP address of a DNS server."
},
{
"commands": [
"network vnet update --address-prefixes 40.1.0.0/24 --name MyVNet --resource-group MyResourceGroup"
],
"name": "Update a virtual network."
},
{
"commands": [
"network vnet update -g MyResourceGroup -n MyVNet --dns-servers null"
],
"name": "Update a virtual network to delete DNS server."
}
],
"name": "2024-05-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}",
"plane": "mgmt-plane",
"version": "2024-05-01"
}
]
}
]
}
Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit 1ee44f1

Please sign in to comment.