Skip to content

Commit 83478f1

Browse files
Supriya-R-Dixitjnlycklama
authored andcommitted
including all json files and examples for system topics introduced by ARN (#25848)
* including all json and examples for system topics introduced by ARN * amended the readme file to include the json files for topic types * including all json files * included references to example json files * corrected the examles folder name * made changes to resources.json * included common.json for common properties across all ARN event types * testing $ref * testing $ref * changed $ref and braces around apiVersion * changed "DateTime" to "dateTime" * fixed dateTime * dateTime need a pattern with string * included format property for resourceeventtime * created a common properties event for deleted events * corrected the extra comma * fixed prettier formatting * corrected additionalproperties * added cloud event schema samples * renamed cloud events schema folder * changes to cloud event schema folder * included example for availability status changed under cloud events schema folder * ensured the eventdata has a verb in it * removed "azure" from the common events naming * changed names of the base event defintions * removed the type filed under additional properties * updated base event type names as suggested by reviewer * removed files related to resources and maintenance resources as they are not going public preview by 9/30 * removed references to maintenance and resources jsons * modified the base event structure according to feedback * fixed formatting issues. * edited description an description and removed few base events which are not currently needed * changed naming of the base event type as per feedback from Josh Love
1 parent 2dbe913 commit 83478f1

File tree

7 files changed

+238
-2
lines changed

7 files changed

+238
-2
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"version": "2018-01-01",
5+
"title": "Schema of Health Resources events published to Azure Event Grid via Azure Resource Notifications",
6+
"description": "Describes the schema of the Health Resources events published to Azure Event Grid. This corresponds to the Data property of an EventGridEvent."
7+
},
8+
"paths": {},
9+
"definitions": {
10+
"ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData": {
11+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged event.",
12+
"type": "object",
13+
"allOf": [
14+
{
15+
"$ref": "./common.json#/definitions/ResourceNotificationsResourceUpdatedEventData"
16+
}
17+
],
18+
"x-ms-examples": {
19+
"ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventGridSchema": {
20+
"$ref": "./examples/event-grid-schema/HealthResources_AvailabilityStatusChanged.json"
21+
},
22+
"ResourceNotificationsHealthResourcesAvailabilityStatusChangedCloudEventsSchema": {
23+
"$ref": "./examples/cloud-events-schema/HealthResources_AvailabilityStatusChanged.json"
24+
}
25+
}
26+
},
27+
"ResourceNotificationsHealthResourcesAnnotatedEventData": {
28+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ResourceNotifications.HealthResources.ResourceAnnotated event.",
29+
"type": "object",
30+
"allOf": [
31+
{
32+
"$ref": "./common.json#/definitions/ResourceNotificationsResourceUpdatedEventData"
33+
}
34+
],
35+
"x-ms-examples": {
36+
"ResourceNotificationsHealthResourcesAnnotatedEventGridSchema": {
37+
"$ref": "./examples/event-grid-schema/HealthResources_ResourceAnnotated.json"
38+
},
39+
"ResourceNotificationsHealthResourcesAnnotatedCloudEventsSchema": {
40+
"$ref": "./examples/cloud-events-schema/HealthResources_ResourceAnnotated.json"
41+
}
42+
}
43+
}
44+
}
45+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"version": "2018-01-01",
5+
"title": "Schema of the common properties for Azure Resource Notifications (ARN) System topics",
6+
"description": "Describes the schema of the the common properties across all topic types published by ARN to Azure Event Grid. This corresponds to the Data property of an EventGridEvent."
7+
},
8+
"paths": {},
9+
"definitions": {
10+
"ResourceNotificationsResourceUpdatedDetails": {
11+
"description": "Describes the schema of the properties under resource info which are common across all ARN system topic events",
12+
"type": "object",
13+
"properties": {
14+
"id": {
15+
"description": "id of the resource for which the event is being emitted",
16+
"type": "string"
17+
},
18+
"name": {
19+
"description": "name of the resource for which the event is being emitted",
20+
"type": "string"
21+
},
22+
"type": {
23+
"description": "the type of the resource for which the event is being emitted",
24+
"type": "string"
25+
},
26+
"location": {
27+
"description": "the location of the resource for which the event is being emitted",
28+
"type": "string"
29+
},
30+
"tags": {
31+
"description": "the tags on the resource for which the event is being emitted",
32+
"type": "string"
33+
},
34+
"properties": {
35+
"description": "properties in the payload of the resource for which the event is being emitted",
36+
"type": "object",
37+
"additionalProperties": {
38+
"description": "properties in the payload of the resource for which the event is being emitted"
39+
}
40+
}
41+
}
42+
},
43+
"ResourceNotificationsOperationalDetails": {
44+
"description": "details of operational info",
45+
"type": "object",
46+
"properties": {
47+
"resourceEventTime": {
48+
"description": "Date and Time when resource was updated",
49+
"type": "string",
50+
"format": "date-time"
51+
}
52+
}
53+
},
54+
"ResourceNotificationsResourceUpdatedEventData": {
55+
"description": "Describes the schema of the common properties across all ARN system topic events",
56+
"type": "object",
57+
"properties": {
58+
"resourceInfo": {
59+
"description": "resourceInfo details for update event",
60+
"$ref": "#/definitions/ResourceNotificationsResourceUpdatedDetails",
61+
"x-ms-client-name": "resourceDetails"
62+
},
63+
"operationalInfo": {
64+
"description": "details about operational info",
65+
"$ref": "#/definitions/ResourceNotificationsOperationalDetails",
66+
"x-ms-client-name": "operationalDetails"
67+
},
68+
"apiVersion": {
69+
"description": "api version of the resource properties bag",
70+
"type": "string"
71+
}
72+
}
73+
}
74+
}
75+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"id": "1fb6fa94-d965-4306-abeq-4810f0774e97",
3+
"source": "/subscriptions/{subscription-id}",
4+
"subject": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}",
5+
"data": {
6+
"resourceInfo": {
7+
"id": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}/providers/Microsoft.ResourceHealth/availabilityStatuses/{event-id}",
8+
"name": "{event-id}",
9+
"type": "Microsoft.ResourceHealth/availabilityStatuses",
10+
"properties": {
11+
"targetResourceId": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}",
12+
"targetResourceType": "Microsoft.Compute/virtualMachines",
13+
"occurredTime": "2023-07-24T19:20:37.9245071Z",
14+
"previousAvailabilityState": "Unavailable",
15+
"availabilityState": "Available"
16+
}
17+
},
18+
"operationalInfo": {
19+
"resourceEventTime": "2023-07-24T19:20:37.9245071Z"
20+
},
21+
"apiVersion": "2023-12-01"
22+
},
23+
"type": "Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged",
24+
"specversion": "1.0",
25+
"time": "2023-07-24T19:20:37.9245071Z"
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"id": "8945cf9b-e220-496e-ab4f-f3a239318995",
3+
"source": "/subscriptions/{subscription-id}",
4+
"subject": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}",
5+
"data": {
6+
"resourceInfo": {
7+
"id": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}/providers/Microsoft.ResourceHealth/resourceAnnotations/{event-id}",
8+
"name": "{event-id}",
9+
"type": "Microsoft.ResourceHealth/resourceAnnotations",
10+
"properties": {
11+
"targetResourceId": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}",
12+
"targetResourceType": "Microsoft.Compute/virtualMachines",
13+
"occurredTime": "2023-07-24T19:20:37.9245071Z",
14+
"annotationName": "VirtualMachineDeallocationInitiated",
15+
"reason": "Stopping and deallocating",
16+
"summary": "This virtual machine is stopped and deallocated as requested by an authorized user or process.",
17+
"context": "Customer Initiated",
18+
"category": "Not Applicable"
19+
}
20+
},
21+
"operationalInfo": {
22+
"resourceEventTime": "2023-07-24T19:20:37.9245071Z"
23+
},
24+
"apiVersion": "2022-08-01"
25+
},
26+
"type": "Microsoft.ResourceNotifications.HealthResources.ResourceAnnotated",
27+
"specversion": "1.0",
28+
"time": "2023-07-24T19:20:37.9245071Z"
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"id": "1fb6fa94-d965-4306-abeq-4810f0774e97",
3+
"topic": "/subscriptions/{subscription-id}",
4+
"subject": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}",
5+
"data": {
6+
"resourceInfo": {
7+
"id": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}/providers/Microsoft.ResourceHealth/availabilityStatuses/{event-id}",
8+
"name": "{event-id}",
9+
"type": "Microsoft.ResourceHealth/availabilityStatuses",
10+
"properties": {
11+
"targetResourceId": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}",
12+
"targetResourceType": "Microsoft.Compute/virtualMachines",
13+
"occurredTime": "2023-07-24T19:20:37.9245071Z",
14+
"previousAvailabilityState": "Unavailable",
15+
"availabilityState": "Available"
16+
}
17+
},
18+
"operationalInfo": {
19+
"resourceEventTime": "2023-07-24T19:20:37.9245071Z"
20+
},
21+
"apiVersion": "2023-12-01"
22+
},
23+
"eventType": "Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged",
24+
"dataVersion": "1",
25+
"metadataVersion": "1",
26+
"eventTime": "2023-07-24T19:20:37.9245071Z"
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"id": "8945cf9b-e220-496e-ab4f-f3a239318995",
3+
"topic": "/subscriptions/{subscription-id}",
4+
"subject": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}",
5+
"data": {
6+
"resourceInfo": {
7+
"id": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}/providers/Microsoft.ResourceHealth/resourceAnnotations/{event-id}",
8+
"name": "{event-id}",
9+
"type": "Microsoft.ResourceHealth/resourceAnnotations",
10+
"properties": {
11+
"targetResourceId": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}",
12+
"targetResourceType": "Microsoft.Compute/virtualMachines",
13+
"occurredTime": "2023-07-24T19:20:37.9245071Z",
14+
"annotationName": "VirtualMachineDeallocationInitiated",
15+
"reason": "Stopping and deallocating",
16+
"summary": "This virtual machine is stopped and deallocated as requested by an authorized user or process.",
17+
"context": "Customer Initiated",
18+
"category": "Not Applicable"
19+
}
20+
},
21+
"operationalInfo": {
22+
"resourceEventTime": "2023-07-24T19:20:37.9245071Z"
23+
},
24+
"apiVersion": "2022-08-01"
25+
},
26+
"eventType": "Microsoft.ResourceNotifications.HealthResources.ResourceAnnotated",
27+
"dataVersion": "1",
28+
"metadataVersion": "1",
29+
"eventTime": "2023-07-24T19:20:37.9245071Z"
30+
}

specification/eventgrid/data-plane/readme.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ input-file:
140140
- Microsoft.ContainerService/stable/2018-01-01/ContainerService.json
141141
- Microsoft.ApiManagement/stable/2018-01-01/APIManagement.json
142142
- Microsoft.HealthcareApis/stable/2018-01-01/HealthcareApis.json
143-
143+
- Microsoft.ResourceNotifications/stable/2018-01-01/common.json
144+
- Microsoft.ResourceNotifications/stable/2018-01-01/HealthResources.json
144145
```
145146

146147
### Tag: package-2023-06-01-preview
@@ -172,7 +173,8 @@ input-file:
172173
- Microsoft.ContainerService/stable/2018-01-01/ContainerService.json
173174
- Microsoft.ApiManagement/stable/2018-01-01/APIManagement.json
174175
- Microsoft.HealthcareApis/stable/2018-01-01/HealthcareApis.json
175-
176+
- Microsoft.ResourceNotifications/stable/2018-01-01/common.json
177+
- Microsoft.ResourceNotifications/stable/2018-01-01/HealthResources.json
176178
```
177179

178180
### Suppression
@@ -264,6 +266,8 @@ input-file:
264266
- $(this-folder)/Microsoft.ContainerService/stable/2018-01-01/ContainerService.json
265267
- $(this-folder)/Microsoft.ApiManagement/stable/2018-01-01/APIManagement.json
266268
- $(this-folder)/Microsoft.HealthcareApis/stable/2018-01-01/HealthcareApis.json
269+
- $(this-folder)/Microsoft.ResourceNotifications/stable/2018-01-01/common.json
270+
- $(this-folder)/Microsoft.ResourceNotifications/stable/2018-01-01/HealthResources.json
267271
```
268272

269273
If there are files that should not be in the `all-api-versions` set,

0 commit comments

Comments
 (0)