From eb0dba3078ac7295764350fd831fe3d3bebedac5 Mon Sep 17 00:00:00 2001 From: savaradh <60020169+savaradh@users.noreply.github.com> Date: Mon, 29 Nov 2021 10:32:31 -0800 Subject: [PATCH] Update EventGrid Schema for Azure Container Registry (#16776) * Update EventGrid Schema for Azure Container Registry * prettier fix --- .../stable/2018-01-01/ContainerRegistry.json | 25 +++++++++++++++++ .../2018-01-01/examples/chart_deleted.json | 28 +++++++++++-------- .../2018-01-01/examples/chart_pushed.json | 28 +++++++++++-------- .../2018-01-01/examples/image_deleted.json | 6 +++- .../2018-01-01/examples/image_pushed.json | 6 +++- 5 files changed, 67 insertions(+), 26 deletions(-) diff --git a/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/ContainerRegistry.json b/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/ContainerRegistry.json index 3134035719b0..39d3eefff1ea 100644 --- a/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/ContainerRegistry.json +++ b/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/ContainerRegistry.json @@ -59,6 +59,10 @@ "description": "The action that encompasses the provided event.", "type": "string" }, + "location": { + "description": "The location of the event.", + "type": "string" + }, "target": { "$ref": "#/definitions/ContainerRegistryEventTarget", "description": "The target of the event." @@ -74,6 +78,10 @@ "source": { "$ref": "#/definitions/ContainerRegistryEventSource", "description": "The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it." + }, + "connectedRegistry": { + "$ref": "#/definitions/ContainerRegistryEventConnectedRegistry", + "description": "The connected registry information if the event is generated by a connected registry." } } }, @@ -93,9 +101,17 @@ "description": "The action that encompasses the provided event.", "type": "string" }, + "location": { + "description": "The location of the event.", + "type": "string" + }, "target": { "$ref": "#/definitions/ContainerRegistryArtifactEventTarget", "description": "The target of the event." + }, + "connectedRegistry": { + "$ref": "#/definitions/ContainerRegistryEventConnectedRegistry", + "description": "The connected registry information if the event is generated by a connected registry." } } }, @@ -214,6 +230,15 @@ "type": "string" } } + }, + "ContainerRegistryEventConnectedRegistry": { + "description": "The connected registry information if the event is generated by a connected registry.", + "properties": { + "name": { + "description": "The name of the connected registry that generated this event.", + "type": "string" + } + } } } } diff --git a/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/examples/chart_deleted.json b/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/examples/chart_deleted.json index 177ccc858fb0..344c5dd13f9e 100644 --- a/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/examples/chart_deleted.json +++ b/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/examples/chart_deleted.json @@ -5,19 +5,23 @@ "eventType": "Microsoft.ContainerRegistry.ChartDeleted", "eventTime": "019-03-12T22:42:08.7034064Z", "data": { - "id":"ea3a9c28-5b17-40f6-a500-3f02b682927", - "timestamp":"2019-03-12T22:42:08.3783775+00:00", - "action":"chart_delete", - "target":{ - "mediaType":"application/vnd.acr.helm.chart", - "size":25265, - "digest":"sha256:7f060075264b5ba7c14c23672698152ae6a3ebac1c47916e4efe19cd624d5fab", - "repository":"repo", - "tag":"mychart-1.0.0.tgz", - "name":"mychart", - "version":"1.0.0" + "id": "ea3a9c28-5b17-40f6-a500-3f02b682927", + "timestamp": "2019-03-12T22:42:08.3783775+00:00", + "action": "chart_delete", + "location": "westus", + "target": { + "mediaType": "application/vnd.acr.helm.chart", + "size": 25265, + "digest": "sha256:7f060075264b5ba7c14c23672698152ae6a3ebac1c47916e4efe19cd624d5fab", + "repository": "repo", + "tag": "mychart-1.0.0.tgz", + "name": "mychart", + "version": "1.0.0" + }, + "connectedRegistry": { + "name": "edge1" } }, - "dataVersion": "1.0", + "dataVersion": "2.0", "metadataVersion": "1" } diff --git a/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/examples/chart_pushed.json b/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/examples/chart_pushed.json index a1e8dfa86088..6f01984d2a0e 100644 --- a/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/examples/chart_pushed.json +++ b/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/examples/chart_pushed.json @@ -5,19 +5,23 @@ "eventType": "Microsoft.ContainerRegistry.ChartPushed", "eventTime": "2019-03-12T22:16:31.5164086Z", "data": { - "id":"ea3a9c28-5b17-40f6-a500-3f02b682927", - "timestamp":"2019-03-12T22:16:31.0087496+00:00", - "action":"chart_push", - "target":{ - "mediaType":"application/vnd.acr.helm.chart", - "size":25265, - "digest":"sha256:7f060075264b5ba7c14c23672698152ae6a3ebac1c47916e4efe19cd624d5fab", - "repository":"repo", - "tag":"mychart-1.0.0.tgz", - "name":"mychart", - "version":"1.0.0" + "id": "ea3a9c28-5b17-40f6-a500-3f02b682927", + "timestamp": "2019-03-12T22:16:31.0087496+00:00", + "action": "chart_push", + "location": "westus", + "target": { + "mediaType": "application/vnd.acr.helm.chart", + "size": 25265, + "digest": "sha256:7f060075264b5ba7c14c23672698152ae6a3ebac1c47916e4efe19cd624d5fab", + "repository": "repo", + "tag": "mychart-1.0.0.tgz", + "name": "mychart", + "version": "1.0.0" + }, + "connectedRegistry": { + "name": "edge1" } }, - "dataVersion": "1.0", + "dataVersion": "2.0", "metadataVersion": "1" } diff --git a/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/examples/image_deleted.json b/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/examples/image_deleted.json index b59aaf31547a..01903b5c09ab 100644 --- a/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/examples/image_deleted.json +++ b/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/examples/image_deleted.json @@ -7,6 +7,7 @@ "id": "6fdef14c-2594-41e8-9156-c0376eb0a190", "timestamp": "2021-09-08T06:49:40.1850248Z", "action": "delete", + "location": "westus", "target": { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "digest": "sha256:57a94fc99816c6aa225678b738ac40d85422e75dbb96115f1bb9b6ed77176166", @@ -17,9 +18,12 @@ "host": "jolovcr.azurecr.io", "method": "DELETE", "useragent": "python-requests/2.22.0" + }, + "connectedRegistry": { + "name": "edge1" } }, - "dataVersion": "1.0", + "dataVersion": "2.0", "metadataVersion": "1", "eventTime": "2021-09-08T06:49:40.5342401Z" } diff --git a/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/examples/image_pushed.json b/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/examples/image_pushed.json index 07ea5b036735..5202c3558877 100644 --- a/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/examples/image_pushed.json +++ b/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/examples/image_pushed.json @@ -7,6 +7,7 @@ "id": "c25fdb80-ebbd-4dd0-a29c-a7349e6388f6", "timestamp": "2021-09-08T06:37:45.4681009Z", "action": "push", + "location": "westus", "target": { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "size": 1153, @@ -20,9 +21,12 @@ "host": "jolovcr.azurecr.io", "method": "PUT", "useragent": "docker/20.10.7 go/go1.13.15 git-commit/b0f5bc3 kernel/5.10.16.3-microsoft-standard-WSL2 os/linux arch/amd64 UpstreamClient(Docker-Client/20.10.7 \\(windows\\))" + }, + "connectedRegistry": { + "name": "edge1" } }, - "dataVersion": "1.0", + "dataVersion": "2.0", "metadataVersion": "1", "eventTime": "2021-09-08T06:37:45.6609948Z" }