From 4b9c477ee6390b115866e433a8dbe48c4176fb4e Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Wed, 16 Dec 2020 13:52:50 -0800 Subject: [PATCH] [EventGrid] Small doc updates for `id` parameter - For our model types, we've made `id` optional and when unspecified, a random UUID is used. Clarify this behavior in the docs (in our user studies most participants felt like this was the behavior, but it would have been helpful to see it explicitly called out). - `EventGridEvent` still some slightly incorrect documentation, due to some bad copy/pasting from `CloudEvent`. There is no `source` property in an `EventGridEvent`. --- sdk/eventgrid/azure-eventgrid/azure/eventgrid/_models.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_models.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_models.py index 304b4aa19677..dca194c37dfe 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_models.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_models.py @@ -69,7 +69,7 @@ class CloudEvent(EventMixin): #pylint:disable=too-many-instance-attributes (identified by source). :type subject: str :param id: Optional. An identifier for the event. The combination of id and source must be - unique for each distinct event. + unique for each distinct event. If not provided, a random UUID will be generated and used. :type id: Optional[str] """ def __init__(self, source, type, **kwargs): # pylint: disable=redefined-builtin @@ -149,8 +149,7 @@ class EventGridEvent(InternalEventGridEvent, EventMixin): :vartype metadata_version: str :param data_version: The schema version of the data object. If not provided, will be stamped with an empty value. :type data_version: str - :param id: Optional. An identifier for the event. The combination of id and source must be - unique for each distinct event. + :param id: Optional. An identifier for the event. In not provided, a random UUID will be generated and used. :type id: Optional[str] :param event_time: Optional.The time (in UTC) of the event. If not provided, it will be the time (in UTC) the event was generated.