다음을 통해 공유


EventGridClient.PublishCloudEvents Method

Definition

Overloads

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

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

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.

PublishCloudEvents(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 Azure.Response<Azure.Messaging.EventGrid.Namespaces.PublishResult> PublishCloudEvents (string topicName, System.Collections.Generic.IEnumerable<Azure.Messaging.CloudEvent> events, System.Threading.CancellationToken cancellationToken = default);
abstract member PublishCloudEvents : string * seq<Azure.Messaging.CloudEvent> * System.Threading.CancellationToken -> Azure.Response<Azure.Messaging.EventGrid.Namespaces.PublishResult>
override this.PublishCloudEvents : string * seq<Azure.Messaging.CloudEvent> * System.Threading.CancellationToken -> Azure.Response<Azure.Messaging.EventGrid.Namespaces.PublishResult>
Public Overridable Function PublishCloudEvents (topicName As String, events As IEnumerable(Of CloudEvent), Optional cancellationToken As CancellationToken = Nothing) As 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

PublishCloudEvents(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 Azure.Response PublishCloudEvents (string topicName, Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member PublishCloudEvents : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.PublishCloudEvents : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
Public Overridable Function PublishCloudEvents (topicName As String, content As RequestContent, Optional context As RequestContext = Nothing) As 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