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/api-management/private-endpoint.md
+27-42Lines changed: 27 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ ms.service: azure-api-management
5
5
author: dlepow
6
6
ms.author: danlep
7
7
ms.topic: how-to
8
-
ms.date: 03/20/2023
8
+
ms.date: 09/19/2024
9
9
---
10
10
11
11
# Connect privately to API Management using an inbound private endpoint
@@ -33,10 +33,11 @@ You can configure an inbound [private endpoint](../private-link/private-endpoint
33
33
## Prerequisites
34
34
35
35
- An existing API Management instance. [Create one if you haven't already](get-started-create-service-instance.md).
36
-
- The API Management instance must be hosted on the [`stv2` compute platform](compute-infrastructure.md). For example, create a new instance or, if you already have an instance in the Premium service tier, enable [zone redundancy](../reliability/migrate-api-mgt.md).
36
+
- The API Management instance must be hosted on the [`stv2` compute platform](compute-infrastructure.md).
37
37
- Do not deploy (inject) the instance into an [external](api-management-using-with-vnet.md) or [internal](api-management-using-with-internal-vnet.md) virtual network.
38
38
- A virtual network and subnet to host the private endpoint. The subnet may contain other Azure resources.
39
39
- (Recommended) A virtual machine in the same or a different subnet in the virtual network, to test the private endpoint.
:::image type="content" source="media/private-endpoint/add-endpoint-from-instance.png" alt-text="Add a private endpoint using Azure portal":::
102
+
:::image type="content" source="media/private-endpoint/add-endpoint-from-instance.png" alt-text="Screenshot showing how to add a private endpoint using the Azure portal.":::
102
103
103
104
1. In the **Basics** tab of **Create a private endpoint**, enter or select the following information:
104
105
@@ -112,16 +113,16 @@ When you use the Azure portal to create a private endpoint, as shown in the next
112
113
| Network Interface Name | Enter a name for the network interface, such as *myInterface*|
113
114
| Region | Select a location for the private endpoint. It must be in the same region as your virtual network. It may differ from the region where your API Management instance is hosted. |
114
115
115
-
1. Select the **Resource** tab or the **Next: Resource** button at the bottom of the page. The following information about your API Management instance is already populated:
116
+
1. Select the **Next: Resource** button at the bottom of the screen. The following information about your API Management instance is already populated:
116
117
* Subscription
117
-
* Resource group
118
+
* Resource type
118
119
* Resource name
119
120
120
121
1. In **Resource**, in **Target sub-resource**, select **Gateway**.
121
122
122
-
:::image type="content" source="media/private-endpoint/create-private-endpoint.png" alt-text="Create a private endpoint in Azure portal":::
123
+
:::image type="content" source="media/private-endpoint/create-private-endpoint.png" alt-text="Screenshot showing settings to create a private endpoint in the Azure portal.":::
123
124
124
-
1. Select the **Virtual Network** tab or the **Next: Virtual Network** button at the bottom of the screen.
125
+
1. Select the **Next: Virtual Network** button at the bottom of the screen.
125
126
126
127
1. In **Networking**, enter or select this information:
127
128
@@ -132,7 +133,7 @@ When you use the Azure portal to create a private endpoint, as shown in the next
132
133
| Private IP configuration | In most cases, select **Dynamically allocate IP address.**|
133
134
| Application security group | Optionally select an [application security group](../virtual-network/application-security-groups.md). |
134
135
135
-
1. Select the **DNS** tab or the **Next: DNS** button at the bottom of the screen.
136
+
1. Select the **Next: DNS** button at the bottom of the screen.
136
137
137
138
1. In **Private DNS integration**, enter or select this information:
138
139
@@ -143,18 +144,15 @@ When you use the Azure portal to create a private endpoint, as shown in the next
143
144
| Resource group | Select your resource group. |
144
145
| Private DNS zones | The default value is displayed: **(new) privatelink.azure-api.net**.
145
146
146
-
1. Select the **Tags** tab or the **Next: Tabs** button at the bottom of the screen. If you desire, enter tags to organize your Azure resources.
147
+
1. Select the **Next: Tabs** button at the bottom of the screen. If you desire, enter tags to organize your Azure resources.
147
148
148
-
1.Select **Review + create**.
149
+
1. Select the **Next: Review + create** button at the bottom of the screen.
149
150
150
151
1. Select **Create**.
151
152
152
153
### List private endpoint connections to the instance
153
154
154
-
After the private endpoint is created, it appears in the list on the API Management instance's **Inbound private endpoint connections** page in the portal.
155
-
156
-
You can also use the [Private Endpoint Connection - List By Service](/rest/api/apimanagement/current-ga/private-endpoint-connection/list-by-service) REST API to list private endpoint connections to the service instance.
157
-
155
+
After the private endpoint is created and the service updated, it appears in the list on the API Management instance's **Inbound private endpoint connections** page in the portal.
158
156
159
157
160
158
Note the endpoint's **Connection status**:
@@ -166,47 +164,34 @@ Note the endpoint's **Connection status**:
166
164
167
165
If a private endpoint connection is in pending status, an owner of the API Management instance must manually approve it before it can be used.
168
166
169
-
If you have sufficient permissions, approve a private endpoint connection on the API Management instance's **Private endpoint connections** page in the portal.
167
+
If you have sufficient permissions, approve a private endpoint connection on the API Management instance's **Private endpoint connections** page in the portal. In the connection's context (...) menu, select **Approve**.
170
168
171
-
You can also use the API Management [Private Endpoint Connection - Create Or Update](/rest/api/apimanagement/current-ga/private-endpoint-connection/create-or-update) REST API.
172
-
173
-
```rest
174
-
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{apimServiceName}privateEndpointConnections/{privateEndpointConnectionName}?api-version=2021-08-01
175
-
```
169
+
You can also use the API Management [Private Endpoint Connection - Create Or Update](/rest/api/apimanagement/private-endpoint-connection/create-or-update) REST API to approve pending private endpoint connectionis.
176
170
177
171
### Optionally disable public network access
178
172
179
-
To optionally limit incoming traffic to the API Management instance only to private endpoints, disable public network access. Use the [API Management Service - Create Or Update](/rest/api/apimanagement/current-ga/api-management-service/create-or-update) REST API to set the `publicNetworkAccess` property to `Disabled`.
173
+
To optionally limit incoming traffic to the API Management instance only to private endpoints, disable public network access.
180
174
181
175
> [!NOTE]
182
-
> The `publicNetworkAccess` property can only be used to disable public access to API Management instances configured with a private endpoint, not with other networking configurations such as VNet injection.
176
+
> Public network access can only be disabled in API Management instances configured with a private endpoint, not with other networking configurations such as VNet injection.
183
177
184
-
```rest
185
-
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{apimServiceName}?api-version=2021-08-01
To disable public network access 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:
188
179
180
+
```azurecli
181
+
az apim update --name my-apim-service --resource-group my-resource-group --public-network-access false
189
182
```
190
-
Use the following JSON body:
191
-
192
-
```json
193
-
{
194
-
[...]
195
-
"properties": {
196
-
"publicNetworkAccess": "Disabled"
197
-
}
198
-
}
199
-
```
183
+
184
+
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`.
200
185
201
186
## Validate private endpoint connection
202
187
203
188
After the private endpoint is created, confirm its DNS settings in the portal:
204
189
205
190
1. Navigate to your API Management service in the [Azure portal](https://portal.azure.com/).
206
191
207
-
1. In the left-hand menu, select **Network** > **Inbound private endpoint connections**, and select the private endpoint you created.
192
+
1. In the left-hand menu, under **Deployment + infrastructure**, select **Network** > **Inbound private endpoint connections**, and select the private endpoint you created.
208
193
209
-
1. In the left-hand navigation, select **DNS configuration**.
194
+
1. In the left-hand navigation, under **Settings**, select **DNS configuration**.
210
195
211
196
1. Review the DNS records and IP address of the private endpoint. The IP address is a private address in the address space of the subnet where the private endpoint is configured.
212
197
@@ -226,19 +211,19 @@ API calls initiated within the virtual network to the default Gateway endpoint s
226
211
227
212
### Test from internet
228
213
229
-
From outside the private endpoint path, attempt to call the API Management instance's default Gateway endpoint. If public access is disabled, output will include an error with status code `403` and a message similar to:
214
+
From outside the private endpoint path, attempt to call the API Management instance's default Gateway endpoint. If public access is disabled, output includes an error with status code `403` and a message similar to:
230
215
231
216
```
232
217
Request originated from client public IP address xxx.xxx.xxx.xxx, public network access on this 'Microsoft.ApiManagement/service/my-apim-service' is disabled.
233
218
234
219
To connect to 'Microsoft.ApiManagement/service/my-apim-service', please use the Private Endpoint from inside your virtual network.
235
220
```
236
221
237
-
## Next steps
222
+
## Related content
238
223
239
224
* Use [policy expressions](api-management-policy-expressions.md#ref-context-request) with the `context.request` variable to identify traffic from the private endpoint.
240
225
* Learn more about [private endpoints](../private-link/private-endpoint-overview.md) and [Private Link](../private-link/private-link-overview.md), including [Private Link pricing](https://azure.microsoft.com/pricing/details/private-link/).
241
-
*Learn more about [managing private endpoint connections](../private-link/manage-private-endpoint.md).
* Use a [Resource Manager template](https://azure.microsoft.com/resources/templates/api-management-private-endpoint/) to create an API Management instance and a private endpoint with private DNS integration.
0 commit comments