Skip to content

Commit 6d2c2df

Browse files
committed
[EGv2] doc updates (#30483)
* doc updates * doc update * doc
1 parent 9c2884a commit 6d2c2df

File tree

2 files changed

+44
-14
lines changed

2 files changed

+44
-14
lines changed

sdk/eventgrid/azure-eventgrid/azure/eventgrid/_operations/_patch.py

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ def publish_cloud_events(
5151
content_type: str = "application/cloudevents-batch+json; charset=utf-8",
5252
**kwargs: Any
5353
) -> None:
54-
"""Publish Batch of Cloud Events to namespace topic.
54+
"""Publish Batch Cloud Event to namespace topic. In case of success, the server responds with an
55+
HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return
56+
various error codes. For example, 401: which indicates authorization failure, 403: which
57+
indicates quota exceeded or message is too large, 410: which indicates that specific topic is
58+
not found, 400: for bad request, and 500: for internal server error.
59+
5560
:param topic_name: Topic Name. Required.
5661
:type topic_name: str
5762
:param body: Array of Cloud Events being published. Required.
@@ -62,7 +67,7 @@ def publish_cloud_events(
6267
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
6368
will have to context manage the returned stream.
6469
:return: None
65-
:rtype: None
70+
:rtype: None
6671
:raises ~azure.core.exceptions.HttpResponseError:
6772
"""
6873

@@ -75,7 +80,12 @@ def publish_cloud_events(
7580
content_type: str = "application/cloudevents+json; charset=utf-8",
7681
**kwargs: Any
7782
) -> None:
78-
"""Publish Single Cloud Event to namespace topic.
83+
"""Publish Single Cloud Event to namespace topic. In case of success, the server responds with an
84+
HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return
85+
various error codes. For example, 401: which indicates authorization failure, 403: which
86+
indicates quota exceeded or message is too large, 410: which indicates that specific topic is
87+
not found, 400: for bad request, and 500: for internal server error.
88+
7989
:param topic_name: Topic Name. Required.
8090
:type topic_name: str
8191
:param body: Single Cloud Event being published. Required.
@@ -86,26 +96,31 @@ def publish_cloud_events(
8696
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
8797
will have to context manage the returned stream.
8898
:return: None
89-
:rtype: None
99+
:rtype: None
90100
:raises ~azure.core.exceptions.HttpResponseError:
91101
"""
92102

93103
@distributed_trace
94104
def publish_cloud_events(
95105
self, topic_name: str, body: Union[List[CloudEvent], CloudEvent], **kwargs
96106
) -> None:
97-
"""Publish Cloud Events to namespace topic.
107+
"""Publish Batch Cloud Event or Events to namespace topic. In case of success, the server responds with an
108+
HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return
109+
various error codes. For example, 401: which indicates authorization failure, 403: which
110+
indicates quota exceeded or message is too large, 410: which indicates that specific topic is
111+
not found, 400: for bad request, and 500: for internal server error.
112+
98113
:param topic_name: Topic Name. Required.
99114
:type topic_name: str
100-
:param body: Single Cloud Event or list of Cloud Events being published. Required.
115+
:param body: Cloud Event or array of Cloud Events being published. Required.
101116
:type body: ~azure.core.messaging.CloudEvent or list[~azure.core.messaging.CloudEvent]
102117
:keyword content_type: content type. Default value is "application/cloudevents+json;
103118
charset=utf-8".
104119
:paramtype content_type: str
105120
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
106121
will have to context manage the returned stream.
107122
:return: None
108-
:rtype: None
123+
:rtype: None
109124
:raises ~azure.core.exceptions.HttpResponseError:
110125
"""
111126

sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_operations/_patch.py

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ async def publish_cloud_events(
2323
content_type: str = "application/cloudevents-batch+json; charset=utf-8",
2424
**kwargs: Any
2525
) -> None:
26-
"""Publish Batch of Cloud Events to namespace topic.
26+
"""Publish Batch Cloud Event to namespace topic. In case of success, the server responds with an
27+
HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return
28+
various error codes. For example, 401: which indicates authorization failure, 403: which
29+
indicates quota exceeded or message is too large, 410: which indicates that specific topic is
30+
not found, 400: for bad request, and 500: for internal server error.
31+
2732
:param topic_name: Topic Name. Required.
2833
:type topic_name: str
2934
:param body: Array of Cloud Events being published. Required.
@@ -34,7 +39,7 @@ async def publish_cloud_events(
3439
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
3540
will have to context manage the returned stream.
3641
:return: None
37-
:rtype: None
42+
:rtype: None
3843
:raises ~azure.core.exceptions.HttpResponseError:
3944
"""
4045

@@ -47,7 +52,12 @@ async def publish_cloud_events(
4752
content_type: str = "application/cloudevents+json; charset=utf-8",
4853
**kwargs: Any
4954
) -> None:
50-
"""Publish Single Cloud Event to namespace topic.
55+
"""Publish Single Cloud Event to namespace topic. In case of success, the server responds with an
56+
HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return
57+
various error codes. For example, 401: which indicates authorization failure, 403: which
58+
indicates quota exceeded or message is too large, 410: which indicates that specific topic is
59+
not found, 400: for bad request, and 500: for internal server error.
60+
5161
:param topic_name: Topic Name. Required.
5262
:type topic_name: str
5363
:param body: Single Cloud Event being published. Required.
@@ -58,26 +68,31 @@ async def publish_cloud_events(
5868
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
5969
will have to context manage the returned stream.
6070
:return: None
61-
:rtype: None
71+
:rtype: None
6272
:raises ~azure.core.exceptions.HttpResponseError:
6373
"""
6474

6575
@distributed_trace_async
6676
async def publish_cloud_events(
6777
self, topic_name: str, body: Union[List[CloudEvent], CloudEvent], **kwargs
6878
) -> None:
69-
"""Publish Cloud Events to namespace topic.
79+
"""Publish Batch Cloud Event or Events to namespace topic. In case of success, the server responds with an
80+
HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return
81+
various error codes. For example, 401: which indicates authorization failure, 403: which
82+
indicates quota exceeded or message is too large, 410: which indicates that specific topic is
83+
not found, 400: for bad request, and 500: for internal server error.
84+
7085
:param topic_name: Topic Name. Required.
7186
:type topic_name: str
72-
:param body: Single Cloud Event or list of Cloud Events being published. Required.
87+
:param body: Cloud Event or Array of Cloud Events being published. Required.
7388
:type body: ~azure.core.messaging.CloudEvent or list[~azure.core.messaging.CloudEvent]
7489
:keyword content_type: content type. Default value is "application/cloudevents+json;
7590
charset=utf-8".
7691
:paramtype content_type: str
7792
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
7893
will have to context manage the returned stream.
7994
:return: None
80-
:rtype: None
95+
:rtype: None
8196
:raises ~azure.core.exceptions.HttpResponseError:
8297
"""
8398
if isinstance(body, CloudEvent):

0 commit comments

Comments
 (0)