Merge pull request #366 from necusjz/support-subnet-new-policies

update model for `az network vnet subnet`
This commit is contained in:
kai ru 2023-12-22 15:15:24 +08:00 коммит произвёл GitHub
Родитель 33ed762766 78eba61e3a
Коммит 870d247988
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
10 изменённых файлов: 6407 добавлений и 0 удалений

Просмотреть файл

@ -115,3 +115,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"
```
### [2023-09-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL3ZpcnR1YWxuZXR3b3Jrcy97fS9zdWJuZXRzL3t9/2023-09-01.xml) **Stable**
<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}/subnets/{} 2023-09-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"
```

Просмотреть файл

@ -80,3 +80,14 @@ Delete a subnet.
```bash
network vnet subnet delete --name MySubnet --resource-group MyResourceGroup --vnet-name MyVnet
```
### [2023-09-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL3ZpcnR1YWxuZXR3b3Jrcy97fS9zdWJuZXRzL3t9/2023-09-01.xml) **Stable**
<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}/subnets/{} 2023-09-01 -->
#### examples
- Delete a subnet.
```bash
network vnet subnet delete --name MySubnet --resource-group MyResourceGroup --vnet-name MyVnet
```

Просмотреть файл

@ -58,3 +58,14 @@ List the subnets in a virtual network.
```bash
network vnet subnet list -g MyResourceGroup --vnet-name MyVNet
```
### [2023-09-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL3ZpcnR1YWxuZXR3b3Jrcy97fS9zdWJuZXRz/2023-09-01.xml) **Stable**
<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}/subnets 2023-09-01 -->
#### examples
- List the subnets in a virtual network.
```bash
network vnet subnet list -g MyResourceGroup --vnet-name MyVNet
```

Просмотреть файл

@ -80,3 +80,14 @@ Show details of a subnet.
```bash
network vnet subnet show -g MyResourceGroup -n MySubnet --vnet-name MyVNet
```
### [2023-09-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL3ZpcnR1YWxuZXR3b3Jrcy97fS9zdWJuZXRzL3t9/2023-09-01.xml) **Stable**
<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}/subnets/{} 2023-09-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
```

Просмотреть файл

@ -185,3 +185,29 @@ Update a subnet.
```bash
network vnet subnet update -g MyResourceGroup --vnet-name MyVNet -n MySubnet --nsg null
```
### [2023-09-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL3ZpcnR1YWxuZXR3b3Jrcy97fS9zdWJuZXRzL3t9/2023-09-01.xml) **Stable**
<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}/subnets/{} 2023-09-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
```

Просмотреть файл

@ -79814,6 +79814,30 @@
"version": "2023-05-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": "2023-09-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}/subnets/{}",
"plane": "mgmt-plane",
"version": "2023-09-01"
}
]
}
]
},
@ -79953,6 +79977,24 @@
"version": "2023-05-01"
}
]
},
{
"examples": [
{
"commands": [
"network vnet subnet delete --name MySubnet --resource-group MyResourceGroup --vnet-name MyVnet"
],
"name": "Delete a subnet."
}
],
"name": "2023-09-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}/subnets/{}",
"plane": "mgmt-plane",
"version": "2023-09-01"
}
]
}
]
},
@ -80056,6 +80098,24 @@
"version": "2023-05-01"
}
]
},
{
"examples": [
{
"commands": [
"network vnet subnet list -g MyResourceGroup --vnet-name MyVNet"
],
"name": "List the subnets in a virtual network."
}
],
"name": "2023-09-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}/subnets",
"plane": "mgmt-plane",
"version": "2023-09-01"
}
]
}
]
},
@ -80266,6 +80326,24 @@
"version": "2023-05-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": "2023-09-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}/subnets/{}",
"plane": "mgmt-plane",
"version": "2023-09-01"
}
]
}
]
},
@ -80531,6 +80609,42 @@
"version": "2023-05-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": "2023-09-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}/subnets/{}",
"plane": "mgmt-plane",
"version": "2023-09-01"
}
]
}
]
}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны