-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
swagger changes for containerservice event resources (#31271)
* swagger changes for containerservice event resources * included containerserviceeventresources json file in readme * changed event type name per discussion with API reviewers from ResourceNotificationsContainerServiceEventResourcesScheduledEventEmittedEventData to ResourceNotificationsContainerServiceEventResourcesScheduledEventData * included typespec files for scheduledeventemitted event type for containerserviceeventresources system topic * included the containerserviceeventresources typespec file in main.tsp for generating the swaggers
- Loading branch information
1 parent
6d1ddf2
commit e089938
Showing
10 changed files
with
173 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
...EventGrid.SystemEvents/Microsoft.ResourceNotifications/ContainerServiceEventResources.tsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import "@typespec/versioning"; | ||
import "./common.tsp"; | ||
using TypeSpec.Versioning; | ||
|
||
/** | ||
Describes the schema of the Container Service events published to Azure | ||
Event Grid. This corresponds to the Data property of an EventGridEvent. | ||
*/ | ||
namespace Microsoft.EventGrid.SystemEvents; | ||
|
||
/** | ||
Schema of the Data property of an event grid event for a Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted preview event. | ||
*/ | ||
#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "Maintain compatibility with existing models." | ||
model ResourceNotificationsContainerServiceEventResourcesScheduledEventData | ||
extends ResourceNotificationsResourceUpdatedEventData {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...ystemEvents/examples/2024-01-01/ContainerServiceEventResources_ScheduledEventEmitted.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"id": "5bdb52cf-5489-4845-86c8-7fe94a4fc6c1", | ||
"source": "/subscriptions/{subscription-id}", | ||
"subject": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.ContainerService/managedClusters/{managedcluster-name}/scheduledEvents/{event-id}", | ||
"data": { | ||
"resourceInfo": { | ||
"id": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.ContainerService/managedClusters/{managedcluster-name}/scheduledEvents/{event-id}", | ||
"name": "{event-id}", | ||
"type": "Microsoft.ContainerService/managedClusters/scheduledEvents", | ||
"properties": { | ||
"description": "ScheduledEvents", | ||
"eventId": "bbe82027-0444-4f73-897a-0bbfe3af66f1", | ||
"eventSource": "AutoUprader", | ||
"eventStatus": "Started", | ||
"eventDetails": "Start to upgrade security vhd", | ||
"scheduledTime": "2024-04-16T22:17:12.103268606Z", | ||
"startTime": "0001-01-01T00:00:00.0000000Z", | ||
"lastUpdateTime": "0001-01-01T00:00:00.0000000Z", | ||
"resources": [ | ||
"/subscriptions/{subscription-id}/resourcegroups/{rg-name}/providers/Microsoft.ContainerService/managedClusters/{managedcluster-name}" | ||
], | ||
"resourceType": "ManagedCluster" | ||
} | ||
}, | ||
"operationalInfo": { | ||
"resourceEventTime": "2024-04-16T22:17:12.1032748" | ||
}, | ||
"apiVersion": "2023-11-02-preview" | ||
}, | ||
"type": "Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted", | ||
"specversion": "1.0", | ||
"time": "2024-04-16T22:17:12.1032748Z", | ||
"operationId": "ContainerServiceEventResourcesScheduledEventEmittedEventName", | ||
"title": "ContainerServiceEventResourcesScheduledEventEmitted" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...ane/Microsoft.ResourceNotifications/stable/2018-01-01/ContainerServiceEventResources.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"version": "2018-01-01", | ||
"title": "Schema of Container Service events published to Azure Event Grid via Azure Resource Notifications", | ||
"description": "Describes the schema of the Container Service events published to Azure Event Grid. This corresponds to the Data property of an EventGridEvent." | ||
}, | ||
"paths": {}, | ||
"definitions": { | ||
"ResourceNotificationsContainerServiceEventResourcesScheduledEventData": { | ||
"description": "Schema of the Data property of an event grid event for a Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted preview event.", | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "./common.json#/definitions/ResourceNotificationsResourceUpdatedEventData" | ||
} | ||
], | ||
"x-ms-examples": { | ||
"ResourceNotificationsContainerServiceEventResourcesScheduledEmittedEventGridSchema": { | ||
"$ref": "./examples/event-grid-schema/ContainerServiceEventResources_ScheduledEventEmitted.json" | ||
}, | ||
"ResourceNotificationsContainerServiceEventResourcesScheduledEventEmittedCloudEventsSchema": { | ||
"$ref": "./examples/cloud-events-schema/ContainerServiceEventResources_ScheduledEventEmitted.json" | ||
} | ||
} | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
...01/examples/cloud-events-schema/ContainerServiceEventResources_ScheduledEventEmitted.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"id": "5bdb52cf-5489-4845-86c8-7fe94a4fc6c1", | ||
"source": "/subscriptions/{subscription-id}", | ||
"subject": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.ContainerService/managedClusters/{managedcluster-name}/scheduledEvents/{event-id}", | ||
"data": { | ||
"resourceInfo": { | ||
"id": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.ContainerService/managedClusters/{managedcluster-name}/scheduledEvents/{event-id}", | ||
"name": "{event-id}", | ||
"type": "Microsoft.ContainerService/managedClusters/scheduledEvents", | ||
"properties": { | ||
"description": "ScheduledEvents", | ||
"eventId": "bbe82027-0444-4f73-897a-0bbfe3af66f1", | ||
"eventSource": "AutoUprader", | ||
"eventStatus": "Started", | ||
"eventDetails": "Start to upgrade security vhd", | ||
"scheduledTime": "2024-04-16T22:17:12.103268606Z", | ||
"startTime": "0001-01-01T00:00:00.0000000Z", | ||
"lastUpdateTime": "0001-01-01T00:00:00.0000000Z", | ||
"resources": [ | ||
"/subscriptions/{subscription-id}/resourcegroups/{rg-name}/providers/Microsoft.ContainerService/managedClusters/{managedcluster-name}" | ||
], | ||
"resourceType": "ManagedCluster" | ||
} | ||
}, | ||
"operationalInfo": { | ||
"resourceEventTime": "2024-04-16T22:17:12.1032748" | ||
}, | ||
"apiVersion": "2023-11-02-preview" | ||
}, | ||
"type": "Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted", | ||
"specversion": "1.0", | ||
"time": "2024-04-16T22:17:12.1032748Z" | ||
} |
35 changes: 35 additions & 0 deletions
35
...1-01/examples/event-grid-schema/ContainerServiceEventResources_ScheduledEventEmitted.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"id": "5bdb52cf-5489-4845-86c8-7fe94a4fc6c1", | ||
"topic": "/subscriptions/{subscription-id}", | ||
"subject": "/subscriptions/{subscription-id}/resourcegroups/{rg-name}/providers/Microsoft.ContainerService/managedClusters/{managedcluster-id}/scheduledEvents/{event-id}", | ||
"data": { | ||
"resourceInfo": { | ||
"id": "/subscriptions/{subscription-id}/resourcegroups/{rg-name}/providers/Microsoft.ContainerService/managedClusters/{managedcluster-id}/scheduledEvents/{event-id}", | ||
"name": "{event-id}", | ||
"type": "Microsoft.ContainerService/managedClusters/scheduledEvents", | ||
"location": "westus2", | ||
"properties": { | ||
"description": "ScheduledEvents", | ||
"eventId": "bbe82027-0444-4f73-897a-0bbfe3af66f1", | ||
"eventSource": "AutoUprader", | ||
"eventStatus": "Started", | ||
"eventDetails": "Start to upgrade security vhd", | ||
"scheduledTime": "2024-04-16T22:17:12.103268606Z", | ||
"startTime": "0001-01-01T00:00:00.0000000Z", | ||
"lastUpdateTime": "0001-01-01T00:00:00.0000000Z", | ||
"resources": [ | ||
"/subscriptions/{subscription-id}/resourcegroups/{rg-name}/providers/Microsoft.ContainerService/managedClusters/{managedcluster-id}" | ||
], | ||
"resourceType": "ManagedCluster" | ||
} | ||
}, | ||
"operationalInfo": { | ||
"resourceEventTime": "2024-04-16T22:17:12.1032748" | ||
}, | ||
"apiVersion": "2023-11-02-preview" | ||
}, | ||
"eventType": "Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted", | ||
"dataVersion": "1", | ||
"metadataVersion": "1", | ||
"eventTime": "2024-04-16T22:17:12.1032748Z" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters