Share via


AnalysisResultPoller interface

Extends

Properties

operationId

The operation ID

Inherited Properties

isDone

Is true if the poller has finished polling.

operationState

The state of the operation. It can be undefined if the poller has not been submitted yet.

result

The result value of the operation, regardless of the state of the poller. It can be undefined or an incomplete form of the final TResult value depending on the implementation.

[toStringTag]

Inherited Methods

catch<TResult>(null | (reason: any) => TResult | PromiseLike<TResult>)

Attaches a callback for only the rejection of the Promise.

finally(null | () => void)

Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

onProgress((state: OperationState<AnalysisResult>) => void)

Invokes the provided callback after each polling is completed, sending the current state of the poller's operation.

It returns a method that can be used to stop receiving updates on the given callback function.

poll({ abortSignal?: AbortSignalLike })

Returns a promise that will resolve once a single polling request finishes. It does this by calling the update method of the Poller's operation.

pollUntilDone({ abortSignal?: AbortSignalLike })

Returns a promise that will resolve once the underlying operation is completed.

serialize()

Returns a promise that could be used for serialized version of the poller's operation by invoking the operation's serialize method.

submitted()

Returns a promise that could be used to check if the poller has been submitted.

then<TResult1, TResult2>(null | (value: AnalysisResult) => TResult1 | PromiseLike<TResult1>, null | (reason: any) => TResult2 | PromiseLike<TResult2>)

Attaches callbacks for the resolution and/or rejection of the Promise.

Property Details

operationId

The operation ID

operationId?: string

Property Value

string

Inherited Property Details

isDone

Is true if the poller has finished polling.

isDone: boolean

Property Value

boolean

Inherited From PollerLike.isDone

operationState

The state of the operation. It can be undefined if the poller has not been submitted yet.

operationState: undefined | OperationState<AnalysisResult>

Property Value

Inherited From PollerLike.operationState

result

The result value of the operation, regardless of the state of the poller. It can be undefined or an incomplete form of the final TResult value depending on the implementation.

result: undefined | AnalysisResult

Property Value

undefined | AnalysisResult

Inherited From PollerLike.result

[toStringTag]

[toStringTag]: string

Property Value

string

Inherited From PollerLike.__@toStringTag@401

Inherited Method Details

catch<TResult>(null | (reason: any) => TResult | PromiseLike<TResult>)

Attaches a callback for only the rejection of the Promise.

function catch<TResult>(onrejected?: null | (reason: any) => TResult | PromiseLike<TResult>): Promise<AnalysisResult | TResult>

Parameters

onrejected

null | (reason: any) => TResult | PromiseLike<TResult>

The callback to execute when the Promise is rejected.

Returns

Promise<AnalysisResult | TResult>

A Promise for the completion of the callback.

Inherited From PollerLike.catch

finally(null | () => void)

Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

function finally(onfinally?: null | () => void): Promise<AnalysisResult>

Parameters

onfinally

null | () => void

The callback to execute when the Promise is settled (fulfilled or rejected).

Returns

Promise<AnalysisResult>

A Promise for the completion of the callback.

Inherited From PollerLike.finally

onProgress((state: OperationState<AnalysisResult>) => void)

Invokes the provided callback after each polling is completed, sending the current state of the poller's operation.

It returns a method that can be used to stop receiving updates on the given callback function.

function onProgress(callback: (state: OperationState<AnalysisResult>) => void): CancelOnProgress

Parameters

callback

(state: OperationState<AnalysisResult>) => void

Returns

Inherited From PollerLike.onProgress

poll({ abortSignal?: AbortSignalLike })

Returns a promise that will resolve once a single polling request finishes. It does this by calling the update method of the Poller's operation.

function poll(options?: { abortSignal?: AbortSignalLike }): Promise<OperationState<AnalysisResult>>

Parameters

options

{ abortSignal?: AbortSignalLike }

Returns

Inherited From PollerLike.poll

pollUntilDone({ abortSignal?: AbortSignalLike })

Returns a promise that will resolve once the underlying operation is completed.

function pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise<AnalysisResult>

Parameters

pollOptions

{ abortSignal?: AbortSignalLike }

Returns

Promise<AnalysisResult>

Inherited From PollerLike.pollUntilDone

serialize()

Returns a promise that could be used for serialized version of the poller's operation by invoking the operation's serialize method.

function serialize(): Promise<string>

Returns

Promise<string>

Inherited From PollerLike.serialize

submitted()

Returns a promise that could be used to check if the poller has been submitted.

function submitted(): Promise<void>

Returns

Promise<void>

Inherited From PollerLike.submitted

then<TResult1, TResult2>(null | (value: AnalysisResult) => TResult1 | PromiseLike<TResult1>, null | (reason: any) => TResult2 | PromiseLike<TResult2>)

Attaches callbacks for the resolution and/or rejection of the Promise.

function then<TResult1, TResult2>(onfulfilled?: null | (value: AnalysisResult) => TResult1 | PromiseLike<TResult1>, onrejected?: null | (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>

Parameters

onfulfilled

null | (value: AnalysisResult) => TResult1 | PromiseLike<TResult1>

The callback to execute when the Promise is resolved.

onrejected

null | (reason: any) => TResult2 | PromiseLike<TResult2>

The callback to execute when the Promise is rejected.

Returns

Promise<TResult1 | TResult2>

A Promise for the completion of which ever callback is executed.

Inherited From PollerLike.then