You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-network/virtual-network-service-endpoint-policies.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,16 +119,18 @@ $vnet = @{
119
119
$virtualNetwork = New-AzVirtualNetwork @vnet
120
120
```
121
121
122
-
Create a subnet in the virtual network. In this example, a subnet named *subnet-1* is created with a service endpoint for *Microsoft.Storage*:
122
+
Create a subnet configuration with [New-AzVirtualNetworkSubnetConfig](/powershell/module/az.network/new-azvirtualnetworksubnetconfig), and then write the subnet configuration to the virtual network with [Set-AzVirtualNetwork](/powershell/module/az.network/set-azvirtualnetwork). The following example adds a subnet named _subnet-1_ to the virtual network and creates the service endpoint for *Microsoft.Storage*.
Create a context for your storage account and key with [New-AzStorageContext](/powershell/module/az.storage/new-AzStoragecontext). The context encapsulates the storage account name and account key.
@@ -780,7 +782,7 @@ Use [New-AzServiceEndpointPolicy](/powershell/module/az.network/new-azserviceend
@@ -802,7 +804,7 @@ Create a service endpoint policy
802
804
```azurecli-interactive
803
805
az network service-endpoint policy create \
804
806
--resource-group test-rg \
805
-
--name sepolicy \
807
+
--name service-endpoint-policy \
806
808
--location eastus
807
809
```
808
810
@@ -811,7 +813,7 @@ Create and add a policy definition for allowing the previous Azure Storage accou
811
813
```azurecli-interactive
812
814
az network service-endpoint policy-definition create \
813
815
--resource-group test-rg \
814
-
--policy-name sepolicy \
816
+
--policy-name service-endpoint-policy \
815
817
--name policy-definition \
816
818
--service "Microsoft.Storage" \
817
819
--service-resources $serviceResourceId
@@ -865,7 +867,7 @@ az network vnet subnet update \
865
867
--resource-group test-rg \
866
868
--name subnet-1 \
867
869
--service-endpoints Microsoft.Storage \
868
-
--service-endpoint-policy sepolicy
870
+
--service-endpoint-policy service-endpoint-policy
869
871
```
870
872
871
873
---
@@ -925,7 +927,7 @@ To test network access to a storage account, deploy a VM in the subnet.
925
927
926
928
### [PowerShell](#tab/powershell)
927
929
928
-
Create a virtual machine in the *subnet-1* subnet with [New-AzVM](/powershell/module/az.compute/new-azvm). When running the command that follows, you're prompted for credentials. The values that you enter are configured as the user name and password for the VM. The `-AsJob` option creates the VM in the background, so that you can continue to the next step.
930
+
Create a virtual machine in the *subnet-1* subnet with [New-AzVM](/powershell/module/az.compute/new-azvm). When running the command that follows, you're prompted for credentials. The values that you enter are configured as the user name and password for the VM.
0 commit comments