Skip to content

Commit ae3905b

Browse files
author
gitName
committed
[APIM] Standard v2 - disable publicNetworkAccess
1 parent 833f5a9 commit ae3905b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

articles/api-management/private-endpoint.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ To optionally limit incoming traffic to the API Management instance only to priv
256256
> [!NOTE]
257257
> Public network access can only be disabled in API Management instances configured with a private endpoint, not with other networking configurations.
258258
259+
#### [Classic](#tab/classic)
260+
259261
To disable the public network access property using the Azure CLI, run the following [az apim update](/cli/azure/apim#az-apim-update) command, substituting the names of your API Management instance and resource group:
260262

261263
```azurecli
@@ -264,6 +266,22 @@ az apim update --name my-apim-service --resource-group my-resource-group --publi
264266

265267
You can also use the [API Management Service - Update](/rest/api/apimanagement/api-management-service/update) REST API to disable public network access, by setting the `publicNetworkAccess` property to `Disabled`.
266268

269+
#### [Standard v2](#tab/v2)
270+
271+
To disable the public network access property in a Standard v2 instance using the Azure CLI, run the following [az rest](/cli/azure/reference-index#az-rest) command.
272+
273+
274+
```azurecli
275+
SUBSCRIPTION_ID=<your-subscription-id>
276+
RESOURCE_GROUP=<your-resource-group>
277+
SERVICE_NAME=<your-api-management-service-name>
278+
279+
az rest --method patch \
280+
--uri "https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.ApiManagement/service/SERVICE_NAME?api-version=2024-05-01" \
281+
--body "{ \"properties\": { \"publicNetworkAccess\": \"Disabled\" } }"
282+
```
283+
---
284+
267285
## Validate private endpoint connection
268286

269287
After the private endpoint is created, confirm its DNS settings in the portal:

0 commit comments

Comments
 (0)