EventGridClient class
- Extends
-
AzureServiceClient
Constructors
Event |
Initializes a new instance of the EventGridClient class. |
Properties
accept |
|
api |
|
credentials | |
generate |
|
long |
Methods
publish |
|
publish |
Publishes a batch of events to an Azure Event Grid topic. |
publish |
|
publish |
Publishes a batch of events to an Azure Event Grid topic. |
Inherited Methods
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
-
AzureServiceClientOptions
The parameter options
Property Details
acceptLanguage
acceptLanguage: string
Property Value
string
apiVersion
apiVersion: string
Property Value
string
credentials
credentials: ServiceClientCredentials
Property Value
ServiceClientCredentials
generateClientRequestId
generateClientRequestId: boolean
Property Value
boolean
longRunningOperationRetryTimeout
longRunningOperationRetryTimeout: number
Property Value
number
Method Details
publishEvents(string, EventGridEvent[], ServiceCallback<void>)
function publishEvents(topicHostname: string, events: EventGridEvent[], callback: ServiceCallback<void>)
Parameters
- topicHostname
-
string
- events
- callback
-
ServiceCallback<void>
publishEvents(string, EventGridEvent[], { customHeaders?: {[headerName: string]: string} })
Publishes a batch of events to an Azure Event Grid topic.
function publishEvents(topicHostname: string, events: EventGridEvent[], options?: { customHeaders?: {[headerName: string]: string} }): Promise<void>
Parameters
- topicHostname
-
string
The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net
- events
An array of events to be published to Event Grid.
- options
-
{ customHeaders?: {[headerName: string]: string} }
Optional Parameters.
Returns
Promise<void>
If a callback was passed as the last parameter then it returns the callback else returns a Promise.
{Promise} A promise is returned.
publishEvents(string, EventGridEvent[], { customHeaders?: {[headerName: string]: string} }, ServiceCallback<void>)
function publishEvents(topicHostname: string, events: EventGridEvent[], options: { customHeaders?: {[headerName: string]: string} }, callback: ServiceCallback<void>)
Parameters
- topicHostname
-
string
- events
- options
-
{ customHeaders?: {[headerName: string]: string} }
- callback
-
ServiceCallback<void>
publishEventsWithHttpOperationResponse(string, EventGridEvent[], { customHeaders?: {[headerName: string]: string} })
Publishes a batch of events to an Azure Event Grid topic.
function publishEventsWithHttpOperationResponse(topicHostname: string, events: EventGridEvent[], options?: { customHeaders?: {[headerName: string]: string} }): Promise<HttpOperationResponse<void>>
Parameters
- topicHostname
-
string
The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net
- events
An array of events to be published to Event Grid.
- options
-
{ customHeaders?: {[headerName: string]: string} }
Optional Parameters.
Returns
Promise<HttpOperationResponse<void>>
A promise is returned
Inherited Method Details
addUserAgentInfo(any)
Adds custom information to user agent header
function addUserAgentInfo(additionalUserAgentInfo: any)
Parameters
- additionalUserAgentInfo
-
any
information to be added to user agent header, as string.
Inherited From AzureServiceClient.addUserAgentInfo
getLongRunningOperationResult<TResult>(HttpOperationResponse<TResult>, RequestOptions)
function getLongRunningOperationResult<TResult>(resultOfInitialRequest: HttpOperationResponse<TResult>, options?: RequestOptions): Promise<TResult>
Parameters
- resultOfInitialRequest
-
HttpOperationResponse<TResult>
- options
-
RequestOptions
Returns
Promise<TResult>
Inherited From AzureServiceClient.getLongRunningOperationResult
getLongRunningOperationResult<TResult>(HttpOperationResponse<TResult>, RequestOptions, ServiceCallback<TResult>)
function getLongRunningOperationResult<TResult>(resultOfInitialRequest: HttpOperationResponse<TResult>, options: RequestOptions, callback: ServiceCallback<TResult>)
Parameters
- resultOfInitialRequest
-
HttpOperationResponse<TResult>
- options
-
RequestOptions
- callback
-
ServiceCallback<TResult>
Inherited From AzureServiceClient.getLongRunningOperationResult
getLongRunningOperationResult<TResult>(HttpOperationResponse<TResult>, ServiceCallback<TResult>)
function getLongRunningOperationResult<TResult>(resultOfInitialRequest: HttpOperationResponse<TResult>, callback: ServiceCallback<TResult>)
Parameters
- resultOfInitialRequest
-
HttpOperationResponse<TResult>
- callback
-
ServiceCallback<TResult>
Inherited From AzureServiceClient.getLongRunningOperationResult
getPackageJsonInfo(string)
Attempts to find package.json for the given azure nodejs package. If found, returns the name and version of the package by reading the package.json If package.json is not found, returns a default value.
function getPackageJsonInfo(managementClientDir: string): { name: string, version: string }
Parameters
- managementClientDir
-
string
pass the directory of the specific azure management client.
Returns
{ name: string, version: string }
packageJsonInfo - "name" and "version" of the desired package.
Inherited From AzureServiceClient.getPackageJsonInfo
sendLongRunningRequest<TResult>(LongRunningUrlBasedRequestPrepareOptions | LongRunningPathTemplateBasedRequestPrepareOptions)
function sendLongRunningRequest<TResult>(options: LongRunningUrlBasedRequestPrepareOptions | LongRunningPathTemplateBasedRequestPrepareOptions): Promise<TResult>
Parameters
- options
-
LongRunningUrlBasedRequestPrepareOptions | LongRunningPathTemplateBasedRequestPrepareOptions
Returns
Promise<TResult>
Inherited From AzureServiceClient.sendLongRunningRequest
sendLongRunningRequest<TResult>(LongRunningUrlBasedRequestPrepareOptions | LongRunningPathTemplateBasedRequestPrepareOptions, ServiceCallback<TResult>)
function sendLongRunningRequest<TResult>(options: LongRunningUrlBasedRequestPrepareOptions | LongRunningPathTemplateBasedRequestPrepareOptions, callback: ServiceCallback<TResult>)
Parameters
- options
-
LongRunningUrlBasedRequestPrepareOptions | LongRunningPathTemplateBasedRequestPrepareOptions
- callback
-
ServiceCallback<TResult>
Inherited From AzureServiceClient.sendLongRunningRequest
sendLongRunningRequestWithHttpOperationResponse<TResult>(LongRunningUrlBasedRequestPrepareOptions | LongRunningPathTemplateBasedRequestPrepareOptions)
function sendLongRunningRequestWithHttpOperationResponse<TResult>(options: LongRunningUrlBasedRequestPrepareOptions | LongRunningPathTemplateBasedRequestPrepareOptions): Promise<HttpOperationResponse<TResult>>
Parameters
- options
-
LongRunningUrlBasedRequestPrepareOptions | LongRunningPathTemplateBasedRequestPrepareOptions
Returns
Promise<HttpOperationResponse<TResult>>
Inherited From AzureServiceClient.sendLongRunningRequestWithHttpOperationResponse
sendRequest<TResult>(UrlBasedRequestPrepareOptions | PathTemplateBasedRequestPrepareOptions)
function sendRequest<TResult>(options: UrlBasedRequestPrepareOptions | PathTemplateBasedRequestPrepareOptions): Promise<TResult>
Parameters
- options
-
UrlBasedRequestPrepareOptions | PathTemplateBasedRequestPrepareOptions
Returns
Promise<TResult>
Inherited From AzureServiceClient.sendRequest
sendRequest<TResult>(UrlBasedRequestPrepareOptions | PathTemplateBasedRequestPrepareOptions, ServiceCallback<TResult>)
function sendRequest<TResult>(options: UrlBasedRequestPrepareOptions | PathTemplateBasedRequestPrepareOptions, callback: ServiceCallback<TResult>)
Parameters
- options
-
UrlBasedRequestPrepareOptions | PathTemplateBasedRequestPrepareOptions
- callback
-
ServiceCallback<TResult>
Inherited From AzureServiceClient.sendRequest
sendRequestWithHttpOperationResponse<TResult>(UrlBasedRequestPrepareOptions | PathTemplateBasedRequestPrepareOptions)
function sendRequestWithHttpOperationResponse<TResult>(options: UrlBasedRequestPrepareOptions | PathTemplateBasedRequestPrepareOptions): Promise<HttpOperationResponse<TResult>>
Parameters
- options
-
UrlBasedRequestPrepareOptions | PathTemplateBasedRequestPrepareOptions
Returns
Promise<HttpOperationResponse<TResult>>
Inherited From AzureServiceClient.sendRequestWithHttpOperationResponse
Azure SDK for JavaScript