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/backends.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
@@ -334,3 +334,4 @@ Include a JSON snippet similar to the following in your ARM template for a load-
334
334
* Blog: [Using Azure API Management circuit breaker and load balancing with Azure OpenAI Service](https://techcommunity.microsoft.com/t5/fasttrack-for-azure/using-azure-api-management-circuit-breaker-and-load-balancing/ba-p/4041003)
335
335
* Set up a [Service Fabric backend](how-to-configure-service-fabric-backend.yml) using the Azure portal.
336
336
* Quickstart [Create a Backend Pool in Azure API Management using Bicep for load balance OpenAI requests](https://github.com/Azure-Samples/apim-lbpool-openai-quickstart)
337
+
* See [Azure API Management as an Event Grid source](/azure/event-grid/event-schema-api-management) for information about Event Grid events that are generated by the gateway when a circuit breaker is tripped or reset. Use these events to take action before backend issues escalate.
API Management integrates with [Azure Event Grid](../event-grid/overview.md) so that you can send event notifications to other services and trigger downstream processes. Event Grid is a fully managed event routing service that uses a publish-subscribe model. Event Grid has built-in support for Azure services like [Azure Functions](../azure-functions/functions-overview.md) and [Azure Logic Apps](../logic-apps/logic-apps-overview.md), and can deliver event alerts to non-Azure services using webhooks.
17
17
18
+
You can subscribe to the following types of API Management events:
19
+
20
+
***Control plane events**: These events are generated when you create, update, or delete certain API Management resources. For example, you can receive an event when a new user or new product is created in your API Management instance.
21
+
***Data plane events** (preview): These events are generated during operation of the API Management gateway. Currently, API Management can generate events for [backend circuit breakers](backends.md#circuit-breaker) and for the lifecycle of self-hosted gateway [access tokens](self-hosted-gateway-overview.md#authentication-options).
22
+
23
+
For a complete list of available events, see the [Event Grid schema for API Management](../event-grid/event-schema-api-management.md).
24
+
25
+
:::image type="content" source="media/how-to-event-grid/event-grid-intro.png" alt-text="Diagram of API Management integration with Event Grid.":::
26
+
18
27
For example, using integration with Event Grid, you can build an application that updates a database, creates a billing account, and sends an email notification each time a user is added to your API Management instance.
19
28
20
29
In this article, you subscribe to Event Grid events in your API Management instance, trigger events, and send the events to an endpoint that processes the data. To keep it simple, you send events to a sample web app that collects and displays the messages:
21
30
22
-
:::image type="content" source="media/how-to-event-grid/event-grid-viewer-intro.png" alt-text="API Management events in Event Grid viewer":::
- If you don't already have an API Management service, complete the following quickstart: [Create an Azure API Management instance](get-started-create-service-instance.md)
26
33
- Enable a [system-assigned managed identity](api-management-howto-use-managed-service-identity.md#create-a-system-assigned-managed-identity) in your API Management instance.
Copy file name to clipboardExpand all lines: articles/api-management/self-hosted-gateway-overview.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,6 +134,10 @@ To authenticate the connection between the self-hosted gateway and the cloud-bas
134
134
|[Microsoft Entra authentication](self-hosted-gateway-enable-azure-ad.md)| Configure one or more Microsoft Entra apps for access to gateway<br/><br/>Manage access separately per app<br/><br/>Configure longer expiry times for secrets in accordance with your organization's policies<br/><br/>Use standard Microsoft Entra procedures to assign or revoke user or group permissions to app and to rotate secrets<br/><br/> |
135
135
| Gateway access token (also called authentication key) | Token expires every 30 days at maximum and must be renewed in the containers<br/><br/>Backed by a gateway key that can be rotated independently (for example, to revoke access) <br/><br/>Regenerating gateway key invalidates all access tokens created with it |
136
136
137
+
> [!TIP]
138
+
> See [Azure API Management as an Event Grid source](/azure/event-grid/event-schema-api-management) for information about Event Grid events that are generated by a self-hosted gateway when a gateway access token is near expiry or has expired. Use these events to ensure that deployed gateways are always able to authenticate with their associated API Management instance.
139
+
140
+
137
141
### Connectivity failures
138
142
139
143
When connectivity to Azure is lost, the self-hosted gateway is unable to receive configuration updates, report its status, or upload telemetry.
The following example shows the schema of a gateway token expired event. The schema of a gateway token near expiry event is similar, but substitutes an `expiresAtUtc` property for the `expiredAtUtc` property.
@@ -196,12 +307,38 @@ An event has the following top-level data:
196
307
197
308
---
198
309
199
-
The data object has the following properties:
310
+
311
+
### Data object properties
312
+
313
+
314
+
#### Control plane events
315
+
316
+
The `data` object has the following properties for control plane events such as creating, updating, and deleting API Management resources.
200
317
201
318
| Property | Type | Description |
202
319
| -------- | ---- | ----------- |
203
320
|`resourceUri`| string | The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`|
204
321
322
+
#### Circuit breaker events
323
+
324
+
The `data` object has the following properties for circuit breaker events.
325
+
326
+
327
+
| Property | Type | Description |
328
+
| -------- | ---- | ----------- |
329
+
|`backendNme`| string | The name (ID) of the backend entity in which the circuit breaker is configured. |
330
+
|`circuitBreaker` | object | The circuit breaker configured in the backend, consisting of a `rules` object specifying the rule that tripped the backed. The rule has a `tripDuration` property in hh:mm:ss format specifying the duration for which the circuit breaker is tripped.
The `data` object has the following properties for self-hosted gateway authentication token events.
335
+
336
+
| Property | Type | Description |
337
+
| -------- | ---- | ----------- |
338
+
|`gatewayInfo`| object | The self-hosted gateway information, consisting of the following string properties:<br/><br/>*`gatewayId` - The fully qualified ID of the gateway resource<br/>*`instanceId` - Unique instance ID of the deployed gateway |
339
+
|`tokenInfo`| object | The token information, consisting of one of the following properties in the provider's UTC time:<br/><br/>*`expiresAtUtc` - for `GatewayTokenNearExpiry` event, or<br/>*`expiredAtUtc` - for `GatewayTokenExpired` event |
0 commit comments