Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EventGridPublisherClient<T>

Package version

Client class for publishing events to the Event Grid Service.

Type parameters

Hierarchy

  • EventGridPublisherClient

Index

Constructors

Properties

Methods

Constructors

constructor

  • Creates an instance of EventGridPublisherClient which sends events using the Event Grid Schema.

    Example usage:

    import { EventGridPublisherClient, AzureKeyCredential } from "@azure/eventgrid";
    
    const client = new EventGridPublisherClient(
       "<service endpoint>",
       "EventGrid",
       new AzureKeyCredential("<api key>")
    );

    Parameters

    Returns EventGridPublisherClient

Properties

apiVersion

apiVersion: string

The version of the Even Grid service.

endpointUrl

endpointUrl: string

The URL to the Event Grid endpoint.

Methods

send

  • send(events: InputSchemaToInputTypeMap[T][], options?: SendOptions): Promise<void>
  • Sends events to a topic.

    Parameters

    • events: InputSchemaToInputTypeMap[T][]

      The events to send. The events should be in the schema used when constructing the client.

    • Optional options: SendOptions

      Options to control the underlying operation.

    Returns Promise<void>

Generated using TypeDoc