EventGridClient class

Extends

Constructors

EventGridClient(ServiceClientCredentials, AzureServiceClientOptions)

Initializes a new instance of the EventGridClient class.

Inherited Properties

acceptLanguage
apiVersion
credentials
longRunningOperationRetryTimeout

The retry timeout in seconds for Long Running Operations. Default value is 30.

Methods

publishEvents(string, EventGridEvent[], RequestOptionsBase)

Publishes a batch of events to an Azure Event Grid topic.

publishEvents(string, EventGridEvent[], RequestOptionsBase, ServiceCallback<void>)
publishEvents(string, EventGridEvent[], ServiceCallback<void>)

Inherited Methods

beginLongRunningRequest(RequestPrepareOptions | WebResource, RequestOptionsBase)

Send the initial request of a LRO (long running operation) and get back an HttpLongRunningOperationResponse that provides methods for polling the LRO and checking if the LRO is finished.

restoreLROPoller(LROPollState)

Restore an LROPoller from the provided LROPollState. This method can be used to recreate an LROPoller on a different process or machine.

sendLongRunningRequest(RequestPrepareOptions | WebResource, RequestOptionsBase)

Provides a mechanism to make a request that will poll and provide the final result.

sendLRORequest(OperationArguments, OperationSpec, RequestOptionsBase)

Send the initial request of a LRO (long running operation) and get back an LROPoller that provides methods for polling the LRO and checking if the LRO is finished.

sendOperationRequest(OperationArguments, OperationSpec, ServiceCallback<any>)

Send an HTTP request that is populated using the provided OperationSpec.

sendRequest(RequestPrepareOptions | WebResourceLike)

Send the provided httpRequest.

Constructor Details

EventGridClient(ServiceClientCredentials, AzureServiceClientOptions)

Initializes a new instance of the EventGridClient class.

new EventGridClient(credentials: ServiceClientCredentials, options?: AzureServiceClientOptions)

Parameters

credentials
ServiceClientCredentials

Credentials needed for the client to connect to Azure.

options
@azure/ms-rest-azure-js.AzureServiceClientOptions

The parameter options

Inherited Property Details

acceptLanguage

acceptLanguage: string

Property Value

string

Inherited From EventGridClientContext.acceptLanguage

apiVersion

apiVersion?: string

Property Value

string

Inherited From EventGridClientContext.apiVersion

credentials

credentials: ServiceClientCredentials

Property Value

Inherited From EventGridClientContext.credentials

longRunningOperationRetryTimeout

The retry timeout in seconds for Long Running Operations. Default value is 30.

longRunningOperationRetryTimeout?: number

Property Value

number

Inherited From EventGridClientContext.longRunningOperationRetryTimeout

Method Details

publishEvents(string, EventGridEvent[], RequestOptionsBase)

Publishes a batch of events to an Azure Event Grid topic.

function publishEvents(topicHostname: string, events: EventGridEvent[], options?: RequestOptionsBase): Promise<RestResponse>

Parameters

topicHostname

string

The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net

events

EventGridEvent[]

An array of events to be published to Event Grid.

options
RequestOptionsBase

The optional parameters

Returns

Promise<RestResponse>

Promise<msRest.RestResponse>

publishEvents(string, EventGridEvent[], RequestOptionsBase, ServiceCallback<void>)

function publishEvents(topicHostname: string, events: EventGridEvent[], options: RequestOptionsBase, callback: ServiceCallback<void>)

Parameters

topicHostname

string

The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net

events

EventGridEvent[]

An array of events to be published to Event Grid.

options
RequestOptionsBase

The optional parameters

callback

ServiceCallback<void>

The callback

publishEvents(string, EventGridEvent[], ServiceCallback<void>)

function publishEvents(topicHostname: string, events: EventGridEvent[], callback: ServiceCallback<void>)

Parameters

topicHostname

string

The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net

events

EventGridEvent[]

An array of events to be published to Event Grid.

callback

ServiceCallback<void>

The callback

Inherited Method Details

beginLongRunningRequest(RequestPrepareOptions | WebResource, RequestOptionsBase)

Send the initial request of a LRO (long running operation) and get back an HttpLongRunningOperationResponse that provides methods for polling the LRO and checking if the LRO is finished.

function beginLongRunningRequest(request: RequestPrepareOptions | WebResource, options?: RequestOptionsBase): Promise<LROPoller>

Parameters

request

RequestPrepareOptions | WebResource

The request object

options
RequestOptionsBase

Additional options to be sent while making the request

Returns

Promise<@azure/ms-rest-azure-js.LROPoller>

The HttpLongRunningOperationResponse that provides methods for interacting with the LRO.

Inherited From EventGridClientContext.beginLongRunningRequest

restoreLROPoller(LROPollState)

Restore an LROPoller from the provided LROPollState. This method can be used to recreate an LROPoller on a different process or machine.

function restoreLROPoller(lroPollState: LROPollState): LROPoller

Parameters

lroPollState
@azure/ms-rest-azure-js.LROPollState

Returns

@azure/ms-rest-azure-js.LROPoller

Inherited From EventGridClientContext.restoreLROPoller

sendLongRunningRequest(RequestPrepareOptions | WebResource, RequestOptionsBase)

Provides a mechanism to make a request that will poll and provide the final result.

function sendLongRunningRequest(request: RequestPrepareOptions | WebResource, options?: RequestOptionsBase): Promise<HttpOperationResponse>

Parameters

request

RequestPrepareOptions | WebResource

The request object

options
RequestOptionsBase

Additional options to be sent while making the request

Returns

The HttpOperationResponse containing the final polling request, response and the responseBody.

Inherited From EventGridClientContext.sendLongRunningRequest

sendLRORequest(OperationArguments, OperationSpec, RequestOptionsBase)

Send the initial request of a LRO (long running operation) and get back an LROPoller that provides methods for polling the LRO and checking if the LRO is finished.

function sendLRORequest(operationArguments: OperationArguments, operationSpec: OperationSpec, options?: RequestOptionsBase): Promise<LROPoller>

Parameters

operationArguments
OperationArguments

The arguments to the operation.

operationSpec
OperationSpec

The specification for the operation.

options
RequestOptionsBase

Additional options to be sent while making the request.

Returns

Promise<@azure/ms-rest-azure-js.LROPoller>

The LROPoller object that provides methods for interacting with the LRO.

Inherited From EventGridClientContext.sendLRORequest

sendOperationRequest(OperationArguments, OperationSpec, ServiceCallback<any>)

Send an HTTP request that is populated using the provided OperationSpec.

function sendOperationRequest(operationArguments: OperationArguments, operationSpec: OperationSpec, callback?: ServiceCallback<any>): Promise<RestResponse>

Parameters

operationArguments
OperationArguments

The arguments that the HTTP request's templated values will be populated from.

operationSpec
OperationSpec

The OperationSpec to use to populate the httpRequest.

callback

ServiceCallback<any>

The callback to call when the response is received.

Returns

Promise<RestResponse>

Inherited From EventGridClientContext.sendOperationRequest

sendRequest(RequestPrepareOptions | WebResourceLike)

Send the provided httpRequest.

function sendRequest(options: RequestPrepareOptions | WebResourceLike): Promise<HttpOperationResponse>

Parameters

Returns

Inherited From EventGridClientContext.sendRequest