AnomalyDetectorClient class

Client class for interacting with Azure Anomaly Detector service.

Extends

Constructors

AnomalyDetectorClient(string, TokenCredential | KeyCredential, PipelineOptions)

Creates an instance of AnomalyDetectorClient.

Example usage:

import { AnomalyDetectorClient, AzureKeyCredential } from "@azure/ai-anomaly-detector";

const client = new AnomalyDetectorClient(
   "<service endpoint>",
   new AzureKeyCredential("<api key>")
);

Inherited Properties

apiVersion
endpoint

Inherited Methods

deleteMultivariateModel(string, AnomalyDetectorDeleteMultivariateModelOptionalParams)

Delete an existing multivariate model according to the modelId

detectAnomaly(string, DetectionRequest, AnomalyDetectorDetectAnomalyOptionalParams)

Submit detection multivariate anomaly task with the trained model of modelId, the input schema should be the same with the training request. Thus request will be complete asynchronously and will return a resultId for querying the detection result.The request should be a source link to indicate an externally accessible Azure storage Uri (preferably a Shared Access Signature Uri). All time-series used in generate the model must be zipped into one single file. Each time-series will be as follows: the first column is timestamp and the second column is value.

detectChangePoint(DetectChangePointRequest, AnomalyDetectorDetectChangePointOptionalParams)

Evaluate change point score of every series point

detectEntireSeries(DetectRequest, AnomalyDetectorDetectEntireSeriesOptionalParams)

This operation generates a model with an entire series, each point is detected with the same model. With this method, points before and after a certain point are used to determine whether it is an anomaly. The entire detection can give user an overall status of the time series.

detectLastPoint(DetectRequest, AnomalyDetectorDetectLastPointOptionalParams)

This operation generates a model using points before the latest one. With this method, only historical points are used to determine whether the target point is an anomaly. The latest point detecting operation matches the scenario of real-time monitoring of business metrics.

exportModel(string, AnomalyDetectorExportModelOptionalParams)

Export multivariate anomaly detection model based on modelId

getDetectionResult(string, AnomalyDetectorGetDetectionResultOptionalParams)

Get multivariate anomaly detection result based on resultId returned by the DetectAnomalyAsync api

getMultivariateModel(string, AnomalyDetectorGetMultivariateModelOptionalParams)

Get detailed information of multivariate model, including the training status and variables used in the model.

lastDetectAnomaly(string, LastDetectionRequest, AnomalyDetectorLastDetectAnomalyOptionalParams)

Synchronized API for anomaly detection.

listMultivariateModel(AnomalyDetectorListMultivariateModelOptionalParams)

List models of a subscription

sendOperationRequest(OperationArguments, OperationSpec, ServiceCallback<any>)

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

sendRequest(RequestPrepareOptions | WebResourceLike)

Send the provided httpRequest.

trainMultivariateModel(AnomalyDetectorClientModelInfo, AnomalyDetectorTrainMultivariateModelOptionalParams)

Create and train a multivariate anomaly detection model. The request must include a source parameter to indicate an externally accessible Azure storage Uri (preferably a Shared Access Signature Uri). All time-series used in generate the model must be zipped into one single file. Each time-series will be in a single CSV file in which the first column is timestamp and the second column is value.

Constructor Details

AnomalyDetectorClient(string, TokenCredential | KeyCredential, PipelineOptions)

Creates an instance of AnomalyDetectorClient.

Example usage:

import { AnomalyDetectorClient, AzureKeyCredential } from "@azure/ai-anomaly-detector";

const client = new AnomalyDetectorClient(
   "<service endpoint>",
   new AzureKeyCredential("<api key>")
);
new AnomalyDetectorClient(endpointUrl: string, credential: TokenCredential | KeyCredential, options?: PipelineOptions)

Parameters

endpointUrl

string

Url to an Azure Anomaly Detector service endpoint

credential

TokenCredential | KeyCredential

Used to authenticate requests to the service.

options
PipelineOptions

Used to configure the Form Recognizer client.

Inherited Property Details

apiVersion

apiVersion: string

Property Value

string

Inherited From AnomalyDetector.apiVersion

endpoint

endpoint: string

Property Value

string

Inherited From AnomalyDetector.endpoint

Inherited Method Details

deleteMultivariateModel(string, AnomalyDetectorDeleteMultivariateModelOptionalParams)

Delete an existing multivariate model according to the modelId

function deleteMultivariateModel(modelId: string, options?: AnomalyDetectorDeleteMultivariateModelOptionalParams): Promise<RestResponse>

Parameters

modelId

string

Model identifier.

Returns

Promise<RestResponse>

Inherited From AnomalyDetector.deleteMultivariateModel

detectAnomaly(string, DetectionRequest, AnomalyDetectorDetectAnomalyOptionalParams)

Submit detection multivariate anomaly task with the trained model of modelId, the input schema should be the same with the training request. Thus request will be complete asynchronously and will return a resultId for querying the detection result.The request should be a source link to indicate an externally accessible Azure storage Uri (preferably a Shared Access Signature Uri). All time-series used in generate the model must be zipped into one single file. Each time-series will be as follows: the first column is timestamp and the second column is value.

function detectAnomaly(modelId: string, body: DetectionRequest, options?: AnomalyDetectorDetectAnomalyOptionalParams): Promise<AnomalyDetectorDetectAnomalyResponse>

Parameters

modelId

string

Model identifier.

body
DetectionRequest

Detect anomaly request

options
AnomalyDetectorDetectAnomalyOptionalParams

The options parameters.

Returns

Inherited From AnomalyDetector.detectAnomaly

detectChangePoint(DetectChangePointRequest, AnomalyDetectorDetectChangePointOptionalParams)

Evaluate change point score of every series point

function detectChangePoint(body: DetectChangePointRequest, options?: AnomalyDetectorDetectChangePointOptionalParams): Promise<AnomalyDetectorDetectChangePointResponse>

Parameters

body
DetectChangePointRequest

Time series points and granularity is needed. Advanced model parameters can also be set in the request if needed.

options
AnomalyDetectorDetectChangePointOptionalParams

The options parameters.

Returns

Inherited From AnomalyDetector.detectChangePoint

detectEntireSeries(DetectRequest, AnomalyDetectorDetectEntireSeriesOptionalParams)

This operation generates a model with an entire series, each point is detected with the same model. With this method, points before and after a certain point are used to determine whether it is an anomaly. The entire detection can give user an overall status of the time series.

function detectEntireSeries(body: DetectRequest, options?: AnomalyDetectorDetectEntireSeriesOptionalParams): Promise<AnomalyDetectorDetectEntireSeriesResponse>

Parameters

body
DetectRequest

Time series points and period if needed. Advanced model parameters can also be set in the request.

options
AnomalyDetectorDetectEntireSeriesOptionalParams

The options parameters.

Returns

Inherited From AnomalyDetector.detectEntireSeries

detectLastPoint(DetectRequest, AnomalyDetectorDetectLastPointOptionalParams)

This operation generates a model using points before the latest one. With this method, only historical points are used to determine whether the target point is an anomaly. The latest point detecting operation matches the scenario of real-time monitoring of business metrics.

function detectLastPoint(body: DetectRequest, options?: AnomalyDetectorDetectLastPointOptionalParams): Promise<AnomalyDetectorDetectLastPointResponse>

Parameters

body
DetectRequest

Time series points and period if needed. Advanced model parameters can also be set in the request.

options
AnomalyDetectorDetectLastPointOptionalParams

The options parameters.

Returns

Inherited From AnomalyDetector.detectLastPoint

exportModel(string, AnomalyDetectorExportModelOptionalParams)

Export multivariate anomaly detection model based on modelId

function exportModel(modelId: string, options?: AnomalyDetectorExportModelOptionalParams): Promise<AnomalyDetectorExportModelResponse>

Parameters

modelId

string

Model identifier.

options
AnomalyDetectorExportModelOptionalParams

The options parameters.

Returns

Inherited From AnomalyDetector.exportModel

getDetectionResult(string, AnomalyDetectorGetDetectionResultOptionalParams)

Get multivariate anomaly detection result based on resultId returned by the DetectAnomalyAsync api

function getDetectionResult(resultId: string, options?: AnomalyDetectorGetDetectionResultOptionalParams): Promise<AnomalyDetectorGetDetectionResultResponse>

Parameters

resultId

string

Result identifier.

options
AnomalyDetectorGetDetectionResultOptionalParams

The options parameters.

Returns

Inherited From AnomalyDetector.getDetectionResult

getMultivariateModel(string, AnomalyDetectorGetMultivariateModelOptionalParams)

Get detailed information of multivariate model, including the training status and variables used in the model.

function getMultivariateModel(modelId: string, options?: AnomalyDetectorGetMultivariateModelOptionalParams): Promise<AnomalyDetectorGetMultivariateModelResponse>

Parameters

modelId

string

Model identifier.

options
AnomalyDetectorGetMultivariateModelOptionalParams

The options parameters.

Returns

Inherited From AnomalyDetector.getMultivariateModel

lastDetectAnomaly(string, LastDetectionRequest, AnomalyDetectorLastDetectAnomalyOptionalParams)

Synchronized API for anomaly detection.

function lastDetectAnomaly(modelId: string, body: LastDetectionRequest, options?: AnomalyDetectorLastDetectAnomalyOptionalParams): Promise<AnomalyDetectorLastDetectAnomalyResponse>

Parameters

modelId

string

Model identifier.

body
LastDetectionRequest

Request for last detection.

options
AnomalyDetectorLastDetectAnomalyOptionalParams

The options parameters.

Returns

Inherited From AnomalyDetector.lastDetectAnomaly

listMultivariateModel(AnomalyDetectorListMultivariateModelOptionalParams)

List models of a subscription

function listMultivariateModel(options?: AnomalyDetectorListMultivariateModelOptionalParams): PagedAsyncIterableIterator<AnomalyDetectorClientModelSnapshot, AnomalyDetectorClientModelSnapshot[], PageSettings>

Parameters

options
AnomalyDetectorListMultivariateModelOptionalParams

The options parameters.

Returns

Inherited From AnomalyDetector.listMultivariateModel

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 AnomalyDetector.sendOperationRequest

sendRequest(RequestPrepareOptions | WebResourceLike)

Send the provided httpRequest.

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

Parameters

Returns

Inherited From AnomalyDetector.sendRequest

trainMultivariateModel(AnomalyDetectorClientModelInfo, AnomalyDetectorTrainMultivariateModelOptionalParams)

Create and train a multivariate anomaly detection model. The request must include a source parameter to indicate an externally accessible Azure storage Uri (preferably a Shared Access Signature Uri). All time-series used in generate the model must be zipped into one single file. Each time-series will be in a single CSV file in which the first column is timestamp and the second column is value.

function trainMultivariateModel(body: AnomalyDetectorClientModelInfo, options?: AnomalyDetectorTrainMultivariateModelOptionalParams): Promise<AnomalyDetectorTrainMultivariateModelResponse>

Parameters

body
AnomalyDetectorClientModelInfo

Training request

options
AnomalyDetectorTrainMultivariateModelOptionalParams

The options parameters.

Returns

Inherited From AnomalyDetector.trainMultivariateModel