diff --git a/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/HealthResources.json b/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/HealthResources.json new file mode 100644 index 000000000000..24b3507974c2 --- /dev/null +++ b/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/HealthResources.json @@ -0,0 +1,45 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-01-01", + "title": "Schema of Health Resources events published to Azure Event Grid via Azure Resource Notifications", + "description": "Describes the schema of the Health Resources events published to Azure Event Grid. This corresponds to the Data property of an EventGridEvent." + }, + "paths": {}, + "definitions": { + "ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData": { + "description": "Schema of the Data property of an EventGridEvent for a Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged event.", + "type": "object", + "allOf": [ + { + "$ref": "./common.json#/definitions/ResourceNotificationsResourceUpdatedEventData" + } + ], + "x-ms-examples": { + "ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventGridSchema": { + "$ref": "./examples/event-grid-schema/HealthResources_AvailabilityStatusChanged.json" + }, + "ResourceNotificationsHealthResourcesAvailabilityStatusChangedCloudEventsSchema": { + "$ref": "./examples/cloud-events-schema/HealthResources_AvailabilityStatusChanged.json" + } + } + }, + "ResourceNotificationsHealthResourcesAnnotatedEventData": { + "description": "Schema of the Data property of an EventGridEvent for a Microsoft.ResourceNotifications.HealthResources.ResourceAnnotated event.", + "type": "object", + "allOf": [ + { + "$ref": "./common.json#/definitions/ResourceNotificationsResourceUpdatedEventData" + } + ], + "x-ms-examples": { + "ResourceNotificationsHealthResourcesAnnotatedEventGridSchema": { + "$ref": "./examples/event-grid-schema/HealthResources_ResourceAnnotated.json" + }, + "ResourceNotificationsHealthResourcesAnnotatedCloudEventsSchema": { + "$ref": "./examples/cloud-events-schema/HealthResources_ResourceAnnotated.json" + } + } + } + } +} diff --git a/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/common.json b/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/common.json new file mode 100644 index 000000000000..209ae4b9e221 --- /dev/null +++ b/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/common.json @@ -0,0 +1,75 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-01-01", + "title": "Schema of the common properties for Azure Resource Notifications (ARN) System topics", + "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." + }, + "paths": {}, + "definitions": { + "ResourceNotificationsResourceUpdatedDetails": { + "description": "Describes the schema of the properties under resource info which are common across all ARN system topic events", + "type": "object", + "properties": { + "id": { + "description": "id of the resource for which the event is being emitted", + "type": "string" + }, + "name": { + "description": "name of the resource for which the event is being emitted", + "type": "string" + }, + "type": { + "description": "the type of the resource for which the event is being emitted", + "type": "string" + }, + "location": { + "description": "the location of the resource for which the event is being emitted", + "type": "string" + }, + "tags": { + "description": "the tags on the resource for which the event is being emitted", + "type": "string" + }, + "properties": { + "description": "properties in the payload of the resource for which the event is being emitted", + "type": "object", + "additionalProperties": { + "description": "properties in the payload of the resource for which the event is being emitted" + } + } + } + }, + "ResourceNotificationsOperationalDetails": { + "description": "details of operational info", + "type": "object", + "properties": { + "resourceEventTime": { + "description": "Date and Time when resource was updated", + "type": "string", + "format": "date-time" + } + } + }, + "ResourceNotificationsResourceUpdatedEventData": { + "description": "Describes the schema of the common properties across all ARN system topic events", + "type": "object", + "properties": { + "resourceInfo": { + "description": "resourceInfo details for update event", + "$ref": "#/definitions/ResourceNotificationsResourceUpdatedDetails", + "x-ms-client-name": "resourceDetails" + }, + "operationalInfo": { + "description": "details about operational info", + "$ref": "#/definitions/ResourceNotificationsOperationalDetails", + "x-ms-client-name": "operationalDetails" + }, + "apiVersion": { + "description": "api version of the resource properties bag", + "type": "string" + } + } + } + } +} diff --git a/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/examples/cloud-events-schema/HealthResources_AvailabilityStatusChanged.json b/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/examples/cloud-events-schema/HealthResources_AvailabilityStatusChanged.json new file mode 100644 index 000000000000..914c5b6465de --- /dev/null +++ b/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/examples/cloud-events-schema/HealthResources_AvailabilityStatusChanged.json @@ -0,0 +1,26 @@ +{ + "id": "1fb6fa94-d965-4306-abeq-4810f0774e97", + "source": "/subscriptions/{subscription-id}", + "subject": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}", + "data": { + "resourceInfo": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}/providers/Microsoft.ResourceHealth/availabilityStatuses/{event-id}", + "name": "{event-id}", + "type": "Microsoft.ResourceHealth/availabilityStatuses", + "properties": { + "targetResourceId": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "occurredTime": "2023-07-24T19:20:37.9245071Z", + "previousAvailabilityState": "Unavailable", + "availabilityState": "Available" + } + }, + "operationalInfo": { + "resourceEventTime": "2023-07-24T19:20:37.9245071Z" + }, + "apiVersion": "2023-12-01" + }, + "type": "Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged", + "specversion": "1.0", + "time": "2023-07-24T19:20:37.9245071Z" +} diff --git a/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/examples/cloud-events-schema/HealthResources_ResourceAnnotated.json b/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/examples/cloud-events-schema/HealthResources_ResourceAnnotated.json new file mode 100644 index 000000000000..43c8b14073e0 --- /dev/null +++ b/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/examples/cloud-events-schema/HealthResources_ResourceAnnotated.json @@ -0,0 +1,29 @@ +{ + "id": "8945cf9b-e220-496e-ab4f-f3a239318995", + "source": "/subscriptions/{subscription-id}", + "subject": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}", + "data": { + "resourceInfo": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}/providers/Microsoft.ResourceHealth/resourceAnnotations/{event-id}", + "name": "{event-id}", + "type": "Microsoft.ResourceHealth/resourceAnnotations", + "properties": { + "targetResourceId": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "occurredTime": "2023-07-24T19:20:37.9245071Z", + "annotationName": "VirtualMachineDeallocationInitiated", + "reason": "Stopping and deallocating", + "summary": "This virtual machine is stopped and deallocated as requested by an authorized user or process.", + "context": "Customer Initiated", + "category": "Not Applicable" + } + }, + "operationalInfo": { + "resourceEventTime": "2023-07-24T19:20:37.9245071Z" + }, + "apiVersion": "2022-08-01" + }, + "type": "Microsoft.ResourceNotifications.HealthResources.ResourceAnnotated", + "specversion": "1.0", + "time": "2023-07-24T19:20:37.9245071Z" +} diff --git a/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/examples/event-grid-schema/HealthResources_AvailabilityStatusChanged.json b/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/examples/event-grid-schema/HealthResources_AvailabilityStatusChanged.json new file mode 100644 index 000000000000..9c473d51a714 --- /dev/null +++ b/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/examples/event-grid-schema/HealthResources_AvailabilityStatusChanged.json @@ -0,0 +1,27 @@ +{ + "id": "1fb6fa94-d965-4306-abeq-4810f0774e97", + "topic": "/subscriptions/{subscription-id}", + "subject": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}", + "data": { + "resourceInfo": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}/providers/Microsoft.ResourceHealth/availabilityStatuses/{event-id}", + "name": "{event-id}", + "type": "Microsoft.ResourceHealth/availabilityStatuses", + "properties": { + "targetResourceId": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "occurredTime": "2023-07-24T19:20:37.9245071Z", + "previousAvailabilityState": "Unavailable", + "availabilityState": "Available" + } + }, + "operationalInfo": { + "resourceEventTime": "2023-07-24T19:20:37.9245071Z" + }, + "apiVersion": "2023-12-01" + }, + "eventType": "Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged", + "dataVersion": "1", + "metadataVersion": "1", + "eventTime": "2023-07-24T19:20:37.9245071Z" +} diff --git a/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/examples/event-grid-schema/HealthResources_ResourceAnnotated.json b/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/examples/event-grid-schema/HealthResources_ResourceAnnotated.json new file mode 100644 index 000000000000..f5b4c5d189ce --- /dev/null +++ b/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/examples/event-grid-schema/HealthResources_ResourceAnnotated.json @@ -0,0 +1,30 @@ +{ + "id": "8945cf9b-e220-496e-ab4f-f3a239318995", + "topic": "/subscriptions/{subscription-id}", + "subject": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}", + "data": { + "resourceInfo": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}/providers/Microsoft.ResourceHealth/resourceAnnotations/{event-id}", + "name": "{event-id}", + "type": "Microsoft.ResourceHealth/resourceAnnotations", + "properties": { + "targetResourceId": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "occurredTime": "2023-07-24T19:20:37.9245071Z", + "annotationName": "VirtualMachineDeallocationInitiated", + "reason": "Stopping and deallocating", + "summary": "This virtual machine is stopped and deallocated as requested by an authorized user or process.", + "context": "Customer Initiated", + "category": "Not Applicable" + } + }, + "operationalInfo": { + "resourceEventTime": "2023-07-24T19:20:37.9245071Z" + }, + "apiVersion": "2022-08-01" + }, + "eventType": "Microsoft.ResourceNotifications.HealthResources.ResourceAnnotated", + "dataVersion": "1", + "metadataVersion": "1", + "eventTime": "2023-07-24T19:20:37.9245071Z" +} diff --git a/specification/eventgrid/data-plane/readme.md b/specification/eventgrid/data-plane/readme.md index 22e518fdd347..322d51669f36 100644 --- a/specification/eventgrid/data-plane/readme.md +++ b/specification/eventgrid/data-plane/readme.md @@ -140,7 +140,8 @@ input-file: - Microsoft.ContainerService/stable/2018-01-01/ContainerService.json - Microsoft.ApiManagement/stable/2018-01-01/APIManagement.json - Microsoft.HealthcareApis/stable/2018-01-01/HealthcareApis.json - +- Microsoft.ResourceNotifications/stable/2018-01-01/common.json +- Microsoft.ResourceNotifications/stable/2018-01-01/HealthResources.json ``` ### Tag: package-2023-06-01-preview @@ -172,7 +173,8 @@ input-file: - Microsoft.ContainerService/stable/2018-01-01/ContainerService.json - Microsoft.ApiManagement/stable/2018-01-01/APIManagement.json - Microsoft.HealthcareApis/stable/2018-01-01/HealthcareApis.json - +- Microsoft.ResourceNotifications/stable/2018-01-01/common.json +- Microsoft.ResourceNotifications/stable/2018-01-01/HealthResources.json ``` ### Suppression @@ -264,6 +266,8 @@ input-file: - $(this-folder)/Microsoft.ContainerService/stable/2018-01-01/ContainerService.json - $(this-folder)/Microsoft.ApiManagement/stable/2018-01-01/APIManagement.json - $(this-folder)/Microsoft.HealthcareApis/stable/2018-01-01/HealthcareApis.json + - $(this-folder)/Microsoft.ResourceNotifications/stable/2018-01-01/common.json + - $(this-folder)/Microsoft.ResourceNotifications/stable/2018-01-01/HealthResources.json ``` If there are files that should not be in the `all-api-versions` set,