Skip to content
Open
Show file tree
Hide file tree
Changes from all 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,54 @@
import "@typespec/versioning";
import "./AKSResourcesExample.tsp";
import "./common.tsp";
using TypeSpec.Versioning;

/**
Describes the schema of the AKS Fleet Resources 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 EventGridEvent for a Microsoft.ResourceNotifications.AKSResources.FleetGateCreated event.
*/
#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "Maintain compatibility with existing models."
@example(MicrosoftResourceNotificationsAKSResourcesFleetGateCreatedExample)
model ResourceNotificationsAksResourcesFleetGateCreatedEventData
extends ResourceNotificationsResourceUpdatedEventData {}

/**
Schema of the Data property of an EventGridEvent for a Microsoft.ResourceNotifications.AKSResources.FleetGateUpdated event.
*/
#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "Maintain compatibility with existing models."
@example(MicrosoftResourceNotificationsAKSResourcesFleetGateUpdatedExample)
model ResourceNotificationsAksResourcesFleetGateUpdatedEventData
extends ResourceNotificationsResourceUpdatedEventData {}

/**
Schema of the Data property of an EventGridEvent for a Microsoft.ResourceNotifications.AKSResources.FleetGateDeleted event.
*/
@example(MicrosoftResourceNotificationsAKSResourcesFleetGateDeletedExample)
model ResourceNotificationsAksResourcesFleetGateDeletedEventData {
/** resourceInfo details for deleted event */
resourceInfo: {
/** id of the resource for which the event is being emitted */
id: string;

/** name of the resource for which the event is being emitted */
name: string;

/** the type of the resource for which the event is being emitted */
type: string;

/** properties in the payload of the resource for which the event is being emitted */
#suppress "@azure-tools/typespec-azure-core/bad-record-type" "The type of properties is object with additionalProperties object"
@visibility(Lifecycle.Read)
properties: Record<unknown>;
};

/** details about operational info */
operationalInfo: ResourceNotificationsOperationalDetails;

/** api version of the resource properties bag */
apiVersion: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import "./AKSResources.tsp";
namespace Microsoft.EventGrid.SystemEvents;

const MicrosoftResourceNotificationsAKSResourcesFleetGateCreatedExample: ResourceNotificationsAksResourcesFleetGateCreatedEventData = #{
resourceInfo: #{
id: "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.ContainerService/fleets/{fleet-name}/gates/9i567df1-jh3a-281j-8eb8-123ac2el0t60",
name: "9i567df1-jh3a-281j-8eb8-123ac2el0t60",
type: "Microsoft.ContainerService/fleets/gates",
properties: #{
displayName: "before-stage",
gateType: "Approval",
provisioningState: "Succeeded",
state: "Pending",
target: #{
id: "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.ContainerService/fleets/{fleet-name}/updateRuns/run-1",
updateRunProperties: #{
name: "run-1",
stage: "stage-1",
timing: "Before",
},
},
},
},
operationalInfo: #{
resourceEventTime: utcDateTime.fromISO("2025-09-09T01:10:58.4955907+00:00"),
},
apiVersion: "2025-04-01-preview",
};

const MicrosoftResourceNotificationsAKSResourcesFleetGateUpdatedExample: ResourceNotificationsAksResourcesFleetGateUpdatedEventData = #{
resourceInfo: #{
id: "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.ContainerService/fleets/{fleet-name}/gates/1k90uy67-e375-4xv6-z220-5197ekk1aka4",
name: "1k90uy67-e375-4xv6-z220-5197ekk1aka4",
type: "Microsoft.ContainerService/fleets/gates",
properties: #{
displayName: "before group",
gateType: "Approval",
provisioningState: "Succeeded",
state: "Completed",
target: #{
id: "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.ContainerService/fleets/{fleet-name}/updateRuns/run-1",
updateRunProperties: #{
group: "group-1",
name: "run-1",
stage: "stage-1",
timing: "Before",
},
},
},
},
operationalInfo: #{
resourceEventTime: utcDateTime.fromISO("2025-09-09T01:12:25.8924289+00:00"),
},
apiVersion: "2025-04-01-preview",
};

const MicrosoftResourceNotificationsAKSResourcesFleetGateDeletedExample: ResourceNotificationsAksResourcesFleetGateDeletedEventData = #{
resourceInfo: #{
id: "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.ContainerService/fleets/{fleet-name}/gates/8a63212d-9dp1-4oa6-8135-14ghghg311ea6",
name: "8a63212d-9dp1-4oa6-8135-14ghghg311ea6",
type: "Microsoft.ContainerService/fleets/gates",
properties: #{
displayName: "stage-after",
gateType: "Approval",
provisioningState: "Succeeded",
state: "Pending",
target: #{
id: "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.ContainerService/fleets/{fleet-name}/updateRuns/run-delete",
updateRunProperties: #{
name: "run-delete",
stage: "stage-1",
timing: "After",
},
},
},
},
operationalInfo: #{
resourceEventTime: utcDateTime.fromISO("2025-09-22T09:01:22.5495164+00:00"),
},
apiVersion: "2025-04-01-preview",
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@ import "@azure-tools/typespec-client-generator-core";

using Azure.ClientGenerator.Core;
//Models
//Models
@@usage(Microsoft.EventGrid.SystemEvents.ResourceNotificationsAksResourcesFleetGateCreatedEventData,
Usage.output | Usage.json
);
@@access(Microsoft.EventGrid.SystemEvents.ResourceNotificationsAksResourcesFleetGateCreatedEventData,
Access.public
);
@@usage(Microsoft.EventGrid.SystemEvents.ResourceNotificationsAksResourcesFleetGateUpdatedEventData,
Usage.output | Usage.json
);
@@access(Microsoft.EventGrid.SystemEvents.ResourceNotificationsAksResourcesFleetGateUpdatedEventData,
Access.public
);
@@usage(Microsoft.EventGrid.SystemEvents.ResourceNotificationsAksResourcesFleetGateDeletedEventData,
Usage.output | Usage.json
);
@@access(Microsoft.EventGrid.SystemEvents.ResourceNotificationsAksResourcesFleetGateDeletedEventData,
Access.public
);
@@usage(Microsoft.EventGrid.SystemEvents.ResourceNotificationsContainerServiceEventResourcesScheduledEventData,
Usage.output | Usage.json
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import "./Microsoft.EventGrid/EventGrid.tsp";
import "./Microsoft.ResourceNotifications/HealthResources.tsp";
import "./Microsoft.ResourceNotifications/Resources.tsp";
import "./Microsoft.ResourceNotifications/ContainerServiceEventResources.tsp";

import "./Microsoft.ResourceNotifications/AKSResources.tsp";
import "./propertyNameOverride.tsp";

/** Azure Messaging EventGrid SystemEvents */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7636,6 +7636,73 @@
}
}
},
"ResourceNotificationsAksResourcesFleetGateCreatedEventData": {
"type": "object",
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ResourceNotifications.AKSResources.FleetGateCreated event.",
"allOf": [
{
"$ref": "#/definitions/ResourceNotificationsResourceUpdatedEventData"
}
]
},
"ResourceNotificationsAksResourcesFleetGateDeletedEventData": {
"type": "object",
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ResourceNotifications.AKSResources.FleetGateDeleted event.",
"properties": {
"resourceInfo": {
"type": "object",
"description": "resourceInfo details for deleted event",
"properties": {
"id": {
"type": "string",
"description": "id of the resource for which the event is being emitted"
},
"name": {
"type": "string",
"description": "name of the resource for which the event is being emitted"
},
"type": {
"type": "string",
"description": "the type of the resource for which the event is being emitted"
},
"properties": {
"type": "object",
"description": "properties in the payload of the resource for which the event is being emitted",
"additionalProperties": {},
"readOnly": true
}
},
"required": [
"id",
"name",
"type",
"properties"
]
},
"operationalInfo": {
"$ref": "#/definitions/ResourceNotificationsOperationalDetails",
"description": "details about operational info"
},
"apiVersion": {
"type": "string",
"description": "api version of the resource properties bag"
}
},
"required": [
"resourceInfo",
"operationalInfo",
"apiVersion"
]
},
"ResourceNotificationsAksResourcesFleetGateUpdatedEventData": {
"type": "object",
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ResourceNotifications.AKSResources.FleetGateUpdated event.",
"allOf": [
{
"$ref": "#/definitions/ResourceNotificationsResourceUpdatedEventData"
}
]
},
"ResourceNotificationsContainerServiceEventResourcesScheduledEventData": {
"type": "object",
"description": "Schema of the Data property of an event grid event for a Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted preview event.Schema of the Data property of an event grid event for a Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted preview event.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7774,6 +7774,73 @@
}
}
},
"ResourceNotificationsAksResourcesFleetGateCreatedEventData": {
"type": "object",
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ResourceNotifications.AKSResources.FleetGateCreated event.",
"allOf": [
{
"$ref": "#/definitions/ResourceNotificationsResourceUpdatedEventData"
}
]
},
"ResourceNotificationsAksResourcesFleetGateDeletedEventData": {
"type": "object",
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ResourceNotifications.AKSResources.FleetGateDeleted event.",
"properties": {
"resourceInfo": {
"type": "object",
"description": "resourceInfo details for deleted event",
"properties": {
"id": {
"type": "string",
"description": "id of the resource for which the event is being emitted"
},
"name": {
"type": "string",
"description": "name of the resource for which the event is being emitted"
},
"type": {
"type": "string",
"description": "the type of the resource for which the event is being emitted"
},
"properties": {
"type": "object",
"description": "properties in the payload of the resource for which the event is being emitted",
"additionalProperties": {},
"readOnly": true
}
},
"required": [
"id",
"name",
"type",
"properties"
]
},
"operationalInfo": {
"$ref": "#/definitions/ResourceNotificationsOperationalDetails",
"description": "details about operational info"
},
"apiVersion": {
"type": "string",
"description": "api version of the resource properties bag"
}
},
"required": [
"resourceInfo",
"operationalInfo",
"apiVersion"
]
},
"ResourceNotificationsAksResourcesFleetGateUpdatedEventData": {
"type": "object",
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ResourceNotifications.AKSResources.FleetGateUpdated event.",
"allOf": [
{
"$ref": "#/definitions/ResourceNotificationsResourceUpdatedEventData"
}
]
},
"ResourceNotificationsContainerServiceEventResourcesScheduledEventData": {
"type": "object",
"description": "Schema of the Data property of an event grid event for a Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted preview event.Schema of the Data property of an event grid event for a Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted preview event.",
Expand Down