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: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -146,6 +146,7 @@ For detailed troubleshooting of setup issues, see [Import Troubleshooting Guide]
146
146
|[General](./samples/general/README.md)| Basic demo of APIM sample setup and policy usage. | All infrastructures |
147
147
|[Load Balancing](./samples/load-balancing/README.md)| Priority and weighted load balancing across backends. | apim-aca, afd-apim (with ACA) |
148
148
|[Secure Blob Access](./samples/secure-blob-access/README.md)| Secure blob access via the [valet key pattern](https://learn.microsoft.com/azure/architecture/patterns/valet-key). | All infrastructures |
149
+
|[Azure Maps](./samples/azure-maps/README.md)| Proxying calls to Azure Maps with APIM policies. | All infrastructures |
Copy file name to clipboardExpand all lines: samples/azure-maps/README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,11 @@ This sample demonstrates how to use APIM to proxy requests to the Azure Maps ser
22
22
This lab sets up:
23
23
24
24
- An Azure Maps resource in Azure
25
-
- APIM managed identity with Storage Blob Data Reader permissions
25
+
- APIM managed identity with the following roles:
26
+
-**Azure Maps Search and Render Data Reader:** Grants the ability to call the apis and render the maps
27
+
-**Azure Maps Contributor:** Grants the ability to create the SAS Token from the APIM policy
28
+
- A User Assigned Managed Identity (UAMI) that is used as the principal id to emulate when creating the SAS Token for Azure Maps. It has the following roles asigned:
29
+
-**Azure Maps Search and Render Data Reader:** Grants the ability to call the apis and render the maps
26
30
- An API that demonstrates proxying requests to Azure Maps specific to APIs (geocode, search, etc.)
27
31
- Also in that api there will be an operation that demonstrates a generic path to Azure Maps
"api1 = API('map-api', 'Map API', '/map', 'This is the proxy for Azure Maps', operations=[mapApi_v2_default_get, mapApi_v1_async_post,mapApi_v2_geocode_get], tags = tags, serviceUrl=azure_maps_url)\n",
51
49
"\n",
52
-
"# API n\n",
53
-
"# ...\n",
54
-
"\n",
55
50
"# APIs Array\n",
56
51
"# apis: List[API] = [api1, apin]\n",
57
52
"apis: List[API] = [api1]\n",
58
53
"\n",
59
-
"# 4) Set up the named values\n",
54
+
"# 4) Set up the named values, for this specific sample, we are using some of the named values in the API policies defined above that can't be known at this point in the process. For those named values, we are setting them in the main.bicep file.\n",
"# 1) Issue a direct request to API Management\n",
131
-
"# reqsApim = ApimRequests(apim_gateway_url)\n",
132
-
"# reqsApim.singleGet('/request-headers', msg = 'Calling Request Headers API via API Management Gateway URL. Response codes 200 and 403 are both valid depending on the infrastructure used.')\n",
133
-
"\n",
134
-
"# # 2) Issue requests against Front Door.\n",
135
-
"# # Check if the infrastructure architecture deployment uses Azure Front Door.\n",
136
-
"# utils.print_message('Checking if the infrastructure architecture deployment uses Azure Front Door.', blank_above = True)\n",
Copy file name to clipboardExpand all lines: samples/azure-maps/main.bicep
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -147,6 +147,14 @@ module apisModule '../../shared/bicep/modules/apim/v1/api.bicep' = [for api in a
147
147
appInsightsId: appInsightsId
148
148
api: api
149
149
}
150
+
dependsOn: [
151
+
mapsSubscriptionKeyNamedValue
152
+
mapsClientIdNamedValue
153
+
userAssignedIdentityObjectIdNamedValue
154
+
subscriptionIdNamedValue
155
+
resourceGroupNamedValue
156
+
azureMapsResourceNamedValue
157
+
]
150
158
}]
151
159
152
160
// Grant APIM managed identity access to Azure Maps, here are the RBAC roles you might need: https://learn.microsoft.com/en-us/azure/azure-maps/azure-maps-authentication#picking-a-role-definition
0 commit comments