Udostępnij za pośrednictwem


EventGridSenderClient.SendAsync Method

Definition

Overloads

SendAsync(CloudEvent, CancellationToken)

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.

SendAsync(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.

SendAsync(CloudEvent, CancellationToken)

Source:
EventGridSenderClient.cs

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.

public virtual System.Threading.Tasks.Task<Azure.Response> SendAsync (Azure.Messaging.CloudEvent cloudEvent, System.Threading.CancellationToken cancellationToken = default);
abstract member SendAsync : Azure.Messaging.CloudEvent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.SendAsync : Azure.Messaging.CloudEvent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function SendAsync (cloudEvent As CloudEvent, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)

Parameters

cloudEvent
CloudEvent

Single Cloud Event being published.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

cloudEvent is null.

Applies to

SendAsync(IEnumerable<CloudEvent>, CancellationToken)

Source:
EventGridSenderClient.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> SendAsync (System.Collections.Generic.IEnumerable<Azure.Messaging.CloudEvent> cloudEvents, System.Threading.CancellationToken cancellationToken = default);
abstract member SendAsync : seq<Azure.Messaging.CloudEvent> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.SendAsync : seq<Azure.Messaging.CloudEvent> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function SendAsync (cloudEvents As IEnumerable(Of CloudEvent), Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)

Parameters

cloudEvents
IEnumerable<CloudEvent>

Array of Cloud Events being published.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

cloudEvents is null.

Applies to