diff --git a/sdk/eventgrid/azure-eventgrid/CHANGELOG.md b/sdk/eventgrid/azure-eventgrid/CHANGELOG.md index 5b7a9b0790dd..375754865e1e 100644 --- a/sdk/eventgrid/azure-eventgrid/CHANGELOG.md +++ b/sdk/eventgrid/azure-eventgrid/CHANGELOG.md @@ -1,14 +1,10 @@ # Release History -## 4.20.1 (Unreleased) +## 4.21.0 (2024-11-19) ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Added new enum values to `SystemEventNames` related to Azure Resource Notifications. ## 4.20.0 (2024-06-12) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_event_mappings.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_event_mappings.py index 59fbfed265e6..ed9f5e4d91e3 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_event_mappings.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_event_mappings.py @@ -424,6 +424,10 @@ class SystemEventNames(str, Enum, metaclass=CaseInsensitiveEnumMeta): ResourceDeleteSuccessName = "Microsoft.Resources.ResourceDeleteSuccess" + ResourceNotificationsContainerServiceEventResourcesScheduledEventName = ( + "Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted" + ) + ResourceNotificationsHealthResourcesAnnotatedEventName = ( "Microsoft.ResourceNotifications.HealthResources.ResourceAnnotated" ) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_version.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_version.py index 9462cc312640..69b8a4d0e5df 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_version.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "4.20.1" +VERSION = "4.21.0" diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_patch.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_patch.py index 8b9dcb1760cb..a552fe3c3125 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_patch.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_patch.py @@ -15,6 +15,7 @@ DataType = TypeVar("DataType") + class ReceiveDetails(InternalReceiveDetails, Generic[DataType]): """Receive operation details per Cloud Event. diff --git a/sdk/eventgrid/azure-eventgrid/samples/namespace/async_samples/sample_publish_cncf_events_async.py b/sdk/eventgrid/azure-eventgrid/samples/namespace/async_samples/sample_publish_cncf_events_async.py index d8b641ddf627..24bf463e44a3 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/namespace/async_samples/sample_publish_cncf_events_async.py +++ b/sdk/eventgrid/azure-eventgrid/samples/namespace/async_samples/sample_publish_cncf_events_async.py @@ -34,7 +34,11 @@ async def publish(): await client.send( [ CloudEvent( - attributes={"type": "cloudevent", "source": "/cncf/cloud/event/1.0", "subject": "testing-cncf-event"}, + attributes={ + "type": "cloudevent", + "source": "/cncf/cloud/event/1.0", + "subject": "testing-cncf-event", + }, data=b"This is a cncf cloud event.", ) ] diff --git a/sdk/eventgrid/azure-eventgrid/swagger/_constants.py b/sdk/eventgrid/azure-eventgrid/swagger/_constants.py index 0a2cfc4503c7..14e790d924c2 100644 --- a/sdk/eventgrid/azure-eventgrid/swagger/_constants.py +++ b/sdk/eventgrid/azure-eventgrid/swagger/_constants.py @@ -23,6 +23,7 @@ "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/eventgrid/data-plane/Microsoft.Resources/stable/2018-01-01/Resources.json", "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/HealthResources.json", "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/Resources.json", + "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/eventgrid/data-plane/Microsoft.ResourceNotifications/stable/2018-01-01/ContainerServiceEventResources.json", "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/eventgrid/data-plane/Microsoft.ServiceBus/stable/2018-01-01/ServiceBus.json", "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/eventgrid/data-plane/Microsoft.SignalRService/stable/2018-01-01/SignalRService.json", "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/eventgrid/data-plane/Microsoft.Storage/stable/2018-01-01/Storage.json", diff --git a/sdk/eventgrid/azure-eventgrid/swagger/postprocess_eventnames.py b/sdk/eventgrid/azure-eventgrid/swagger/postprocess_eventnames.py index 842afcc14797..8ce472bbbc09 100644 --- a/sdk/eventgrid/azure-eventgrid/swagger/postprocess_eventnames.py +++ b/sdk/eventgrid/azure-eventgrid/swagger/postprocess_eventnames.py @@ -3,7 +3,7 @@ import warnings import sys from urllib.request import urlopen -from azure.eventgrid._generated import models +from azure.eventgrid._legacy._generated import models from _constants import files, backward_compat, additional_events, EXCEPTIONS, NAMING_CHANGES