Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EGv2] doc updates #30483

Merged
merged 3 commits into from
May 22, 2023
Merged
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
Expand Up @@ -51,7 +51,12 @@ def publish_cloud_events(
content_type: str = "application/cloudevents-batch+json; charset=utf-8",
**kwargs: Any
) -> None:
"""Publish Batch of Cloud Events to namespace topic.
"""Publish Batch Cloud Event to namespace topic. In case of success, the server responds with an
HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return
various error codes. For example, 401: which indicates authorization failure, 403: which
indicates quota exceeded or message is too large, 410: which indicates that specific topic is
not found, 400: for bad request, and 500: for internal server error.

:param topic_name: Topic Name. Required.
:type topic_name: str
:param body: Array of Cloud Events being published. Required.
Expand All @@ -62,7 +67,7 @@ def publish_cloud_events(
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
will have to context manage the returned stream.
:return: None
:rtype: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""

Expand All @@ -75,7 +80,12 @@ def publish_cloud_events(
content_type: str = "application/cloudevents+json; charset=utf-8",
**kwargs: Any
) -> None:
"""Publish Single Cloud Event to namespace topic.
"""Publish Single Cloud Event to namespace topic. In case of success, the server responds with an
HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return
various error codes. For example, 401: which indicates authorization failure, 403: which
indicates quota exceeded or message is too large, 410: which indicates that specific topic is
not found, 400: for bad request, and 500: for internal server error.

:param topic_name: Topic Name. Required.
:type topic_name: str
:param body: Single Cloud Event being published. Required.
Expand All @@ -86,26 +96,31 @@ def publish_cloud_events(
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
will have to context manage the returned stream.
:return: None
:rtype: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""

@distributed_trace
def publish_cloud_events(
self, topic_name: str, body: Union[List[CloudEvent], CloudEvent], **kwargs
) -> None:
"""Publish Cloud Events to namespace topic.
"""Publish Batch Cloud Event or Events to namespace topic. In case of success, the server responds with an
HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return
various error codes. For example, 401: which indicates authorization failure, 403: which
indicates quota exceeded or message is too large, 410: which indicates that specific topic is
not found, 400: for bad request, and 500: for internal server error.

:param topic_name: Topic Name. Required.
:type topic_name: str
:param body: Single Cloud Event or list of Cloud Events being published. Required.
:param body: Cloud Event or array of Cloud Events being published. Required.
:type body: ~azure.core.messaging.CloudEvent or list[~azure.core.messaging.CloudEvent]
:keyword content_type: content type. Default value is "application/cloudevents+json;
charset=utf-8".
:paramtype content_type: str
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
will have to context manage the returned stream.
:return: None
:rtype: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ async def publish_cloud_events(
content_type: str = "application/cloudevents-batch+json; charset=utf-8",
**kwargs: Any
) -> None:
"""Publish Batch of Cloud Events to namespace topic.
"""Publish Batch Cloud Event to namespace topic. In case of success, the server responds with an
HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return
various error codes. For example, 401: which indicates authorization failure, 403: which
indicates quota exceeded or message is too large, 410: which indicates that specific topic is
not found, 400: for bad request, and 500: for internal server error.

:param topic_name: Topic Name. Required.
:type topic_name: str
:param body: Array of Cloud Events being published. Required.
Expand All @@ -34,7 +39,7 @@ async def publish_cloud_events(
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
will have to context manage the returned stream.
:return: None
:rtype: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""

Expand All @@ -47,7 +52,12 @@ async def publish_cloud_events(
content_type: str = "application/cloudevents+json; charset=utf-8",
**kwargs: Any
) -> None:
"""Publish Single Cloud Event to namespace topic.
"""Publish Single Cloud Event to namespace topic. In case of success, the server responds with an
HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return
various error codes. For example, 401: which indicates authorization failure, 403: which
indicates quota exceeded or message is too large, 410: which indicates that specific topic is
not found, 400: for bad request, and 500: for internal server error.

:param topic_name: Topic Name. Required.
:type topic_name: str
:param body: Single Cloud Event being published. Required.
Expand All @@ -58,26 +68,31 @@ async def publish_cloud_events(
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
will have to context manage the returned stream.
:return: None
:rtype: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""

@distributed_trace_async
async def publish_cloud_events(
self, topic_name: str, body: Union[List[CloudEvent], CloudEvent], **kwargs
) -> None:
"""Publish Cloud Events to namespace topic.
"""Publish Batch Cloud Event or Events to namespace topic. In case of success, the server responds with an
HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return
various error codes. For example, 401: which indicates authorization failure, 403: which
indicates quota exceeded or message is too large, 410: which indicates that specific topic is
not found, 400: for bad request, and 500: for internal server error.

:param topic_name: Topic Name. Required.
:type topic_name: str
:param body: Single Cloud Event or list of Cloud Events being published. Required.
:param body: Cloud Event or Array of Cloud Events being published. Required.
:type body: ~azure.core.messaging.CloudEvent or list[~azure.core.messaging.CloudEvent]
:keyword content_type: content type. Default value is "application/cloudevents+json;
charset=utf-8".
:paramtype content_type: str
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
will have to context manage the returned stream.
:return: None
:rtype: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
if isinstance(body, CloudEvent):
Expand Down