EventGridClient.PublishCloudEventsAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
PublishCloudEventsAsync(String, IEnumerable<CloudEvent>, CancellationToken) |
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. |
PublishCloudEventsAsync(String, RequestContent, RequestContext) |
[Protocol Method] 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.
|
PublishCloudEventsAsync(String, IEnumerable<CloudEvent>, CancellationToken)
- Source:
- EventGridClient.cs
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.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.EventGrid.Namespaces.PublishResult>> PublishCloudEventsAsync (string topicName, System.Collections.Generic.IEnumerable<Azure.Messaging.CloudEvent> events, System.Threading.CancellationToken cancellationToken = default);
abstract member PublishCloudEventsAsync : string * seq<Azure.Messaging.CloudEvent> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.EventGrid.Namespaces.PublishResult>>
override this.PublishCloudEventsAsync : string * seq<Azure.Messaging.CloudEvent> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.EventGrid.Namespaces.PublishResult>>
Public Overridable Function PublishCloudEventsAsync (topicName As String, events As IEnumerable(Of CloudEvent), Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of PublishResult))
Parameters
- topicName
- String
Topic Name.
- events
- IEnumerable<CloudEvent>
Array of Cloud Events being published.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
topicName
or events
is null.
topicName
is an empty string, and was expected to be non-empty.
Applies to
PublishCloudEventsAsync(String, RequestContent, RequestContext)
- Source:
- EventGridClient.cs
[Protocol Method] 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.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.Threading.Tasks.Task<Azure.Response> PublishCloudEventsAsync (string topicName, Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member PublishCloudEventsAsync : string * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.PublishCloudEventsAsync : string * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function PublishCloudEventsAsync (topicName As String, content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Response)
Parameters
- topicName
- String
Topic Name.
- content
- RequestContent
The content to send as the body of the request.
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Exceptions
topicName
or content
is null.
topicName
is an empty string, and was expected to be non-empty.
Service returned a non-success status code.
Applies to
Azure SDK for .NET