다음을 통해 공유


EventGridPublisherClient class

Event Grid 서비스에 이벤트를 게시하기 위한 클라이언트 클래스입니다.

생성자

EventGridPublisherClient<T>(string, T, KeyCredential | SASCredential | TokenCredential, CommonClientOptions)

Event Grid 스키마를 사용하여 이벤트를 보내는 EventGridPublisherClient의 인스턴스를 만듭니다.

사용 예:

import { EventGridPublisherClient, AzureKeyCredential } from "@azure/eventgrid";

const client = new EventGridPublisherClient(
  "<endpoint>",
  "EventGrid",
  new AzureKeyCredential("<Access Key>"),
);

속성

apiVersion

Even Grid 서비스의 버전입니다.

endpointUrl

Event Grid 엔드포인트의 URL입니다.

메서드

send(InputSchemaToInputTypeMap[T][], InputSchemaToOptionsTypeMap[T])

토픽에 이벤트를 보냅니다.

생성자 세부 정보

EventGridPublisherClient<T>(string, T, KeyCredential | SASCredential | TokenCredential, CommonClientOptions)

Event Grid 스키마를 사용하여 이벤트를 보내는 EventGridPublisherClient의 인스턴스를 만듭니다.

사용 예:

import { EventGridPublisherClient, AzureKeyCredential } from "@azure/eventgrid";

const client = new EventGridPublisherClient(
  "<endpoint>",
  "EventGrid",
  new AzureKeyCredential("<Access Key>"),
);
new EventGridPublisherClient(endpointUrl: string, inputSchema: T, credential: KeyCredential | SASCredential | TokenCredential, options?: CommonClientOptions)

매개 변수

endpointUrl

string

Event Grid 엔드포인트의 URL(예: https://eg-topic.westus2-1.eventgrid.azure.net/api/events.)

inputSchema

T

Event Grid 엔드포인트가 수락하도록 구성된 스키마입니다. "EventGrid", "CloudEvent" 또는 "Custom" 중 하나입니다.

credential

KeyCredential | SASCredential | TokenCredential

서비스에 대한 요청을 인증하는 데 사용됩니다.

options
CommonClientOptions

Event Grid 클라이언트를 구성하는 데 사용됩니다.

속성 세부 정보

apiVersion

Even Grid 서비스의 버전입니다.

apiVersion: string

속성 값

string

endpointUrl

Event Grid 엔드포인트의 URL입니다.

endpointUrl: string

속성 값

string

메서드 세부 정보

send(InputSchemaToInputTypeMap[T][], InputSchemaToOptionsTypeMap[T])

토픽에 이벤트를 보냅니다.

function send(events: InputSchemaToInputTypeMap[T][], options?: InputSchemaToOptionsTypeMap[T]): Promise<void>

매개 변수

events

InputSchemaToInputTypeMap[T][]

보낼 이벤트입니다. 이벤트는 클라이언트를 생성할 때 사용되는 스키마에 있어야 합니다.

options

InputSchemaToOptionsTypeMap[T]

기본 작업을 제어하는 옵션입니다.

반환

Promise<void>