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
# Integrate API Management in an internal virtual network with Application Gateway
@@ -52,7 +52,7 @@ To follow the steps described in this article, you must have:
52
52
53
53
## Scenario
54
54
55
-
In this article, you learn how to use a single API Management instance for internal and external consumers and make it act as a single front end for both on-premises and cloud APIs. You'll also understand how to expose only a subset of your APIs for external consumption by using routing functionality available in Application Gateway. In the example, the APIs are highlighted in green.
55
+
In this article, you learn how to use a single API Management instance for internal and external consumers and make it act as a single front end for both on-premises and cloud APIs. You'll create an API Management instance of the newer single-tenant version 2 (stv2) type. You'll also understand how to expose only a subset of your APIs for external consumption by using routing functionality available in Application Gateway. In the example, the APIs are highlighted in green.
56
56
57
57
In the first setup example, all your APIs are managed only from within your virtual network. Internal consumers can access all your internal and external APIs. Traffic never goes out to the internet. High-performance connectivity can be delivered via Azure ExpressRoute circuits. In the example, the internal consumers are highlighted in orange.
58
58
@@ -115,7 +115,7 @@ Resource Manager requires that all resource groups specify a location. This loca
115
115
116
116
The following example shows how to create a virtual network by using Resource Manager. The virtual network in this example consists of separate subnets for Application Gateway and API Management.
117
117
118
-
1. Create network security groups (NSGs) and NSG rules for the Application Gateway and API Management subnets.
118
+
1. Create a network security group (NSG) and NSG rules for the Application Gateway subnet.
1. Create a network security group (NSG) and NSG rules for the API Management subnet. [API Management stv2 requires several specific NSG rules](api-management-using-with-internal-vnet.md#enable-vnet-connection).
-AllocationMethod Static -Sku Standard -Force -DomainNameLabel "apim-contoso"
187
+
```
188
+
167
189
1. Create an API Management virtual network object by using the subnet `$apimSubnetData` you created.
168
190
169
191
```powershell
@@ -173,10 +195,13 @@ The following example shows how to create an API Management instance in a virtua
173
195
1. Create an API Management instance inside the virtual network. This example creates the service in the Developer service tier. Substitute a unique name for your API Management instance.
174
196
175
197
```powershell
198
+
$domain = "contoso.net"
176
199
$apimServiceName = "ContosoApi" # API Management service instance name, must be globally unique
It can take between 30 and 40 minutes to create and activate an API Management instance in this tier. After the previous command succeeds, see [DNS configuration required to access internal virtual network API Management service](api-management-using-with-internal-vnet.md#dns-configuration) to confirm access to it.
@@ -188,9 +213,9 @@ To set up custom domain names in API Management:
188
213
1. Initialize the following variables with the details of the certificates with private keys for the domains and the trusted root certificate. In this example, we use `api.contoso.net`, `portal.contoso.net`, and `management.contoso.net`.
189
214
190
215
```powershell
191
-
$gatewayHostname = "api.contoso.net" # API gateway host
192
-
$portalHostname = "portal.contoso.net" # API developer portal host
193
-
$managementHostname = "management.contoso.net" # API management endpoint host
216
+
$gatewayHostname = "api.$domain" # API gateway host
217
+
$portalHostname = "portal.$domain" # API developer portal host
218
+
$managementHostname = "management.$domain" # API management endpoint host
194
219
$gatewayCertPfxPath = "C:\Users\Contoso\gateway.pfx" # Full path to api.contoso.net .pfx file
195
220
$portalCertPfxPath = "C:\Users\Contoso\portal.pfx" # Full path to portal.contoso.net .pfx file
196
221
$managementCertPfxPath = "C:\Users\Contoso\management.pfx" # Full path to management.contoso.net .pfx file
@@ -232,8 +257,8 @@ To configure a private DNS zone for DNS resolution in the virtual network:
232
257
1. Create a private DNS zone and link the virtual network.
0 commit comments