Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
{
"swagger": "2.0",
"info": {
"version": "2018-01-01",
"title": "Schema of Azure API Management events published to Azure Event Grid",
"description": "Describes the schema of the Azure API Management events published to Azure Event Grid. This corresponds to the Data property of an EventGridEvent."
},
"paths": {},
"definitions": {
"ApiManagementUserCreatedEventData": {
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.UserCreated event.",
"type": "object",
"properties": {
"resourceUri": {
"description": "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>`",
"type": "string"
}
}
},
"ApiManagementUserUpdatedEventData": {
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.UserUpdated event.",
"type": "object",
"properties": {
"resourceUri": {
"description": "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>`",
"type": "string"
}
}
},
"ApiManagementUserDeletedEventData": {
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.UserDeleted event.",
"type": "object",
"properties": {
"resourceUri": {
"description": "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>`",
"type": "string"
}
}
},
"ApiManagementSubscriptionCreatedEventData": {
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.SubscriptionCreated event.",
"type": "object",
"properties": {
"resourceUri": {
"description": "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>`",
"type": "string"
}
}
},
"ApiManagementSubscriptionUpdatedEventData": {
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.SubscriptionUpdated event.",
"type": "object",
"properties": {
"resourceUri": {
"description": "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>`",
"type": "string"
}
}
},
"ApiManagementSubscriptionDeletedEventData": {
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.SubscriptionDeleted event.",
"type": "object",
"properties": {
"resourceUri": {
"description": "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>`",
"type": "string"
}
}
},
"ApiManagementProductCreatedEventData": {
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ProductCreated event.",
"type": "object",
"properties": {
"resourceUri": {
"description": "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>`",
"type": "string"
}
}
},
"ApiManagementProductUpdatedEventData": {
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ProductUpdated event.",
"type": "object",
"properties": {
"resourceUri": {
"description": "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>`",
"type": "string"
}
}
},
"ApiManagementProductDeletedEventData": {
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ProductDeleted event.",
"type": "object",
"properties": {
"resourceUri": {
"description": "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>`",
"type": "string"
}
}
},
"ApiManagementAPICreatedEventData": {
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.APICreated event.",
"type": "object",
"properties": {
"resourceUri": {
"description": "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>`",
"type": "string"
}
}
},
"ApiManagementAPIUpdatedEventData": {
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.APIUpdated event.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that for some events API is capitalized, and in other cases, it's spell Api (e.g. APIUpdated vs ApiReleaseUpdated) I just want to confirm that the difference in casing between these event is expected.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, curious about this - We would likely need to rename this via swagger transforms in .NET. It also seems odd that we have API (in whatever casing) twice in the name of the events.

Copy link
Member

@JoshLove-msft JoshLove-msft Sep 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that makes sense but the casing should be consistent, right?

We will have to transform it anyway to use "Api" everywhere if we leave it as "API" in the swagger.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ApiManagement is the name of our service that hosts "API" entities. API is an abbreviation so we normally spell it with all caps.
Renaming "ApiManagementAPI" to "ApiManagementApi" requires an extra rollout train to all our services. We prefer to stay as it is.

"type": "object",
"properties": {
"resourceUri": {
"description": "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>`",
"type": "string"
}
}
},
"ApiManagementAPIDeletedEventData": {
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.APIDeleted event.",
"type": "object",
"properties": {
"resourceUri": {
"description": "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>`",
"type": "string"
}
}
},
"ApiManagementAPIReleaseCreatedEventData": {
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ApiReleaseCreated event.",
"type": "object",
"properties": {
"resourceUri": {
"description": "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>`",
"type": "string"
}
}
},
"ApiManagementAPIReleaseUpdatedEventData": {
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ApiReleaseUpdated event.",
"type": "object",
"properties": {
"resourceUri": {
"description": "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>`",
"type": "string"
}
}
},
"ApiManagementAPIReleaseDeletedEventData": {
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ApiReleaseDeleted event.",
"type": "object",
"properties": {
"resourceUri": {
"description": "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>`",
"type": "string"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"id": "95015754-aa51-4eb6-98d9-9ee322b82ad7",
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
"subject": "/apis/myapi",
"data": {
"resourceUri": "/subscriptions/subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/apis/myapi"
},
"eventType": "Microsoft.ApiManagement.APICreated",
"dataVersion": "1",
"metadataVersion": "1",
"eventTime": "2021-07-12T23:13:44.9048323Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"id": "95015754-aa51-4eb6-98d9-9ee322b82ad7",
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
"subject": "/apis/myapi;Rev=1",
"data": {
"resourceUri": "/subscriptions/subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/apis/myapi;Rev=1"
},
"eventType": "Microsoft.ApiManagement.APIDeleted",
"dataVersion": "1",
"metadataVersion": "1",
"eventTime": "2021-07-12T23:13:44.9048323Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"id": "95015754-aa51-4eb6-98d9-9ee322b82ad7",
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
"subject": "/apis/myapi;Rev=1",
"data": {
"resourceUri": "/subscriptions/subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/apis/myapi;Rev=1"
},
"eventType": "Microsoft.ApiManagement.APIUpdated",
"dataVersion": "1",
"metadataVersion": "1",
"eventTime": "2021-07-12T23:13:44.9048323Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"id": "92c502f2-a966-42a7-a428-d3b319844544",
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
"subject": "/products/myproduct",
"data": {
"resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/products/myproduct"
},
"eventType": "Microsoft.ApiManagement.ProductCreated",
"dataVersion": "1",
"metadataVersion": "1",
"eventTime": "2021-07-02T00:47:47.8536532Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"id": "92c502f2-a966-42a7-a428-d3b319844544",
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
"subject": "/products/myproduct",
"data": {
"resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/products/myproduct"
},
"eventType": "Microsoft.ApiManagement.ProductDeleted",
"dataVersion": "1",
"metadataVersion": "1",
"eventTime": "2021-07-02T00:47:47.8536532Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"id": "92c502f2-a966-42a7-a428-d3b319844544",
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
"subject": "/products/myproduct",
"data": {
"resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/products/myproduct"
},
"eventType": "Microsoft.ApiManagement.ProductUpdated",
"dataVersion": "1",
"metadataVersion": "1",
"eventTime": "2021-07-02T00:47:47.8536532Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"id": "831e1650-001e-001b-66ab-eeb76e069631",
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
"subject": "/subscriptions/{subscriptionId}",
"data": {
"resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/subscriptions/{subscriptionId}"
},
"eventType": "Microsoft.ApiManagement.SubscriptionCreated",
"dataVersion": "1",
"metadataVersion": "1",
"eventTime": "2021-07-02T00:47:47.8536532Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"id": "831e1650-001e-001b-66ab-eeb76e069631",
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
"subject": "/subscriptions/{subscriptionId}",
"data": {
"resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/subscriptions/{subscriptionId}"
},
"eventType": "Microsoft.ApiManagement.SubscriptionDeleted",
"dataVersion": "1",
"metadataVersion": "1",
"eventTime": "2021-07-02T00:47:47.8536532Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"id": "831e1650-001e-001b-66ab-eeb76e069631",
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
"subject": "/subscriptions/{subscriptionId}",
"data": {
"resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/subscriptions/{subscriptionId}"
},
"eventType": "Microsoft.ApiManagement.SubscriptionUpdated",
"dataVersion": "1",
"metadataVersion": "1",
"eventTime": "2021-07-02T00:47:47.8536532Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"id": "92c502f2-a966-42a7-a428-d3b319844544",
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
"subject": "/users/apimuser-contoso-com",
"data": {
"resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/users/apimuser-contoso-com"
},
"eventType": "Microsoft.ApiManagement.UserCreated",
"dataVersion": "1",
"metadataVersion": "1",
"eventTime": "2021-07-02T00:47:47.8237532Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"id": "92c502f2-a966-42a7-a428-d3b319844544",
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
"subject": "/users/apimuser-contoso-com",
"data": {
"resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/users/apimuser-contoso-com"
},
"eventType": "Microsoft.ApiManagement.UserDeleted",
"dataVersion": "1",
"metadataVersion": "1",
"eventTime": "2021-07-02T00:47:47.8536532Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"id": "92c502f2-a966-42a7-a428-d3b319844544",
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
"subject": "/users/apimuser-contoso-com",
"data": {
"resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/users/apimuser-contoso-com"
},
"eventType": "Microsoft.ApiManagement.UserUpdated",
"dataVersion": "1",
"metadataVersion": "1",
"eventTime": "2021-07-02T00:47:48.8269769Z"
}
3 changes: 3 additions & 0 deletions specification/eventgrid/data-plane/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ input-file:
- Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json
- Microsoft.PolicyInsights/stable/2018-01-01/PolicyInsights.json
- Microsoft.ContainerService/stable/2018-01-01/ContainerService.json
- Microsoft.ApiManagement/stable/2018-01-01/APIManagement.json

```

### Suppression
Expand Down Expand Up @@ -227,6 +229,7 @@ input-file:
- $(this-folder)/Microsoft.Web/stable/2018-01-01/Web.json
- $(this-folder)/Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json
- $(this-folder)/Microsoft.ContainerService/stable/2018-01-01/ContainerService.json
- $(this-folder)/Microsoft.ApiManagement/stable/2018-01-01/APIManagement.json

```

Expand Down