Skip to content

Commit

Permalink
Merge pull request #515 from ZengTaoxu/vnet-subnet03
Browse files Browse the repository at this point in the history
Update command model for `az network vnet subnet`
  • Loading branch information
necusjz authored Jul 2, 2024
2 parents 84b8bba + 769fa61 commit b091912
Show file tree
Hide file tree
Showing 10 changed files with 6,565 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Commands/network/vnet/subnet/_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,19 @@ Create a subnet and associate an existing NSG and route table.
```bash
network vnet subnet create -n MySubnet --vnet-name MyVnet -g MyResourceGroup --nat-gateway MyNatGateway --address-prefixes "10.0.0.0/21"
```

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

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

#### examples

- Create new subnet attached to an NSG with a custom route table.
```bash
network vnet subnet create -g MyResourceGroup --vnet-name MyVnet -n MySubnet --address-prefixes 10.0.0.0/24 --network-security-group MyNsg --route-table MyRouteTable
```

- Create new subnet attached to a NAT gateway.
```bash
network vnet subnet create -n MySubnet --vnet-name MyVnet -g MyResourceGroup --nat-gateway MyNatGateway --address-prefixes "10.0.0.0/21"
```
11 changes: 11 additions & 0 deletions Commands/network/vnet/subnet/_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,14 @@ Delete a subnet.
```bash
network vnet subnet delete --name MySubnet --resource-group MyResourceGroup --vnet-name MyVnet
```

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

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

#### examples

- Delete a subnet.
```bash
network vnet subnet delete --name MySubnet --resource-group MyResourceGroup --vnet-name MyVnet
```
11 changes: 11 additions & 0 deletions Commands/network/vnet/subnet/_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,14 @@ List the subnets in a virtual network.
```bash
network vnet subnet list -g MyResourceGroup --vnet-name MyVNet
```

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

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

#### examples

- List the subnets in a virtual network.
```bash
network vnet subnet list -g MyResourceGroup --vnet-name MyVNet
```
11 changes: 11 additions & 0 deletions Commands/network/vnet/subnet/_show.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,14 @@ Show details of a subnet.
```bash
network vnet subnet show -g MyResourceGroup -n MySubnet --vnet-name MyVNet
```

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

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

#### examples

- Show the details of a subnet associated with a virtual network.
```bash
network vnet subnet show -g MyResourceGroup -n MySubnet --vnet-name MyVNet
```
26 changes: 26 additions & 0 deletions Commands/network/vnet/subnet/_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,29 @@ Update a subnet.
```bash
network vnet subnet update -g MyResourceGroup --vnet-name MyVNet -n MySubnet --nsg null
```

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

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

#### examples

- Associate a network security group to a subnet.
```bash
network vnet subnet update -g MyResourceGroup -n MySubnet --vnet-name MyVNet --network-security-group MyNsg
```

- Update subnet with NAT gateway.
```bash
network vnet subnet update -n MySubnet --vnet-name MyVnet -g MyResourceGroup --nat-gateway MyNatGateway --address-prefixes "10.0.0.0/21"
```

- Disable the private endpoint network policies.
```bash
network vnet subnet update -n MySubnet --vnet-name MyVnet -g MyResourceGroup --private-endpoint-network-policies Disabled
```

- Detach a network security group in a subnet.
```bash
network vnet subnet update -g MyResourceGroup --vnet-name MyVNet -n MySubnet --nsg null
```
114 changes: 114 additions & 0 deletions Commands/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -112624,6 +112624,30 @@
"version": "2023-11-01"
}
]
},
{
"examples": [
{
"commands": [
"network vnet subnet create -g MyResourceGroup --vnet-name MyVnet -n MySubnet --address-prefixes 10.0.0.0/24 --network-security-group MyNsg --route-table MyRouteTable"
],
"name": "Create new subnet attached to an NSG with a custom route table."
},
{
"commands": [
"network vnet subnet create -n MySubnet --vnet-name MyVnet -g MyResourceGroup --nat-gateway MyNatGateway --address-prefixes \"10.0.0.0/21\""
],
"name": "Create new subnet attached to a NAT gateway."
}
],
"name": "2024-01-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}/subnets/{}",
"plane": "mgmt-plane",
"version": "2024-01-01"
}
]
}
]
},
Expand Down Expand Up @@ -112799,6 +112823,24 @@
"version": "2023-11-01"
}
]
},
{
"examples": [
{
"commands": [
"network vnet subnet delete --name MySubnet --resource-group MyResourceGroup --vnet-name MyVnet"
],
"name": "Delete a subnet."
}
],
"name": "2024-01-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}/subnets/{}",
"plane": "mgmt-plane",
"version": "2024-01-01"
}
]
}
]
},
Expand Down Expand Up @@ -112938,6 +112980,24 @@
"version": "2023-11-01"
}
]
},
{
"examples": [
{
"commands": [
"network vnet subnet list -g MyResourceGroup --vnet-name MyVNet"
],
"name": "List the subnets in a virtual network."
}
],
"name": "2024-01-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}/subnets",
"plane": "mgmt-plane",
"version": "2024-01-01"
}
]
}
]
},
Expand Down Expand Up @@ -113184,6 +113244,24 @@
"version": "2023-11-01"
}
]
},
{
"examples": [
{
"commands": [
"network vnet subnet show -g MyResourceGroup -n MySubnet --vnet-name MyVNet"
],
"name": "Show the details of a subnet associated with a virtual network."
}
],
"name": "2024-01-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}/subnets/{}",
"plane": "mgmt-plane",
"version": "2024-01-01"
}
]
}
]
},
Expand Down Expand Up @@ -113521,6 +113599,42 @@
"version": "2023-11-01"
}
]
},
{
"examples": [
{
"commands": [
"network vnet subnet update -g MyResourceGroup -n MySubnet --vnet-name MyVNet --network-security-group MyNsg"
],
"name": "Associate a network security group to a subnet."
},
{
"commands": [
"network vnet subnet update -n MySubnet --vnet-name MyVnet -g MyResourceGroup --nat-gateway MyNatGateway --address-prefixes \"10.0.0.0/21\""
],
"name": "Update subnet with NAT gateway."
},
{
"commands": [
"network vnet subnet update -n MySubnet --vnet-name MyVnet -g MyResourceGroup --private-endpoint-network-policies Disabled"
],
"name": "Disable the private endpoint network policies."
},
{
"commands": [
"network vnet subnet update -g MyResourceGroup --vnet-name MyVNet -n MySubnet --nsg null"
],
"name": "Detach a network security group in a subnet."
}
],
"name": "2024-01-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}/subnets/{}",
"plane": "mgmt-plane",
"version": "2024-01-01"
}
]
}
]
}
Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit b091912

Please sign in to comment.