@azure-rest/ai-anomaly-detector 1.0.0-alpha.20221107.2 → 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,39 +2,71 @@ import { Client } from '@azure-rest/core-client';
2
2
  import { ClientOptions } from '@azure-rest/core-client';
3
3
  import { HttpResponse } from '@azure-rest/core-client';
4
4
  import { KeyCredential } from '@azure/core-auth';
5
- import { LroEngineOptions } from '@azure/core-lro';
6
5
  import { PagedAsyncIterableIterator } from '@azure/core-paging';
7
6
  import { PathUncheckedResponse } from '@azure-rest/core-client';
8
- import { PollerLike } from '@azure/core-lro';
9
- import { PollOperationState } from '@azure/core-lro';
10
7
  import { RawHttpHeaders } from '@azure/core-rest-pipeline';
11
8
  import { RequestParameters } from '@azure-rest/core-client';
12
9
  import { StreamableMethod } from '@azure-rest/core-client';
13
10
 
14
11
  /** An optional field, indicating the manner to align multiple variables. */
15
12
  export declare interface AlignPolicy {
16
- /** An optional field, indicating how to align different variables to the same time-range. Either Inner or Outer. */
13
+ /**
14
+ * An optional field, indicating how to align different variables to the same
15
+ * time-range. Either Inner or Outer.
16
+ */
17
17
  alignMode?: "Inner" | "Outer";
18
- /** An optional field, indicating how missing values will be filled. One of Previous, Subsequent, Linear, Zero, Fixed. */
19
- fillNAMethod?: "Previous" | "Subsequent" | "Linear" | "Zero" | "Fixed";
18
+ /**
19
+ * An optional field, indicating how missing values will be filled. One of
20
+ * Previous, Subsequent, Linear, Zero, Fixed.
21
+ *
22
+ * Possible values: Previous, Subsequent, Linear, Zero, Fixed
23
+ */
24
+ fillNAMethod?: string;
20
25
  /** An optional field. Required when fillNAMethod is Fixed. */
21
26
  paddingValue?: number;
22
27
  }
23
28
 
24
29
  /** An optional field, indicating the manner to align multiple variables. */
25
30
  export declare interface AlignPolicyOutput {
26
- /** An optional field, indicating how to align different variables to the same time-range. Either Inner or Outer. */
31
+ /**
32
+ * An optional field, indicating how to align different variables to the same
33
+ * time-range. Either Inner or Outer.
34
+ */
27
35
  alignMode?: "Inner" | "Outer";
28
- /** An optional field, indicating how missing values will be filled. One of Previous, Subsequent, Linear, Zero, Fixed. */
29
- fillNAMethod?: "Previous" | "Subsequent" | "Linear" | "Zero" | "Fixed";
36
+ /**
37
+ * An optional field, indicating how missing values will be filled. One of
38
+ * Previous, Subsequent, Linear, Zero, Fixed.
39
+ *
40
+ * Possible values: Previous, Subsequent, Linear, Zero, Fixed
41
+ */
42
+ fillNAMethod?: string;
30
43
  /** An optional field. Required when fillNAMethod is Fixed. */
31
44
  paddingValue?: number;
32
45
  }
33
46
 
47
+ /** Response of getting a model. */
48
+ export declare interface AnomalyDetectionModelOutput {
49
+ /** Model identifier. */
50
+ modelId: string;
51
+ /** Date and time (UTC) when the model was created. */
52
+ createdTime: string;
53
+ /** Date and time (UTC) when the model was last updated. */
54
+ lastUpdatedTime: string;
55
+ /**
56
+ * Training result of a model including its status, errors and diagnostics
57
+ * information.
58
+ */
59
+ modelInfo?: ModelInfoOutput;
60
+ }
61
+
34
62
  /** Error information returned by the API. */
35
63
  export declare interface AnomalyDetectorErrorOutput {
36
- /** The error code. */
37
- code?: "InvalidCustomInterval" | "BadArgument" | "InvalidGranularity" | "InvalidPeriod" | "InvalidModelArgument" | "InvalidSeries" | "InvalidJsonFormat" | "RequiredGranularity" | "RequiredSeries" | "InvalidImputeMode" | "InvalidImputeFixedValue";
64
+ /**
65
+ * The error code.
66
+ *
67
+ * Possible values: InvalidCustomInterval, BadArgument, InvalidGranularity, InvalidPeriod, InvalidModelArgument, InvalidSeries, InvalidJsonFormat, RequiredGranularity, RequiredSeries, InvalidImputeMode, InvalidImputeFixedValue
68
+ */
69
+ code?: string;
38
70
  /** A message explaining the error reported by the service. */
39
71
  message?: string;
40
72
  }
@@ -43,140 +75,85 @@ export declare type AnomalyDetectorRestClient = Client & {
43
75
  path: Routes;
44
76
  };
45
77
 
78
+ export declare interface AnomalyDetectorRestClientOptions extends ClientOptions {
79
+ ApiVersion?: string;
80
+ }
81
+
82
+ /** Interpretation of the anomalous timestamp. */
46
83
  export declare interface AnomalyInterpretationOutput {
47
84
  /** Variable. */
48
85
  variable?: string;
49
- /** This score shows the percentage contributing to the anomalous timestamp. A number between 0 and 1. */
86
+ /**
87
+ * This score shows the percentage contributing to the anomalous timestamp. A
88
+ * number between 0 and 1.
89
+ */
50
90
  contributionScore?: number;
91
+ /** Correlation changes among the anomalous variables */
51
92
  correlationChanges?: CorrelationChangesOutput;
52
93
  }
53
94
 
95
+ /** Anomaly status and information. */
54
96
  export declare interface AnomalyStateOutput {
55
97
  /** The timestamp for this anomaly. */
56
98
  timestamp: string;
99
+ /** The detailed value of this anomalous timestamp. */
57
100
  value?: AnomalyValueOutput;
58
101
  /** Error message for the current timestamp. */
59
102
  errors?: Array<ErrorResponseOutput>;
60
103
  }
61
104
 
62
- /** Interpretation contains more details of the anomaly, which will help with root cause analysis. */
63
- export declare interface AnomalyValueInterpretationItemOutput extends AnomalyInterpretationOutput {
64
- }
65
-
105
+ /** Detailed information of the anomalous timestamp. */
66
106
  export declare interface AnomalyValueOutput {
67
107
  /** True if an anomaly is detected at the current timestamp. */
68
108
  isAnomaly: boolean;
69
- /** Indicates the significance of the anomaly. The higher the severity, the more significant the anomaly is. */
109
+ /**
110
+ * Indicates the significance of the anomaly. The higher the severity, the more
111
+ * significant the anomaly is.
112
+ */
70
113
  severity: number;
71
- /** Raw anomaly score of severity, will help indicate the degree of abnormality as well. */
114
+ /**
115
+ * Raw anomaly score of severity, will help indicate the degree of abnormality as
116
+ * well.
117
+ */
72
118
  score: number;
73
- interpretation?: Array<AnomalyValueInterpretationItemOutput>;
74
- }
75
-
76
- /** The request of change point detection. */
77
- export declare interface ChangePointDetectRequest {
78
- /** Time series data points. Points should be sorted by timestamp in ascending order to match the change point detection result. */
79
- series: Array<TimeSeriesPoint>;
80
- /** Can only be one of yearly, monthly, weekly, daily, hourly, minutely or secondly. Granularity is used for verify whether input series is valid. */
81
- granularity: "yearly" | "monthly" | "weekly" | "daily" | "hourly" | "minutely" | "secondly" | "microsecond" | "none";
82
- /** Custom Interval is used to set non-standard time interval, for example, if the series is 5 minutes, request can be set as {"granularity":"minutely", "customInterval":5}. */
83
- customInterval?: number;
84
- /** Optional argument, periodic value of a time series. If the value is null or does not present, the API will determine the period automatically. */
85
- period?: number;
86
- /** Optional argument, advanced model parameter, a default stableTrendWindow will be used in detection. */
87
- stableTrendWindow?: number;
88
- /** Optional argument, advanced model parameter, between 0.0-1.0, the lower the value is, the larger the trend error will be which means less change point will be accepted. */
89
- threshold?: number;
90
- }
91
-
92
- /** The response of change point detection. */
93
- export declare interface ChangePointDetectResponseOutput {
94
- /** Frequency extracted from the series, zero means no recurrent pattern has been found. */
95
- period?: number;
96
- /** isChangePoint contains change point properties for each input point. True means an anomaly either negative or positive has been detected. The index of the array is consistent with the input series. */
97
- isChangePoint?: Array<boolean>;
98
- /** the change point confidence of each point */
99
- confidenceScores?: Array<number>;
119
+ /** Interpretation of this anomalous timestamp. */
120
+ interpretation?: Array<AnomalyInterpretationOutput>;
100
121
  }
101
122
 
123
+ /** Correlation changes among the anomalous variables */
102
124
  export declare interface CorrelationChangesOutput {
103
125
  /** The correlated variables that have correlation changes under an anomaly. */
104
- changedVariables?: Array<string>;
105
- }
106
-
107
- export declare interface CreateAndTrainMultivariateModel {
108
- /** Create and train a multivariate anomaly detection model. The request must include a source parameter to indicate an externally accessible Azure blob storage URI.There are two types of data input: An URI pointed to an Azure blob storage folder which contains multiple CSV files, and each CSV file contains two columns, timestamp and variable. Another type of input is an URI pointed to a CSV file in Azure blob storage, which contains all the variables and a timestamp column. */
109
- post(options: CreateAndTrainMultivariateModelParameters): StreamableMethod<CreateAndTrainMultivariateModel201Response | CreateAndTrainMultivariateModelDefaultResponse>;
110
- /** List models of a resource. */
111
- get(options?: ListMultivariateModelsParameters): StreamableMethod<ListMultivariateModels200Response | ListMultivariateModelsDefaultResponse>;
112
- }
113
-
114
- export declare interface CreateAndTrainMultivariateModel201Headers {
115
- /** Location and ID of the model. */
116
- location?: string;
117
- }
118
-
119
- /** Create and train a multivariate anomaly detection model. The request must include a source parameter to indicate an externally accessible Azure blob storage URI.There are two types of data input: An URI pointed to an Azure blob storage folder which contains multiple CSV files, and each CSV file contains two columns, timestamp and variable. Another type of input is an URI pointed to a CSV file in Azure blob storage, which contains all the variables and a timestamp column. */
120
- export declare interface CreateAndTrainMultivariateModel201Response extends HttpResponse {
121
- status: "201";
122
- body: ModelOutput;
123
- headers: RawHttpHeaders & CreateAndTrainMultivariateModel201Headers;
124
- }
125
-
126
- export declare interface CreateAndTrainMultivariateModelBodyParam {
127
- /** Training request */
128
- body: ModelInfo;
129
- }
130
-
131
- export declare interface CreateAndTrainMultivariateModelDefaultHeaders {
132
- /** Error code */
133
- "x-ms-error-code"?: string;
134
- }
135
-
136
- /** Create and train a multivariate anomaly detection model. The request must include a source parameter to indicate an externally accessible Azure blob storage URI.There are two types of data input: An URI pointed to an Azure blob storage folder which contains multiple CSV files, and each CSV file contains two columns, timestamp and variable. Another type of input is an URI pointed to a CSV file in Azure blob storage, which contains all the variables and a timestamp column. */
137
- export declare interface CreateAndTrainMultivariateModelDefaultResponse extends HttpResponse {
138
- status: string;
139
- body: ErrorResponseOutput;
140
- headers: RawHttpHeaders & CreateAndTrainMultivariateModelDefaultHeaders;
141
- }
142
-
143
- export declare interface CreateAndTrainMultivariateModelMediaTypesParam {
144
- /** Request content type */
145
- contentType?: "application/json";
126
+ changedVariables?: string[];
146
127
  }
147
128
 
148
- export declare type CreateAndTrainMultivariateModelParameters = CreateAndTrainMultivariateModelMediaTypesParam & CreateAndTrainMultivariateModelBodyParam & RequestParameters;
149
-
150
129
  /**
151
130
  * Initialize a new instance of the class AnomalyDetectorRestClient class.
152
- * @param Endpoint type: string Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).
153
- * @param ApiVersion type: string Anomaly Detector API version (for example, v1.1).
131
+ * @param Endpoint type: string
154
132
  * @param credentials type: KeyCredential
155
133
  */
156
- declare function createClient(Endpoint: string, credentials: KeyCredential, options?: ClientOptions & {
157
- apiVersion?: string;
158
- }): AnomalyDetectorRestClient;
134
+ declare function createClient(Endpoint: string, credentials: KeyCredential, options?: AnomalyDetectorRestClientOptions): AnomalyDetectorRestClient;
159
135
  export default createClient;
160
136
 
161
137
  export declare interface DeleteMultivariateModel {
162
138
  /** Delete an existing multivariate model according to the modelId */
163
139
  delete(options?: DeleteMultivariateModelParameters): StreamableMethod<DeleteMultivariateModel204Response | DeleteMultivariateModelDefaultResponse>;
164
- /** Get detailed information of multivariate model, including the training status and variables used in the model. */
140
+ /**
141
+ * Get detailed information of multivariate model, including the training status
142
+ * and variables used in the model.
143
+ */
165
144
  get(options?: GetMultivariateModelParameters): StreamableMethod<GetMultivariateModel200Response | GetMultivariateModelDefaultResponse>;
166
145
  }
167
146
 
168
- /** Delete an existing multivariate model according to the modelId */
147
+ /** There is no content to send for this request, but the headers may be useful. */
169
148
  export declare interface DeleteMultivariateModel204Response extends HttpResponse {
170
149
  status: "204";
171
- body: Record<string, unknown>;
172
150
  }
173
151
 
174
152
  export declare interface DeleteMultivariateModelDefaultHeaders {
175
- /** Error code */
153
+ /** Error code. */
176
154
  "x-ms-error-code"?: string;
177
155
  }
178
156
 
179
- /** Delete an existing multivariate model according to the modelId */
180
157
  export declare interface DeleteMultivariateModelDefaultResponse extends HttpResponse {
181
158
  status: string;
182
159
  body: ErrorResponseOutput;
@@ -185,290 +162,196 @@ export declare interface DeleteMultivariateModelDefaultResponse extends HttpResp
185
162
 
186
163
  export declare type DeleteMultivariateModelParameters = RequestParameters;
187
164
 
188
- /** Detection request for batch inference. This is an asynchronous inference which will need another API to get detection results. */
189
- export declare interface DetectionRequest {
190
- /** Source link to the input data to indicate an accessible Azure storage Uri, either pointed to an Azure blob storage folder, or pointed to a CSV file in Azure blob storage based on you data schema selection. The data schema should be exactly the same with those used in the training phase. */
191
- dataSource: string;
192
- /** An optional field, which is used to specify the number of top contributed variables for one anomalous timestamp in the response. The default number is 10. */
193
- topContributorCount: number;
194
- /** A required field, indicating the start time of data for detection, which should be date-time of ISO 8601 format. */
195
- startTime: Date | string;
196
- /** A required field, indicating the end time of data for detection, which should be date-time of ISO 8601 format. */
197
- endTime: Date | string;
198
- }
199
-
200
- /** Detection request for batch inference. This is an asynchronous inference which will need another API to get detection results. */
201
- export declare interface DetectionRequestOutput {
202
- /** Source link to the input data to indicate an accessible Azure storage Uri, either pointed to an Azure blob storage folder, or pointed to a CSV file in Azure blob storage based on you data schema selection. The data schema should be exactly the same with those used in the training phase. */
203
- dataSource: string;
204
- /** An optional field, which is used to specify the number of top contributed variables for one anomalous timestamp in the response. The default number is 10. */
205
- topContributorCount: number;
206
- /** A required field, indicating the start time of data for detection, which should be date-time of ISO 8601 format. */
207
- startTime: string;
208
- /** A required field, indicating the end time of data for detection, which should be date-time of ISO 8601 format. */
209
- endTime: string;
210
- }
211
-
212
- /** Detection results for the given resultId. */
213
- export declare interface DetectionResultOutput {
165
+ export declare interface DetectMultivariateBatchAnomaly {
214
166
  /**
215
- * Result identifier, which is used to fetch the results of an inference call.
216
- *
217
- * Value may contain a UUID
167
+ * Submit multivariate anomaly detection task with the modelId of trained model
168
+ * and inference data, the input schema should be the same with the training
169
+ * request. The request will complete asynchronously and return a resultId to
170
+ * query the detection result.The request should be a source link to indicate an
171
+ * externally accessible Azure storage Uri, either pointed to an Azure blob
172
+ * storage folder, or pointed to a CSV file in Azure blob storage.
218
173
  */
219
- resultId: string;
220
- /** Multivariate anomaly detection status. */
221
- summary: DetectionResultSummaryOutput;
222
- /** Detection result for each timestamp. */
223
- results: Array<AnomalyStateOutput>;
224
- }
225
-
226
- /** Multivariate anomaly detection status. */
227
- export declare interface DetectionResultSummaryOutput {
228
- /** Status of detection results. One of CREATED, RUNNING, READY, and FAILED. */
229
- status: "CREATED" | "RUNNING" | "READY" | "FAILED";
230
- /** Error message when detection is failed. */
231
- errors?: Array<ErrorResponseOutput>;
232
- variableStates?: Array<VariableStateOutput>;
233
- /** Detection request for batch inference. This is an asynchronous inference which will need another API to get detection results. */
234
- setupInfo: DetectionRequestOutput;
235
- }
236
-
237
- export declare interface DetectMultivariateBatchAnomaly {
238
- /** Submit multivariate anomaly detection task with the modelId of trained model and inference data, the input schema should be the same with the training request. The request will complete asynchronously and return a resultId to query the detection result.The request should be a source link to indicate an externally accessible Azure storage Uri, either pointed to an Azure blob storage folder, or pointed to a CSV file in Azure blob storage. */
239
174
  post(options: DetectMultivariateBatchAnomalyParameters): StreamableMethod<DetectMultivariateBatchAnomaly202Response | DetectMultivariateBatchAnomalyDefaultResponse>;
240
175
  }
241
176
 
242
177
  export declare interface DetectMultivariateBatchAnomaly202Headers {
243
- /** Location of the detection result. */
244
- "operation-location"?: string;
245
178
  /** Id of the detection result. */
246
- "operation-id"?: string;
179
+ "operation-id": string;
180
+ /** Location of the detection result. */
181
+ "operation-location": string;
247
182
  }
248
183
 
249
- /** Submit multivariate anomaly detection task with the modelId of trained model and inference data, the input schema should be the same with the training request. The request will complete asynchronously and return a resultId to query the detection result.The request should be a source link to indicate an externally accessible Azure storage Uri, either pointed to an Azure blob storage folder, or pointed to a CSV file in Azure blob storage. */
184
+ /** The request has been accepted for processing, but processing has not yet completed. */
250
185
  export declare interface DetectMultivariateBatchAnomaly202Response extends HttpResponse {
251
186
  status: "202";
252
- body: DetectionResultOutput;
187
+ body: MultivariateDetectionResultOutput;
253
188
  headers: RawHttpHeaders & DetectMultivariateBatchAnomaly202Headers;
254
189
  }
255
190
 
256
191
  export declare interface DetectMultivariateBatchAnomalyBodyParam {
257
- /** Detect anomaly request */
258
- body: DetectionRequest;
192
+ /** Request of multivariate anomaly detection. */
193
+ body: MultivariateBatchDetectionOptions;
259
194
  }
260
195
 
261
196
  export declare interface DetectMultivariateBatchAnomalyDefaultHeaders {
262
- /** Error code */
197
+ /** Error code. */
263
198
  "x-ms-error-code"?: string;
264
199
  }
265
200
 
266
- /** Submit multivariate anomaly detection task with the modelId of trained model and inference data, the input schema should be the same with the training request. The request will complete asynchronously and return a resultId to query the detection result.The request should be a source link to indicate an externally accessible Azure storage Uri, either pointed to an Azure blob storage folder, or pointed to a CSV file in Azure blob storage. */
267
201
  export declare interface DetectMultivariateBatchAnomalyDefaultResponse extends HttpResponse {
268
202
  status: string;
269
203
  body: ErrorResponseOutput;
270
204
  headers: RawHttpHeaders & DetectMultivariateBatchAnomalyDefaultHeaders;
271
205
  }
272
206
 
273
- export declare interface DetectMultivariateBatchAnomalyMediaTypesParam {
274
- /** Request content type */
275
- contentType?: "application/json";
276
- }
277
-
278
- export declare type DetectMultivariateBatchAnomalyParameters = DetectMultivariateBatchAnomalyMediaTypesParam & DetectMultivariateBatchAnomalyBodyParam & RequestParameters;
207
+ export declare type DetectMultivariateBatchAnomalyParameters = DetectMultivariateBatchAnomalyBodyParam & RequestParameters;
279
208
 
280
209
  export declare interface DetectMultivariateLastAnomaly {
281
- /** Submit multivariate anomaly detection task with the modelId of trained model and inference data, and the inference data should be put into request body in a JSON format. The request will complete synchronously and return the detection immediately in the response body. */
210
+ /**
211
+ * Submit multivariate anomaly detection task with the modelId of trained model
212
+ * and inference data, and the inference data should be put into request body in a
213
+ * JSON format. The request will complete synchronously and return the detection
214
+ * immediately in the response body.
215
+ */
282
216
  post(options: DetectMultivariateLastAnomalyParameters): StreamableMethod<DetectMultivariateLastAnomaly200Response | DetectMultivariateLastAnomalyDefaultResponse>;
283
217
  }
284
218
 
285
- /** Submit multivariate anomaly detection task with the modelId of trained model and inference data, and the inference data should be put into request body in a JSON format. The request will complete synchronously and return the detection immediately in the response body. */
219
+ /** The request has succeeded. */
286
220
  export declare interface DetectMultivariateLastAnomaly200Response extends HttpResponse {
287
221
  status: "200";
288
- body: LastDetectionResultOutput;
222
+ body: MultivariateLastDetectionResultOutput;
289
223
  }
290
224
 
291
225
  export declare interface DetectMultivariateLastAnomalyBodyParam {
292
- /** Request for last detection */
293
- body: LastDetectionRequest;
226
+ /** Request of last detection. */
227
+ body: MultivariateLastDetectionOptions;
294
228
  }
295
229
 
296
230
  export declare interface DetectMultivariateLastAnomalyDefaultHeaders {
297
- /** Error code */
231
+ /** Error code. */
298
232
  "x-ms-error-code"?: string;
299
233
  }
300
234
 
301
- /** Submit multivariate anomaly detection task with the modelId of trained model and inference data, and the inference data should be put into request body in a JSON format. The request will complete synchronously and return the detection immediately in the response body. */
302
235
  export declare interface DetectMultivariateLastAnomalyDefaultResponse extends HttpResponse {
303
236
  status: string;
304
237
  body: ErrorResponseOutput;
305
238
  headers: RawHttpHeaders & DetectMultivariateLastAnomalyDefaultHeaders;
306
239
  }
307
240
 
308
- export declare interface DetectMultivariateLastAnomalyMediaTypesParam {
309
- /** Request content type */
310
- contentType?: "application/json";
311
- }
312
-
313
- export declare type DetectMultivariateLastAnomalyParameters = DetectMultivariateLastAnomalyMediaTypesParam & DetectMultivariateLastAnomalyBodyParam & RequestParameters;
314
-
315
- /** The request of entire or last anomaly detection. */
316
- export declare interface DetectRequest {
317
- /** Time series data points. Points should be sorted by timestamp in ascending order to match the anomaly detection result. If the data is not sorted correctly or there is duplicated timestamp, the API will not work. In such case, an error message will be returned. */
318
- series: Array<TimeSeriesPoint>;
319
- /** Optional argument, can be one of yearly, monthly, weekly, daily, hourly, minutely, secondly, microsecond or none. If granularity is not present, it will be none by default. If granularity is none, the timestamp property in time series point can be absent. */
320
- granularity?: "yearly" | "monthly" | "weekly" | "daily" | "hourly" | "minutely" | "secondly" | "microsecond" | "none";
321
- /** Custom Interval is used to set non-standard time interval, for example, if the series is 5 minutes, request can be set as {"granularity":"minutely", "customInterval":5}. */
322
- customInterval?: number;
323
- /** Optional argument, periodic value of a time series. If the value is null or does not present, the API will determine the period automatically. */
324
- period?: number;
325
- /** Optional argument, advanced model parameter, max anomaly ratio in a time series. */
326
- maxAnomalyRatio?: number;
327
- /** Optional argument, advanced model parameter, between 0-99, the lower the value is, the larger the margin value will be which means less anomalies will be accepted. */
328
- sensitivity?: number;
329
- /** Used to specify how to deal with missing values in the input series, it's used when granularity is not "none". */
330
- imputeMode?: "auto" | "previous" | "linear" | "fixed" | "zero" | "notFill";
331
- /** Used to specify the value to fill, it's used when granularity is not "none" and imputeMode is "fixed". */
332
- imputeFixedValue?: number;
333
- }
241
+ export declare type DetectMultivariateLastAnomalyParameters = DetectMultivariateLastAnomalyBodyParam & RequestParameters;
334
242
 
335
243
  export declare interface DetectUnivariateChangePoint {
336
244
  /** Evaluate change point score of every series point */
337
245
  post(options: DetectUnivariateChangePointParameters): StreamableMethod<DetectUnivariateChangePoint200Response | DetectUnivariateChangePointDefaultResponse>;
338
246
  }
339
247
 
340
- /** Evaluate change point score of every series point */
248
+ /** The request has succeeded. */
341
249
  export declare interface DetectUnivariateChangePoint200Response extends HttpResponse {
342
250
  status: "200";
343
- body: ChangePointDetectResponseOutput;
251
+ body: UnivariateChangePointDetectionResultOutput;
344
252
  }
345
253
 
346
254
  export declare interface DetectUnivariateChangePointBodyParam {
347
- /** Time series points and granularity is needed. Advanced model parameters can also be set in the request if needed. */
348
- body: ChangePointDetectRequest;
255
+ /** Method of univariate anomaly detection. */
256
+ body: UnivariateChangePointDetectionOptions;
349
257
  }
350
258
 
351
259
  export declare interface DetectUnivariateChangePointDefaultHeaders {
352
- /** error code */
260
+ /** Error code. */
353
261
  "x-ms-error-code"?: string;
354
262
  }
355
263
 
356
- /** Evaluate change point score of every series point */
357
264
  export declare interface DetectUnivariateChangePointDefaultResponse extends HttpResponse {
358
265
  status: string;
359
266
  body: AnomalyDetectorErrorOutput;
360
267
  headers: RawHttpHeaders & DetectUnivariateChangePointDefaultHeaders;
361
268
  }
362
269
 
363
- export declare interface DetectUnivariateChangePointMediaTypesParam {
364
- /** Request content type */
365
- contentType?: "application/json";
366
- }
367
-
368
- export declare type DetectUnivariateChangePointParameters = DetectUnivariateChangePointMediaTypesParam & DetectUnivariateChangePointBodyParam & RequestParameters;
270
+ export declare type DetectUnivariateChangePointParameters = DetectUnivariateChangePointBodyParam & RequestParameters;
369
271
 
370
272
  export declare interface DetectUnivariateEntireSeries {
371
- /** 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. */
273
+ /**
274
+ * This operation generates a model with an entire series, each point is detected
275
+ * with the same model. With this method, points before and after a certain point
276
+ * are used to determine whether it is an anomaly. The entire detection can give
277
+ * user an overall status of the time series.
278
+ */
372
279
  post(options: DetectUnivariateEntireSeriesParameters): StreamableMethod<DetectUnivariateEntireSeries200Response | DetectUnivariateEntireSeriesDefaultResponse>;
373
280
  }
374
281
 
375
- /** 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. */
282
+ /** The request has succeeded. */
376
283
  export declare interface DetectUnivariateEntireSeries200Response extends HttpResponse {
377
284
  status: "200";
378
- body: EntireDetectResponseOutput;
285
+ body: UnivariateEntireDetectionResultOutput;
379
286
  }
380
287
 
381
288
  export declare interface DetectUnivariateEntireSeriesBodyParam {
382
- /** Time series points and period if needed. Advanced model parameters can also be set in the request. */
383
- body: DetectRequest;
289
+ /** Method of univariate anomaly detection. */
290
+ body: UnivariateDetectionOptions;
384
291
  }
385
292
 
386
293
  export declare interface DetectUnivariateEntireSeriesDefaultHeaders {
387
- /** error code */
294
+ /** Error code. */
388
295
  "x-ms-error-code"?: string;
389
296
  }
390
297
 
391
- /** 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. */
392
298
  export declare interface DetectUnivariateEntireSeriesDefaultResponse extends HttpResponse {
393
299
  status: string;
394
300
  body: AnomalyDetectorErrorOutput;
395
301
  headers: RawHttpHeaders & DetectUnivariateEntireSeriesDefaultHeaders;
396
302
  }
397
303
 
398
- export declare interface DetectUnivariateEntireSeriesMediaTypesParam {
399
- /** Request content type */
400
- contentType?: "application/json";
401
- }
402
-
403
- export declare type DetectUnivariateEntireSeriesParameters = DetectUnivariateEntireSeriesMediaTypesParam & DetectUnivariateEntireSeriesBodyParam & RequestParameters;
304
+ export declare type DetectUnivariateEntireSeriesParameters = DetectUnivariateEntireSeriesBodyParam & RequestParameters;
404
305
 
405
306
  export declare interface DetectUnivariateLastPoint {
406
- /** This operation generates a model using the points that you sent into the API, and based on all data to determine whether the last point is anomalous. */
307
+ /**
308
+ * This operation generates a model using the points that you sent into the API,
309
+ * and based on all data to determine whether the last point is anomalous.
310
+ */
407
311
  post(options: DetectUnivariateLastPointParameters): StreamableMethod<DetectUnivariateLastPoint200Response | DetectUnivariateLastPointDefaultResponse>;
408
312
  }
409
313
 
410
- /** This operation generates a model using the points that you sent into the API, and based on all data to determine whether the last point is anomalous. */
314
+ /** The request has succeeded. */
411
315
  export declare interface DetectUnivariateLastPoint200Response extends HttpResponse {
412
316
  status: "200";
413
- body: LastDetectResponseOutput;
317
+ body: UnivariateLastDetectionResultOutput;
414
318
  }
415
319
 
416
320
  export declare interface DetectUnivariateLastPointBodyParam {
417
- /** Time series points and period if needed. Advanced model parameters can also be set in the request. */
418
- body: DetectRequest;
321
+ /** Method of univariate anomaly detection. */
322
+ body: UnivariateDetectionOptions;
419
323
  }
420
324
 
421
325
  export declare interface DetectUnivariateLastPointDefaultHeaders {
422
- /** error code */
326
+ /** Error code. */
423
327
  "x-ms-error-code"?: string;
424
328
  }
425
329
 
426
- /** This operation generates a model using the points that you sent into the API, and based on all data to determine whether the last point is anomalous. */
427
330
  export declare interface DetectUnivariateLastPointDefaultResponse extends HttpResponse {
428
331
  status: string;
429
332
  body: AnomalyDetectorErrorOutput;
430
333
  headers: RawHttpHeaders & DetectUnivariateLastPointDefaultHeaders;
431
334
  }
432
335
 
433
- export declare interface DetectUnivariateLastPointMediaTypesParam {
434
- /** Request content type */
435
- contentType?: "application/json";
436
- }
437
-
438
- export declare type DetectUnivariateLastPointParameters = DetectUnivariateLastPointMediaTypesParam & DetectUnivariateLastPointBodyParam & RequestParameters;
336
+ export declare type DetectUnivariateLastPointParameters = DetectUnivariateLastPointBodyParam & RequestParameters;
439
337
 
440
338
  /** Diagnostics information to help inspect the states of model or variable. */
441
339
  export declare interface DiagnosticsInfo {
340
+ /** Model status. */
442
341
  modelState?: ModelState;
342
+ /** Variable Status. */
443
343
  variableStates?: Array<VariableState>;
444
344
  }
445
345
 
446
346
  /** Diagnostics information to help inspect the states of model or variable. */
447
347
  export declare interface DiagnosticsInfoOutput {
348
+ /** Model status. */
448
349
  modelState?: ModelStateOutput;
350
+ /** Variable Status. */
449
351
  variableStates?: Array<VariableStateOutput>;
450
352
  }
451
353
 
452
- /** The response of entire anomaly detection. */
453
- export declare interface EntireDetectResponseOutput {
454
- /** Frequency extracted from the series, zero means no recurrent pattern has been found. */
455
- period: number;
456
- /** ExpectedValues contain expected value for each input point. The index of the array is consistent with the input series. */
457
- expectedValues: Array<number>;
458
- /** UpperMargins contain upper margin of each input point. UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. Anomalies in response can be filtered by upperBoundary and lowerBoundary. By adjusting marginScale value, less significant anomalies can be filtered in client side. The index of the array is consistent with the input series. */
459
- upperMargins: Array<number>;
460
- /** LowerMargins contain lower margin of each input point. LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. Points between the boundary can be marked as normal ones in client side. The index of the array is consistent with the input series. */
461
- lowerMargins: Array<number>;
462
- /** IsAnomaly contains anomaly properties for each input point. True means an anomaly either negative or positive has been detected. The index of the array is consistent with the input series. */
463
- isAnomaly: Array<boolean>;
464
- /** IsNegativeAnomaly contains anomaly status in negative direction for each input point. True means a negative anomaly has been detected. A negative anomaly means the point is detected as an anomaly and its real value is smaller than the expected one. The index of the array is consistent with the input series. */
465
- isNegativeAnomaly: Array<boolean>;
466
- /** IsPositiveAnomaly contain anomaly status in positive direction for each input point. True means a positive anomaly has been detected. A positive anomaly means the point is detected as an anomaly and its real value is larger than the expected one. The index of the array is consistent with the input series. */
467
- isPositiveAnomaly: Array<boolean>;
468
- /** The severity score for each input point. The larger the value is, the more sever the anomaly is. For normal points, the "severity" is always 0. */
469
- severity?: Array<number>;
470
- }
471
-
354
+ /** ErrorResponse contains code and message that shows the error information. */
472
355
  export declare interface ErrorResponse {
473
356
  /** The error code. */
474
357
  code: string;
@@ -476,6 +359,7 @@ export declare interface ErrorResponse {
476
359
  message: string;
477
360
  }
478
361
 
362
+ /** ErrorResponse contains code and message that shows the error information. */
479
363
  export declare interface ErrorResponseOutput {
480
364
  /** The error code. */
481
365
  code: string;
@@ -488,32 +372,25 @@ export declare interface ErrorResponseOutput {
488
372
  */
489
373
  export declare type GetArrayType<T> = T extends Array<infer TData> ? TData : never;
490
374
 
491
- /**
492
- * Helper function that builds a Poller object to help polling a long running operation.
493
- * @param client - Client to use for sending the request to get additional pages.
494
- * @param initialResponse - The initial response.
495
- * @param options - Options to set a resume state or custom polling interval.
496
- * @returns - A poller object to poll for operation state updates and eventually get the final response.
497
- */
498
- export declare function getLongRunningPoller<TResult extends HttpResponse>(client: Client, initialResponse: TResult, options?: LroEngineOptions<TResult, PollOperationState<TResult>>): PollerLike<PollOperationState<TResult>, TResult>;
499
-
500
375
  export declare interface GetMultivariateBatchDetectionResult {
501
- /** For asynchronous inference, get multivariate anomaly detection result based on resultId returned by the BatchDetectAnomaly api. */
376
+ /**
377
+ * For asynchronous inference, get multivariate anomaly detection result based on
378
+ * resultId returned by the BatchDetectAnomaly api.
379
+ */
502
380
  get(options?: GetMultivariateBatchDetectionResultParameters): StreamableMethod<GetMultivariateBatchDetectionResult200Response | GetMultivariateBatchDetectionResultDefaultResponse>;
503
381
  }
504
382
 
505
- /** For asynchronous inference, get multivariate anomaly detection result based on resultId returned by the BatchDetectAnomaly api. */
383
+ /** The request has succeeded. */
506
384
  export declare interface GetMultivariateBatchDetectionResult200Response extends HttpResponse {
507
385
  status: "200";
508
- body: DetectionResultOutput;
386
+ body: MultivariateDetectionResultOutput;
509
387
  }
510
388
 
511
389
  export declare interface GetMultivariateBatchDetectionResultDefaultHeaders {
512
- /** Error code */
390
+ /** Error code. */
513
391
  "x-ms-error-code"?: string;
514
392
  }
515
393
 
516
- /** For asynchronous inference, get multivariate anomaly detection result based on resultId returned by the BatchDetectAnomaly api. */
517
394
  export declare interface GetMultivariateBatchDetectionResultDefaultResponse extends HttpResponse {
518
395
  status: string;
519
396
  body: ErrorResponseOutput;
@@ -522,18 +399,17 @@ export declare interface GetMultivariateBatchDetectionResultDefaultResponse exte
522
399
 
523
400
  export declare type GetMultivariateBatchDetectionResultParameters = RequestParameters;
524
401
 
525
- /** Get detailed information of multivariate model, including the training status and variables used in the model. */
402
+ /** The request has succeeded. */
526
403
  export declare interface GetMultivariateModel200Response extends HttpResponse {
527
404
  status: "200";
528
- body: ModelOutput;
405
+ body: AnomalyDetectionModelOutput;
529
406
  }
530
407
 
531
408
  export declare interface GetMultivariateModelDefaultHeaders {
532
- /** Error code */
409
+ /** Error code. */
533
410
  "x-ms-error-code"?: string;
534
411
  }
535
412
 
536
- /** Get detailed information of multivariate model, including the training status and variables used in the model. */
537
413
  export declare interface GetMultivariateModelDefaultResponse extends HttpResponse {
538
414
  status: string;
539
415
  body: ErrorResponseOutput;
@@ -558,7 +434,7 @@ export declare function isUnexpected(response: DetectUnivariateChangePoint200Res
558
434
 
559
435
  export declare function isUnexpected(response: GetMultivariateBatchDetectionResult200Response | GetMultivariateBatchDetectionResultDefaultResponse): response is GetMultivariateBatchDetectionResultDefaultResponse;
560
436
 
561
- export declare function isUnexpected(response: CreateAndTrainMultivariateModel201Response | CreateAndTrainMultivariateModelDefaultResponse): response is CreateAndTrainMultivariateModelDefaultResponse;
437
+ export declare function isUnexpected(response: TrainMultivariateModel201Response | TrainMultivariateModelDefaultResponse): response is TrainMultivariateModelDefaultResponse;
562
438
 
563
439
  export declare function isUnexpected(response: ListMultivariateModels200Response | ListMultivariateModelsDefaultResponse): response is ListMultivariateModelsDefaultResponse;
564
440
 
@@ -570,52 +446,17 @@ export declare function isUnexpected(response: DetectMultivariateBatchAnomaly202
570
446
 
571
447
  export declare function isUnexpected(response: DetectMultivariateLastAnomaly200Response | DetectMultivariateLastAnomalyDefaultResponse): response is DetectMultivariateLastAnomalyDefaultResponse;
572
448
 
573
- export declare interface LastDetectionRequest {
574
- /** This contains the inference data, including the name, timestamps(ISO 8601) and values of variables. */
575
- variables: Array<VariableValues>;
576
- /** An optional field, which is used to specify the number of top contributed variables for one anomalous timestamp in the response. The default number is 10. */
577
- topContributorCount: number;
578
- }
579
-
580
- export declare interface LastDetectionResultOutput {
581
- variableStates?: Array<VariableStateOutput>;
582
- results?: Array<AnomalyStateOutput>;
583
- }
584
-
585
- /** The response of last anomaly detection. */
586
- export declare interface LastDetectResponseOutput {
587
- /** Frequency extracted from the series, zero means no recurrent pattern has been found. */
588
- period: number;
589
- /** Suggested input series points needed for detecting the latest point. */
590
- suggestedWindow: number;
591
- /** Expected value of the latest point. */
592
- expectedValue: number;
593
- /** Upper margin of the latest point. UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. If the value of latest point is between upperBoundary and lowerBoundary, it should be treated as normal value. By adjusting marginScale value, anomaly status of latest point can be changed. */
594
- upperMargin: number;
595
- /** Lower margin of the latest point. LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. */
596
- lowerMargin: number;
597
- /** Anomaly status of the latest point, true means the latest point is an anomaly either in negative direction or positive direction. */
598
- isAnomaly: boolean;
599
- /** Anomaly status in negative direction of the latest point. True means the latest point is an anomaly and its real value is smaller than the expected one. */
600
- isNegativeAnomaly: boolean;
601
- /** Anomaly status in positive direction of the latest point. True means the latest point is an anomaly and its real value is larger than the expected one. */
602
- isPositiveAnomaly: boolean;
603
- /** The severity score for the last input point. The larger the value is, the more sever the anomaly is. For normal points, the "severity" is always 0. */
604
- severity?: number;
605
- }
606
-
607
- /** List models of a resource. */
449
+ /** The request has succeeded. */
608
450
  export declare interface ListMultivariateModels200Response extends HttpResponse {
609
451
  status: "200";
610
452
  body: ModelListOutput;
611
453
  }
612
454
 
613
455
  export declare interface ListMultivariateModelsDefaultHeaders {
614
- /** Error code */
456
+ /** Error code. */
615
457
  "x-ms-error-code"?: string;
616
458
  }
617
459
 
618
- /** List models of a resource. */
619
460
  export declare interface ListMultivariateModelsDefaultResponse extends HttpResponse {
620
461
  status: string;
621
462
  body: ErrorResponseOutput;
@@ -635,50 +476,96 @@ export declare interface ListMultivariateModelsQueryParamProperties {
635
476
  top?: number;
636
477
  }
637
478
 
638
- /** Training result of a model including its status, errors and diagnostics information. */
479
+ /**
480
+ * Training result of a model including its status, errors and diagnostics
481
+ * information.
482
+ */
639
483
  export declare interface ModelInfo {
640
- /** Source link to the input data to indicate an accessible Azure storage Uri, either pointed to an Azure blob storage folder, or pointed to a CSV file in Azure blob storage based on you data schema selection. */
484
+ /**
485
+ * Source link to the input data to indicate an accessible Azure storage Uri,
486
+ * either pointed to an Azure blob storage folder, or pointed to a CSV file in
487
+ * Azure blob storage based on you data schema selection.
488
+ */
641
489
  dataSource: string;
642
- /** Data schema of input data source: OneTable or MultiTable. The default DataSchema is OneTable. */
643
- dataSchema?: "OneTable" | "MultiTable";
644
- /** A required field, indicating the start time of training data, which should be date-time of ISO 8601 format. */
490
+ /**
491
+ * Data schema of input data source: OneTable or MultiTable. The default
492
+ * DataSchema is OneTable.
493
+ *
494
+ * Possible values: OneTable, MultiTable
495
+ */
496
+ dataSchema?: string;
497
+ /**
498
+ * A required field, indicating the start time of training data, which should be
499
+ * date-time of ISO 8601 format.
500
+ */
645
501
  startTime: Date | string;
646
- /** A required field, indicating the end time of training data, which should be date-time of ISO 8601 format. */
502
+ /**
503
+ * A required field, indicating the end time of training data, which should be
504
+ * date-time of ISO 8601 format.
505
+ */
647
506
  endTime: Date | string;
648
- /** An optional field. The display name of the model whose maximum length is 24 characters. */
507
+ /**
508
+ * An optional field. The display name of the model whose maximum length is 24
509
+ * characters.
510
+ */
649
511
  displayName?: string;
650
- /** An optional field, indicating how many previous timestamps will be used to detect whether the timestamp is anomaly or not. */
512
+ /**
513
+ * An optional field, indicating how many previous timestamps will be used to
514
+ * detect whether the timestamp is anomaly or not.
515
+ */
651
516
  slidingWindow?: number;
652
517
  /** An optional field, indicating the manner to align multiple variables. */
653
518
  alignPolicy?: AlignPolicy;
654
519
  /** Model status. One of CREATED, RUNNING, READY, and FAILED. */
655
520
  status?: "CREATED" | "RUNNING" | "READY" | "FAILED";
656
- /** Error messages when failed to create a model. */
657
- errors?: Array<ErrorResponse>;
658
521
  /** Diagnostics information to help inspect the states of model or variable. */
659
522
  diagnosticsInfo?: DiagnosticsInfo;
660
523
  }
661
524
 
662
- /** Training result of a model including its status, errors and diagnostics information. */
525
+ /**
526
+ * Training result of a model including its status, errors and diagnostics
527
+ * information.
528
+ */
663
529
  export declare interface ModelInfoOutput {
664
- /** Source link to the input data to indicate an accessible Azure storage Uri, either pointed to an Azure blob storage folder, or pointed to a CSV file in Azure blob storage based on you data schema selection. */
530
+ /**
531
+ * Source link to the input data to indicate an accessible Azure storage Uri,
532
+ * either pointed to an Azure blob storage folder, or pointed to a CSV file in
533
+ * Azure blob storage based on you data schema selection.
534
+ */
665
535
  dataSource: string;
666
- /** Data schema of input data source: OneTable or MultiTable. The default DataSchema is OneTable. */
667
- dataSchema?: "OneTable" | "MultiTable";
668
- /** A required field, indicating the start time of training data, which should be date-time of ISO 8601 format. */
536
+ /**
537
+ * Data schema of input data source: OneTable or MultiTable. The default
538
+ * DataSchema is OneTable.
539
+ *
540
+ * Possible values: OneTable, MultiTable
541
+ */
542
+ dataSchema?: string;
543
+ /**
544
+ * A required field, indicating the start time of training data, which should be
545
+ * date-time of ISO 8601 format.
546
+ */
669
547
  startTime: string;
670
- /** A required field, indicating the end time of training data, which should be date-time of ISO 8601 format. */
548
+ /**
549
+ * A required field, indicating the end time of training data, which should be
550
+ * date-time of ISO 8601 format.
551
+ */
671
552
  endTime: string;
672
- /** An optional field. The display name of the model whose maximum length is 24 characters. */
553
+ /**
554
+ * An optional field. The display name of the model whose maximum length is 24
555
+ * characters.
556
+ */
673
557
  displayName?: string;
674
- /** An optional field, indicating how many previous timestamps will be used to detect whether the timestamp is anomaly or not. */
558
+ /**
559
+ * An optional field, indicating how many previous timestamps will be used to
560
+ * detect whether the timestamp is anomaly or not.
561
+ */
675
562
  slidingWindow?: number;
676
563
  /** An optional field, indicating the manner to align multiple variables. */
677
564
  alignPolicy?: AlignPolicyOutput;
678
565
  /** Model status. One of CREATED, RUNNING, READY, and FAILED. */
679
566
  status?: "CREATED" | "RUNNING" | "READY" | "FAILED";
680
567
  /** Error messages when failed to create a model. */
681
- errors?: Array<ErrorResponseOutput>;
568
+ readonly errors?: Array<ErrorResponseOutput>;
682
569
  /** Diagnostics information to help inspect the states of model or variable. */
683
570
  diagnosticsInfo?: DiagnosticsInfoOutput;
684
571
  }
@@ -686,7 +573,7 @@ export declare interface ModelInfoOutput {
686
573
  /** Response of listing models. */
687
574
  export declare interface ModelListOutput {
688
575
  /** List of models. */
689
- models: Array<ModelOutput>;
576
+ models: Array<AnomalyDetectionModelOutput>;
690
577
  /** Number of trained multivariate models. */
691
578
  currentCount: number;
692
579
  /** Maximum number of models that can be trained for this Anomaly Detector resource. */
@@ -695,42 +582,154 @@ export declare interface ModelListOutput {
695
582
  nextLink?: string;
696
583
  }
697
584
 
698
- /** Response of getting a model. */
699
- export declare interface ModelOutput {
585
+ /** Model status. */
586
+ export declare interface ModelState {
700
587
  /**
701
- * Model identifier.
702
- *
703
- * Value may contain a UUID
588
+ * This indicates the number of passes of the entire training dataset the
589
+ * algorithm has completed.
704
590
  */
705
- modelId: string;
706
- /** Date and time (UTC) when the model was created. */
707
- createdTime: string;
708
- /** Date and time (UTC) when the model was last updated. */
709
- lastUpdatedTime: string;
710
- /** Training result of a model including its status, errors and diagnostics information. */
711
- modelInfo?: ModelInfoOutput;
712
- }
713
-
714
- export declare interface ModelState {
715
- /** This indicates the number of passes of the entire training dataset the algorithm has completed. */
716
- epochIds?: Array<number>;
717
- /** List of metrics used to assess how the model fits the training data for each epoch. */
718
- trainLosses?: Array<number>;
719
- /** List of metrics used to assess how the model fits the validation set for each epoch. */
720
- validationLosses?: Array<number>;
591
+ epochIds?: number[];
592
+ /**
593
+ * List of metrics used to assess how the model fits the training data for each
594
+ * epoch.
595
+ */
596
+ trainLosses?: number[];
597
+ /**
598
+ * List of metrics used to assess how the model fits the validation set for each
599
+ * epoch.
600
+ */
601
+ validationLosses?: number[];
721
602
  /** Latency for each epoch. */
722
- latenciesInSeconds?: Array<number>;
603
+ latenciesInSeconds?: number[];
723
604
  }
724
605
 
606
+ /** Model status. */
725
607
  export declare interface ModelStateOutput {
726
- /** This indicates the number of passes of the entire training dataset the algorithm has completed. */
727
- epochIds?: Array<number>;
728
- /** List of metrics used to assess how the model fits the training data for each epoch. */
729
- trainLosses?: Array<number>;
730
- /** List of metrics used to assess how the model fits the validation set for each epoch. */
731
- validationLosses?: Array<number>;
608
+ /**
609
+ * This indicates the number of passes of the entire training dataset the
610
+ * algorithm has completed.
611
+ */
612
+ epochIds?: number[];
613
+ /**
614
+ * List of metrics used to assess how the model fits the training data for each
615
+ * epoch.
616
+ */
617
+ trainLosses?: number[];
618
+ /**
619
+ * List of metrics used to assess how the model fits the validation set for each
620
+ * epoch.
621
+ */
622
+ validationLosses?: number[];
732
623
  /** Latency for each epoch. */
733
- latenciesInSeconds?: Array<number>;
624
+ latenciesInSeconds?: number[];
625
+ }
626
+
627
+ /**
628
+ * Detection request for batch inference. This is an asynchronous inference which
629
+ * will need another API to get detection results.
630
+ */
631
+ export declare interface MultivariateBatchDetectionOptions {
632
+ /**
633
+ * Source link to the input data to indicate an accessible Azure storage Uri,
634
+ * either pointed to an Azure blob storage folder, or pointed to a CSV file in
635
+ * Azure blob storage based on you data schema selection. The data schema should
636
+ * be exactly the same with those used in the training phase.
637
+ */
638
+ dataSource: string;
639
+ /**
640
+ * An optional field, which is used to specify the number of top contributed
641
+ * variables for one anomalous timestamp in the response. The default number is
642
+ * 10.
643
+ */
644
+ topContributorCount: number;
645
+ /**
646
+ * A required field, indicating the start time of data for detection, which should
647
+ * be date-time of ISO 8601 format.
648
+ */
649
+ startTime: Date | string;
650
+ /**
651
+ * A required field, indicating the end time of data for detection, which should
652
+ * be date-time of ISO 8601 format.
653
+ */
654
+ endTime: Date | string;
655
+ }
656
+
657
+ /**
658
+ * Detection request for batch inference. This is an asynchronous inference which
659
+ * will need another API to get detection results.
660
+ */
661
+ export declare interface MultivariateBatchDetectionOptionsOutput {
662
+ /**
663
+ * Source link to the input data to indicate an accessible Azure storage Uri,
664
+ * either pointed to an Azure blob storage folder, or pointed to a CSV file in
665
+ * Azure blob storage based on you data schema selection. The data schema should
666
+ * be exactly the same with those used in the training phase.
667
+ */
668
+ dataSource: string;
669
+ /**
670
+ * An optional field, which is used to specify the number of top contributed
671
+ * variables for one anomalous timestamp in the response. The default number is
672
+ * 10.
673
+ */
674
+ topContributorCount: number;
675
+ /**
676
+ * A required field, indicating the start time of data for detection, which should
677
+ * be date-time of ISO 8601 format.
678
+ */
679
+ startTime: string;
680
+ /**
681
+ * A required field, indicating the end time of data for detection, which should
682
+ * be date-time of ISO 8601 format.
683
+ */
684
+ endTime: string;
685
+ }
686
+
687
+ /** Multivariate anomaly detection status. */
688
+ export declare interface MultivariateBatchDetectionResultSummaryOutput {
689
+ /** Status of detection results. One of CREATED, RUNNING, READY, and FAILED. */
690
+ status: "CREATED" | "RUNNING" | "READY" | "FAILED";
691
+ /** Error message when detection is failed. */
692
+ errors?: Array<ErrorResponseOutput>;
693
+ /** Variable Status. */
694
+ variableStates?: Array<VariableStateOutput>;
695
+ /**
696
+ * Detection request for batch inference. This is an asynchronous inference which
697
+ * will need another API to get detection results.
698
+ */
699
+ setupInfo: MultivariateBatchDetectionOptionsOutput;
700
+ }
701
+
702
+ /** Detection results for the given resultId. */
703
+ export declare interface MultivariateDetectionResultOutput {
704
+ /** Result identifier, which is used to fetch the results of an inference call. */
705
+ resultId: string;
706
+ /** Multivariate anomaly detection status. */
707
+ summary: MultivariateBatchDetectionResultSummaryOutput;
708
+ /** Detection result for each timestamp. */
709
+ results: Array<AnomalyStateOutput>;
710
+ }
711
+
712
+ /** Request of last detection. */
713
+ export declare interface MultivariateLastDetectionOptions {
714
+ /**
715
+ * This contains the inference data, including the name, timestamps(ISO 8601) and
716
+ * values of variables.
717
+ */
718
+ variables: Array<VariableValues>;
719
+ /**
720
+ * An optional field, which is used to specify the number of top contributed
721
+ * variables for one anomalous timestamp in the response. The default number is
722
+ * 10.
723
+ */
724
+ topContributorCount: number;
725
+ }
726
+
727
+ /** Results of last detection. */
728
+ export declare interface MultivariateLastDetectionResultOutput {
729
+ /** Variable Status. */
730
+ variableStates?: Array<VariableStateOutput>;
731
+ /** Anomaly status and information. */
732
+ results?: Array<AnomalyStateOutput>;
734
733
  }
735
734
 
736
735
  /**
@@ -779,7 +778,7 @@ export declare interface Routes {
779
778
  /** Resource for '/multivariate/detect-batch/\{resultId\}' has methods for the following verbs: get */
780
779
  (path: "/multivariate/detect-batch/{resultId}", resultId: string): GetMultivariateBatchDetectionResult;
781
780
  /** Resource for '/multivariate/models' has methods for the following verbs: post, get */
782
- (path: "/multivariate/models"): CreateAndTrainMultivariateModel;
781
+ (path: "/multivariate/models"): TrainMultivariateModel;
783
782
  /** Resource for '/multivariate/models/\{modelId\}' has methods for the following verbs: delete, get */
784
783
  (path: "/multivariate/models/{modelId}", modelId: string): DeleteMultivariateModel;
785
784
  /** Resource for '/multivariate/models/\{modelId\}:detect-batch' has methods for the following verbs: post */
@@ -796,6 +795,257 @@ export declare interface TimeSeriesPoint {
796
795
  value: number;
797
796
  }
798
797
 
798
+ export declare interface TrainMultivariateModel {
799
+ /**
800
+ * Create and train a multivariate anomaly detection model. The request must
801
+ * include a source parameter to indicate an externally accessible Azure blob
802
+ * storage URI.There are two types of data input: An URI pointed to an Azure blob
803
+ * storage folder which contains multiple CSV files, and each CSV file contains
804
+ * two columns, timestamp and variable. Another type of input is an URI pointed to
805
+ * a CSV file in Azure blob storage, which contains all the variables and a
806
+ * timestamp column.
807
+ */
808
+ post(options: TrainMultivariateModelParameters): StreamableMethod<TrainMultivariateModel201Response | TrainMultivariateModelDefaultResponse>;
809
+ /** List models of a resource. */
810
+ get(options?: ListMultivariateModelsParameters): StreamableMethod<ListMultivariateModels200Response | ListMultivariateModelsDefaultResponse>;
811
+ }
812
+
813
+ export declare interface TrainMultivariateModel201Headers {
814
+ /** Location and ID of the model. */
815
+ location: string;
816
+ }
817
+
818
+ /** The request has succeeded and a new resource has been created as a result. */
819
+ export declare interface TrainMultivariateModel201Response extends HttpResponse {
820
+ status: "201";
821
+ body: AnomalyDetectionModelOutput;
822
+ headers: RawHttpHeaders & TrainMultivariateModel201Headers;
823
+ }
824
+
825
+ export declare interface TrainMultivariateModelBodyParam {
826
+ /** Model information. */
827
+ body: ModelInfo;
828
+ }
829
+
830
+ export declare interface TrainMultivariateModelDefaultHeaders {
831
+ /** Error code. */
832
+ "x-ms-error-code"?: string;
833
+ }
834
+
835
+ export declare interface TrainMultivariateModelDefaultResponse extends HttpResponse {
836
+ status: string;
837
+ body: ErrorResponseOutput;
838
+ headers: RawHttpHeaders & TrainMultivariateModelDefaultHeaders;
839
+ }
840
+
841
+ export declare type TrainMultivariateModelParameters = TrainMultivariateModelBodyParam & RequestParameters;
842
+
843
+ /** The request of change point detection. */
844
+ export declare interface UnivariateChangePointDetectionOptions {
845
+ /**
846
+ * Time series data points. Points should be sorted by timestamp in ascending
847
+ * order to match the change point detection result.
848
+ */
849
+ series: Array<TimeSeriesPoint>;
850
+ /**
851
+ * Can only be one of yearly, monthly, weekly, daily, hourly, minutely or
852
+ * secondly. Granularity is used for verify whether input series is valid.
853
+ */
854
+ granularity: "yearly" | "monthly" | "weekly" | "daily" | "hourly" | "minutely" | "secondly" | "microsecond" | "none";
855
+ /**
856
+ * Custom Interval is used to set non-standard time interval, for example, if the
857
+ * series is 5 minutes, request can be set as {"granularity":"minutely",
858
+ * "customInterval":5}.
859
+ */
860
+ customInterval?: number;
861
+ /**
862
+ * Optional argument, periodic value of a time series. If the value is null or
863
+ * does not present, the API will determine the period automatically.
864
+ */
865
+ period?: number;
866
+ /**
867
+ * Optional argument, advanced model parameter, a default stableTrendWindow will
868
+ * be used in detection.
869
+ */
870
+ stableTrendWindow?: number;
871
+ /**
872
+ * Optional argument, advanced model parameter, between 0.0-1.0, the lower the
873
+ * value is, the larger the trend error will be which means less change point will
874
+ * be accepted.
875
+ */
876
+ threshold?: number;
877
+ }
878
+
879
+ /** The response of change point detection. */
880
+ export declare interface UnivariateChangePointDetectionResultOutput {
881
+ /**
882
+ * Frequency extracted from the series, zero means no recurrent pattern has been
883
+ * found.
884
+ */
885
+ readonly period?: number;
886
+ /**
887
+ * isChangePoint contains change point properties for each input point. True means
888
+ * an anomaly either negative or positive has been detected. The index of the
889
+ * array is consistent with the input series.
890
+ */
891
+ isChangePoint?: boolean[];
892
+ /** the change point confidence of each point */
893
+ confidenceScores?: number[];
894
+ }
895
+
896
+ /** The request of entire or last anomaly detection. */
897
+ export declare interface UnivariateDetectionOptions {
898
+ /**
899
+ * Time series data points. Points should be sorted by timestamp in ascending
900
+ * order to match the anomaly detection result. If the data is not sorted
901
+ * correctly or there is duplicated timestamp, the API will not work. In such
902
+ * case, an error message will be returned.
903
+ */
904
+ series: Array<TimeSeriesPoint>;
905
+ /**
906
+ * Optional argument, can be one of yearly, monthly, weekly, daily, hourly,
907
+ * minutely, secondly, microsecond or none. If granularity is not present, it will
908
+ * be none by default. If granularity is none, the timestamp property in time
909
+ * series point can be absent.
910
+ */
911
+ granularity?: "yearly" | "monthly" | "weekly" | "daily" | "hourly" | "minutely" | "secondly" | "microsecond" | "none";
912
+ /**
913
+ * Custom Interval is used to set non-standard time interval, for example, if the
914
+ * series is 5 minutes, request can be set as {"granularity":"minutely",
915
+ * "customInterval":5}.
916
+ */
917
+ customInterval?: number;
918
+ /**
919
+ * Optional argument, periodic value of a time series. If the value is null or
920
+ * does not present, the API will determine the period automatically.
921
+ */
922
+ period?: number;
923
+ /** Optional argument, advanced model parameter, max anomaly ratio in a time series. */
924
+ maxAnomalyRatio?: number;
925
+ /**
926
+ * Optional argument, advanced model parameter, between 0-99, the lower the value
927
+ * is, the larger the margin value will be which means less anomalies will be
928
+ * accepted.
929
+ */
930
+ sensitivity?: number;
931
+ /**
932
+ * Used to specify how to deal with missing values in the input series, it's used
933
+ * when granularity is not "none".
934
+ *
935
+ * Possible values: auto, previous, linear, fixed, zero, notFill
936
+ */
937
+ imputeMode?: string;
938
+ /**
939
+ * Used to specify the value to fill, it's used when granularity is not "none"
940
+ * and imputeMode is "fixed".
941
+ */
942
+ imputeFixedValue?: number;
943
+ }
944
+
945
+ /** The response of entire anomaly detection. */
946
+ export declare interface UnivariateEntireDetectionResultOutput {
947
+ /**
948
+ * Frequency extracted from the series, zero means no recurrent pattern has been
949
+ * found.
950
+ */
951
+ period: number;
952
+ /**
953
+ * ExpectedValues contain expected value for each input point. The index of the
954
+ * array is consistent with the input series.
955
+ */
956
+ expectedValues: number[];
957
+ /**
958
+ * UpperMargins contain upper margin of each input point. UpperMargin is used to
959
+ * calculate upperBoundary, which equals to expectedValue + (100 -
960
+ * marginScale)*upperMargin. Anomalies in response can be filtered by
961
+ * upperBoundary and lowerBoundary. By adjusting marginScale value, less
962
+ * significant anomalies can be filtered in client side. The index of the array is
963
+ * consistent with the input series.
964
+ */
965
+ upperMargins: number[];
966
+ /**
967
+ * LowerMargins contain lower margin of each input point. LowerMargin is used to
968
+ * calculate lowerBoundary, which equals to expectedValue - (100 -
969
+ * marginScale)*lowerMargin. Points between the boundary can be marked as normal
970
+ * ones in client side. The index of the array is consistent with the input
971
+ * series.
972
+ */
973
+ lowerMargins: number[];
974
+ /**
975
+ * IsAnomaly contains anomaly properties for each input point. True means an
976
+ * anomaly either negative or positive has been detected. The index of the array
977
+ * is consistent with the input series.
978
+ */
979
+ isAnomaly: boolean[];
980
+ /**
981
+ * IsNegativeAnomaly contains anomaly status in negative direction for each input
982
+ * point. True means a negative anomaly has been detected. A negative anomaly
983
+ * means the point is detected as an anomaly and its real value is smaller than
984
+ * the expected one. The index of the array is consistent with the input series.
985
+ */
986
+ isNegativeAnomaly: boolean[];
987
+ /**
988
+ * IsPositiveAnomaly contain anomaly status in positive direction for each input
989
+ * point. True means a positive anomaly has been detected. A positive anomaly
990
+ * means the point is detected as an anomaly and its real value is larger than the
991
+ * expected one. The index of the array is consistent with the input series.
992
+ */
993
+ isPositiveAnomaly: boolean[];
994
+ /**
995
+ * The severity score for each input point. The larger the value is, the more
996
+ * sever the anomaly is. For normal points, the "severity" is always 0.
997
+ */
998
+ severity?: number[];
999
+ }
1000
+
1001
+ /** The response of last anomaly detection. */
1002
+ export declare interface UnivariateLastDetectionResultOutput {
1003
+ /**
1004
+ * Frequency extracted from the series, zero means no recurrent pattern has been
1005
+ * found.
1006
+ */
1007
+ period: number;
1008
+ /** Suggested input series points needed for detecting the latest point. */
1009
+ suggestedWindow: number;
1010
+ /** Expected value of the latest point. */
1011
+ expectedValue: number;
1012
+ /**
1013
+ * Upper margin of the latest point. UpperMargin is used to calculate
1014
+ * upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin.
1015
+ * If the value of latest point is between upperBoundary and lowerBoundary, it
1016
+ * should be treated as normal value. By adjusting marginScale value, anomaly
1017
+ * status of latest point can be changed.
1018
+ */
1019
+ upperMargin: number;
1020
+ /**
1021
+ * Lower margin of the latest point. LowerMargin is used to calculate
1022
+ * lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin.
1023
+ *
1024
+ */
1025
+ lowerMargin: number;
1026
+ /**
1027
+ * Anomaly status of the latest point, true means the latest point is an anomaly
1028
+ * either in negative direction or positive direction.
1029
+ */
1030
+ isAnomaly: boolean;
1031
+ /**
1032
+ * Anomaly status in negative direction of the latest point. True means the latest
1033
+ * point is an anomaly and its real value is smaller than the expected one.
1034
+ */
1035
+ isNegativeAnomaly: boolean;
1036
+ /**
1037
+ * Anomaly status in positive direction of the latest point. True means the latest
1038
+ * point is an anomaly and its real value is larger than the expected one.
1039
+ */
1040
+ isPositiveAnomaly: boolean;
1041
+ /**
1042
+ * The severity score for the last input point. The larger the value is, the more
1043
+ * sever the anomaly is. For normal points, the "severity" is always 0.
1044
+ */
1045
+ severity?: number;
1046
+ }
1047
+
1048
+ /** Variable Status. */
799
1049
  export declare interface VariableState {
800
1050
  /** Variable name in variable states. */
801
1051
  variable?: string;
@@ -809,6 +1059,7 @@ export declare interface VariableState {
809
1059
  lastTimestamp?: Date | string;
810
1060
  }
811
1061
 
1062
+ /** Variable Status. */
812
1063
  export declare interface VariableStateOutput {
813
1064
  /** Variable name in variable states. */
814
1065
  variable?: string;
@@ -822,13 +1073,14 @@ export declare interface VariableStateOutput {
822
1073
  lastTimestamp?: string;
823
1074
  }
824
1075
 
1076
+ /** Variable values. */
825
1077
  export declare interface VariableValues {
826
1078
  /** Variable name of last detection request. */
827
1079
  variable: string;
828
1080
  /** Timestamps of last detection request */
829
- timestamps: Array<string>;
1081
+ timestamps: string[];
830
1082
  /** Values of variables. */
831
- values: Array<number>;
1083
+ values: number[];
832
1084
  }
833
1085
 
834
1086
  export { }