@azure-rest/load-testing 1.1.0-beta.1 → 1.2.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.
Files changed (200) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE +1 -1
  3. package/README.md +12 -13
  4. package/dist/browser/azureLoadTesting.js +14 -12
  5. package/dist/browser/azureLoadTesting.js.map +1 -1
  6. package/dist/browser/clientDefinitions.d.ts +66 -34
  7. package/dist/browser/clientDefinitions.js.map +1 -1
  8. package/dist/browser/getFileValidationPoller.js +16 -11
  9. package/dist/browser/getFileValidationPoller.js.map +1 -1
  10. package/dist/browser/getTestProfileRunCompletionPoller.js +16 -11
  11. package/dist/browser/getTestProfileRunCompletionPoller.js.map +1 -1
  12. package/dist/browser/getTestRunCompletionPoller.js +16 -11
  13. package/dist/browser/getTestRunCompletionPoller.js.map +1 -1
  14. package/dist/browser/index.d.ts +6 -6
  15. package/dist/browser/index.js +1 -7
  16. package/dist/browser/index.js.map +1 -1
  17. package/dist/browser/isUnexpected.d.ts +15 -9
  18. package/dist/browser/isUnexpected.js +21 -13
  19. package/dist/browser/isUnexpected.js.map +1 -1
  20. package/dist/browser/models.d.ts +205 -172
  21. package/dist/browser/models.js.map +1 -1
  22. package/dist/browser/outputModels.d.ts +290 -208
  23. package/dist/browser/outputModels.js.map +1 -1
  24. package/dist/browser/paginateHelper.js +43 -73
  25. package/dist/browser/paginateHelper.js.map +1 -1
  26. package/dist/browser/parameters.d.ts +107 -66
  27. package/dist/browser/parameters.js.map +1 -1
  28. package/dist/browser/pollingHelper.d.ts +82 -4
  29. package/dist/browser/pollingHelper.js +119 -15
  30. package/dist/browser/pollingHelper.js.map +1 -1
  31. package/dist/browser/responses.d.ts +234 -121
  32. package/dist/browser/responses.js.map +1 -1
  33. package/dist/commonjs/azureLoadTesting.js +53 -45
  34. package/dist/commonjs/azureLoadTesting.js.map +7 -1
  35. package/dist/commonjs/clientDefinitions.d.ts +66 -34
  36. package/dist/commonjs/clientDefinitions.js +15 -5
  37. package/dist/commonjs/clientDefinitions.js.map +7 -1
  38. package/dist/commonjs/getFileValidationPoller.js +151 -137
  39. package/dist/commonjs/getFileValidationPoller.js.map +7 -1
  40. package/dist/commonjs/getTestProfileRunCompletionPoller.js +139 -127
  41. package/dist/commonjs/getTestProfileRunCompletionPoller.js.map +7 -1
  42. package/dist/commonjs/getTestRunCompletionPoller.js +139 -125
  43. package/dist/commonjs/getTestRunCompletionPoller.js.map +7 -1
  44. package/dist/commonjs/index.d.ts +6 -6
  45. package/dist/commonjs/index.js +46 -20
  46. package/dist/commonjs/index.js.map +7 -1
  47. package/dist/commonjs/isUnexpected.d.ts +15 -9
  48. package/dist/commonjs/isUnexpected.js +118 -105
  49. package/dist/commonjs/isUnexpected.js.map +7 -1
  50. package/dist/commonjs/logger.js +28 -8
  51. package/dist/commonjs/logger.js.map +7 -1
  52. package/dist/commonjs/models.d.ts +205 -172
  53. package/dist/commonjs/models.js +15 -5
  54. package/dist/commonjs/models.js.map +7 -1
  55. package/dist/commonjs/outputModels.d.ts +290 -208
  56. package/dist/commonjs/outputModels.js +15 -5
  57. package/dist/commonjs/outputModels.js.map +7 -1
  58. package/dist/commonjs/paginateHelper.js +118 -158
  59. package/dist/commonjs/paginateHelper.js.map +7 -1
  60. package/dist/commonjs/parameters.d.ts +107 -66
  61. package/dist/commonjs/parameters.js +15 -5
  62. package/dist/commonjs/parameters.js.map +7 -1
  63. package/dist/commonjs/pollingHelper.d.ts +82 -4
  64. package/dist/commonjs/pollingHelper.js +143 -24
  65. package/dist/commonjs/pollingHelper.js.map +7 -1
  66. package/dist/commonjs/responses.d.ts +234 -121
  67. package/dist/commonjs/responses.js +15 -5
  68. package/dist/commonjs/responses.js.map +7 -1
  69. package/dist/commonjs/tsdoc-metadata.json +11 -11
  70. package/dist/commonjs/util/LROUtil.js +76 -54
  71. package/dist/commonjs/util/LROUtil.js.map +7 -1
  72. package/dist/esm/azureLoadTesting.js +32 -40
  73. package/dist/esm/azureLoadTesting.js.map +7 -1
  74. package/dist/esm/clientDefinitions.d.ts +66 -34
  75. package/dist/esm/clientDefinitions.js +0 -4
  76. package/dist/esm/clientDefinitions.js.map +7 -1
  77. package/dist/esm/getFileValidationPoller.js +126 -132
  78. package/dist/esm/getFileValidationPoller.js.map +7 -1
  79. package/dist/esm/getTestProfileRunCompletionPoller.js +114 -122
  80. package/dist/esm/getTestProfileRunCompletionPoller.js.map +7 -1
  81. package/dist/esm/getTestRunCompletionPoller.js +114 -120
  82. package/dist/esm/getTestRunCompletionPoller.js.map +7 -1
  83. package/dist/esm/index.d.ts +6 -6
  84. package/dist/esm/index.js +5 -11
  85. package/dist/esm/index.js.map +7 -1
  86. package/dist/esm/isUnexpected.d.ts +15 -9
  87. package/dist/esm/isUnexpected.js +96 -103
  88. package/dist/esm/isUnexpected.js.map +7 -1
  89. package/dist/esm/logger.js +4 -4
  90. package/dist/esm/logger.js.map +7 -1
  91. package/dist/esm/models.d.ts +205 -172
  92. package/dist/esm/models.js +0 -4
  93. package/dist/esm/models.js.map +7 -1
  94. package/dist/esm/outputModels.d.ts +290 -208
  95. package/dist/esm/outputModels.js +0 -4
  96. package/dist/esm/outputModels.js.map +7 -1
  97. package/dist/esm/paginateHelper.js +95 -155
  98. package/dist/esm/paginateHelper.js.map +7 -1
  99. package/dist/esm/parameters.d.ts +107 -66
  100. package/dist/esm/parameters.js +0 -4
  101. package/dist/esm/parameters.js.map +7 -1
  102. package/dist/esm/pollingHelper.d.ts +82 -4
  103. package/dist/esm/pollingHelper.js +117 -18
  104. package/dist/esm/pollingHelper.js.map +7 -1
  105. package/dist/esm/responses.d.ts +234 -121
  106. package/dist/esm/responses.js +0 -4
  107. package/dist/esm/responses.js.map +7 -1
  108. package/dist/esm/util/LROUtil.js +52 -50
  109. package/dist/esm/util/LROUtil.js.map +7 -1
  110. package/dist/react-native/azureLoadTesting.js +14 -12
  111. package/dist/react-native/azureLoadTesting.js.map +1 -1
  112. package/dist/react-native/clientDefinitions.d.ts +66 -34
  113. package/dist/react-native/clientDefinitions.js.map +1 -1
  114. package/dist/react-native/getFileValidationPoller.js +16 -11
  115. package/dist/react-native/getFileValidationPoller.js.map +1 -1
  116. package/dist/react-native/getTestProfileRunCompletionPoller.js +16 -11
  117. package/dist/react-native/getTestProfileRunCompletionPoller.js.map +1 -1
  118. package/dist/react-native/getTestRunCompletionPoller.js +16 -11
  119. package/dist/react-native/getTestRunCompletionPoller.js.map +1 -1
  120. package/dist/react-native/index.d.ts +6 -6
  121. package/dist/react-native/index.js +1 -7
  122. package/dist/react-native/index.js.map +1 -1
  123. package/dist/react-native/isUnexpected.d.ts +15 -9
  124. package/dist/react-native/isUnexpected.js +21 -13
  125. package/dist/react-native/isUnexpected.js.map +1 -1
  126. package/dist/react-native/models.d.ts +205 -172
  127. package/dist/react-native/models.js.map +1 -1
  128. package/dist/react-native/outputModels.d.ts +290 -208
  129. package/dist/react-native/outputModels.js.map +1 -1
  130. package/dist/react-native/paginateHelper.js +43 -73
  131. package/dist/react-native/paginateHelper.js.map +1 -1
  132. package/dist/react-native/parameters.d.ts +107 -66
  133. package/dist/react-native/parameters.js.map +1 -1
  134. package/dist/react-native/pollingHelper.d.ts +82 -4
  135. package/dist/react-native/pollingHelper.js +119 -15
  136. package/dist/react-native/pollingHelper.js.map +1 -1
  137. package/dist/react-native/responses.d.ts +234 -121
  138. package/dist/react-native/responses.js.map +1 -1
  139. package/package.json +69 -86
  140. package/review/{load-testing.api.md → load-testing-node.api.md} +420 -23
  141. package/dist/browser/azureLoadTesting.d.ts.map +0 -1
  142. package/dist/browser/clientDefinitions.d.ts.map +0 -1
  143. package/dist/browser/getFileValidationPoller.d.ts.map +0 -1
  144. package/dist/browser/getTestProfileRunCompletionPoller.d.ts.map +0 -1
  145. package/dist/browser/getTestRunCompletionPoller.d.ts.map +0 -1
  146. package/dist/browser/index.d.ts.map +0 -1
  147. package/dist/browser/isUnexpected.d.ts.map +0 -1
  148. package/dist/browser/logger.d.ts.map +0 -1
  149. package/dist/browser/models.d.ts.map +0 -1
  150. package/dist/browser/outputModels.d.ts.map +0 -1
  151. package/dist/browser/paginateHelper.d.ts.map +0 -1
  152. package/dist/browser/parameters.d.ts.map +0 -1
  153. package/dist/browser/pollingHelper.d.ts.map +0 -1
  154. package/dist/browser/responses.d.ts.map +0 -1
  155. package/dist/browser/util/LROUtil.d.ts.map +0 -1
  156. package/dist/commonjs/azureLoadTesting.d.ts.map +0 -1
  157. package/dist/commonjs/clientDefinitions.d.ts.map +0 -1
  158. package/dist/commonjs/getFileValidationPoller.d.ts.map +0 -1
  159. package/dist/commonjs/getTestProfileRunCompletionPoller.d.ts.map +0 -1
  160. package/dist/commonjs/getTestRunCompletionPoller.d.ts.map +0 -1
  161. package/dist/commonjs/index.d.ts.map +0 -1
  162. package/dist/commonjs/isUnexpected.d.ts.map +0 -1
  163. package/dist/commonjs/logger.d.ts.map +0 -1
  164. package/dist/commonjs/models.d.ts.map +0 -1
  165. package/dist/commonjs/outputModels.d.ts.map +0 -1
  166. package/dist/commonjs/paginateHelper.d.ts.map +0 -1
  167. package/dist/commonjs/parameters.d.ts.map +0 -1
  168. package/dist/commonjs/pollingHelper.d.ts.map +0 -1
  169. package/dist/commonjs/responses.d.ts.map +0 -1
  170. package/dist/commonjs/util/LROUtil.d.ts.map +0 -1
  171. package/dist/esm/azureLoadTesting.d.ts.map +0 -1
  172. package/dist/esm/clientDefinitions.d.ts.map +0 -1
  173. package/dist/esm/getFileValidationPoller.d.ts.map +0 -1
  174. package/dist/esm/getTestProfileRunCompletionPoller.d.ts.map +0 -1
  175. package/dist/esm/getTestRunCompletionPoller.d.ts.map +0 -1
  176. package/dist/esm/index.d.ts.map +0 -1
  177. package/dist/esm/isUnexpected.d.ts.map +0 -1
  178. package/dist/esm/logger.d.ts.map +0 -1
  179. package/dist/esm/models.d.ts.map +0 -1
  180. package/dist/esm/outputModels.d.ts.map +0 -1
  181. package/dist/esm/paginateHelper.d.ts.map +0 -1
  182. package/dist/esm/parameters.d.ts.map +0 -1
  183. package/dist/esm/pollingHelper.d.ts.map +0 -1
  184. package/dist/esm/responses.d.ts.map +0 -1
  185. package/dist/esm/util/LROUtil.d.ts.map +0 -1
  186. package/dist/react-native/azureLoadTesting.d.ts.map +0 -1
  187. package/dist/react-native/clientDefinitions.d.ts.map +0 -1
  188. package/dist/react-native/getFileValidationPoller.d.ts.map +0 -1
  189. package/dist/react-native/getTestProfileRunCompletionPoller.d.ts.map +0 -1
  190. package/dist/react-native/getTestRunCompletionPoller.d.ts.map +0 -1
  191. package/dist/react-native/index.d.ts.map +0 -1
  192. package/dist/react-native/isUnexpected.d.ts.map +0 -1
  193. package/dist/react-native/logger.d.ts.map +0 -1
  194. package/dist/react-native/models.d.ts.map +0 -1
  195. package/dist/react-native/outputModels.d.ts.map +0 -1
  196. package/dist/react-native/paginateHelper.d.ts.map +0 -1
  197. package/dist/react-native/parameters.d.ts.map +0 -1
  198. package/dist/react-native/pollingHelper.d.ts.map +0 -1
  199. package/dist/react-native/responses.d.ts.map +0 -1
  200. package/dist/react-native/util/LROUtil.d.ts.map +0 -1
@@ -1,4 +1,5 @@
1
- import type { OperationState, SimplePollerLike } from "@azure/core-lro";
1
+ import type { OperationState as PollerOperationState } from "@azure/core-lro";
2
+ import type { SimplePollerLike } from "./pollingHelper.js";
2
3
  import type { LoadTestAdministrationGetTestFile200Response, LoadTestAdministrationUploadTestFile201Response, LoadTestRunCreateOrUpdateTestRun200Response, LoadTestRunCreateOrUpdateTestRun201Response, LoadTestRunGetTestRun200Response, TestProfileRunAdministrationCreateOrUpdateTestProfileRun200Response, TestProfileRunAdministrationCreateOrUpdateTestProfileRun201Response, TestProfileRunAdministrationGetTestProfileRun200Response } from "./responses.js";
3
4
  /** Load test model. */
4
5
  export interface Test {
@@ -56,6 +57,8 @@ export interface Test {
56
57
  engineBuiltInIdentityType?: ManagedIdentityType;
57
58
  /** Resource Ids of the managed identity built in to load test engines. Required if engineBuiltInIdentityType is UserAssigned. */
58
59
  engineBuiltInIdentityIds?: string[];
60
+ /** Preferences for the test. */
61
+ preferences?: TestPreferences;
59
62
  }
60
63
  /** Pass fail criteria for a test. */
61
64
  export interface PassFailCriteria {
@@ -126,6 +129,8 @@ export interface AutoStopCriteria {
126
129
  errorRate?: number;
127
130
  /** Time window during which the error percentage should be evaluated in seconds. */
128
131
  errorRateTimeWindowInSeconds?: number;
132
+ /** Maximum number of virtual users per load testing engine, at which the test run should be automatically stopped. */
133
+ maximumVirtualUsersPerEngine?: number;
129
134
  }
130
135
  /** Secret */
131
136
  export interface Secret {
@@ -216,6 +221,20 @@ export interface TestFileInfo {
216
221
  /** Name of the file. */
217
222
  fileName: string;
218
223
  }
224
+ /** Preferences for the test. */
225
+ export interface TestPreferences {
226
+ /** Enable or disable AI based insights on Test Run Errors. */
227
+ enableAIErrorInsights?: boolean;
228
+ }
229
+ /** Request to clone an existing test into a new test. */
230
+ export interface CloneTestRequest {
231
+ /** Unique identifier for the new test that will be created. */
232
+ newTestId: string;
233
+ /** Display Name override for the newly created test. */
234
+ displayName?: string;
235
+ /** Description override for the newly created test. */
236
+ description?: string;
237
+ }
219
238
  /** Test app components */
220
239
  export interface TestAppComponents {
221
240
  /**
@@ -300,160 +319,6 @@ export interface FunctionFlexConsumptionResourceConfiguration {
300
319
  /** HTTP Concurrency for the function app. */
301
320
  httpConcurrency?: number;
302
321
  }
303
- /** Load test run model */
304
- export interface TestRun {
305
- /** Pass fail criteria for a test. */
306
- passFailCriteria?: PassFailCriteria;
307
- /** Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window. */
308
- autoStopCriteria?: AutoStopCriteria;
309
- /**
310
- * Secrets can be stored in an Azure Key Vault or any other secret store. If the
311
- * secret is stored in an Azure Key Vault, the value should be the secret
312
- * identifier and the type should be AKV_SECRET_URI. If the secret is stored
313
- * elsewhere, the secret value should be provided directly and the type should be
314
- * SECRET_VALUE.
315
- */
316
- secrets?: Record<string, Secret>;
317
- /** Certificates metadata */
318
- certificate?: CertificateMetadata;
319
- /** Environment variables which are defined as a set of <name,value> pairs. */
320
- environmentVariables?: Record<string, string>;
321
- /** Display name of a testRun. */
322
- displayName?: string;
323
- /** Associated test Id. */
324
- testId?: string;
325
- /** The test run description. */
326
- description?: string;
327
- /**
328
- * Request data collection level for test run
329
- *
330
- * Possible values: "NONE", "ERRORS"
331
- */
332
- requestDataLevel?: RequestDataLevel;
333
- /** Enable or disable debug level logging. True if debug logs are enabled for the test run. False otherwise */
334
- debugLogsEnabled?: boolean;
335
- /**
336
- * The type of the entity that created the test run. (E.x. User, ScheduleTrigger, etc).
337
- *
338
- * Possible values: "User", "ScheduledTrigger"
339
- */
340
- createdByType?: CreatedByType;
341
- }
342
- /** Error details if there is any failure in load test run */
343
- export interface ErrorDetails {
344
- }
345
- /** Test run statistics. */
346
- export interface TestRunStatistics {
347
- }
348
- /** Collection of test run artifacts */
349
- export interface TestRunArtifacts {
350
- /** The output artifacts for the test run. */
351
- outputArtifacts?: TestRunOutputArtifacts;
352
- }
353
- /** The input artifacts for the test run. */
354
- export interface TestRunInputArtifacts {
355
- /** The load test YAML file that contains the the test configuration */
356
- configFileInfo?: TestRunFileInfo;
357
- /** The test script file for the test run */
358
- testScriptFileInfo?: TestRunFileInfo;
359
- /** The user properties file */
360
- userPropFileInfo?: TestRunFileInfo;
361
- /** The zip file for all input artifacts */
362
- inputArtifactsZipFileInfo?: TestRunFileInfo;
363
- /** The config json file for url based test */
364
- urlTestConfigFileInfo?: TestRunFileInfo;
365
- }
366
- /** Test run file info. */
367
- export interface TestRunFileInfo {
368
- /** Name of the file. */
369
- fileName: string;
370
- }
371
- /** The output artifacts for the test run. */
372
- export interface TestRunOutputArtifacts {
373
- /** The test run results file */
374
- resultFileInfo?: TestRunFileInfo;
375
- /** The test run report with metrics */
376
- logsFileInfo?: TestRunFileInfo;
377
- /** The container for test run artifacts. */
378
- artifactsContainerInfo?: ArtifactsContainerInfo;
379
- /** The report file for the test run. */
380
- reportFileInfo?: TestRunFileInfo;
381
- }
382
- /** Artifacts container info. */
383
- export interface ArtifactsContainerInfo {
384
- /** This is a SAS URI to an Azure Storage Container that contains the test run artifacts. */
385
- url?: string;
386
- /** Expiry time of the container (RFC 3339 literal format) */
387
- expireDateTime?: Date | string;
388
- }
389
- /** Filters to fetch the set of metric. */
390
- export interface MetricRequestPayload {
391
- /**
392
- * Get metrics for specific dimension values. Example: Metric contains dimension
393
- * like SamplerName, Error. To retrieve all the time series data where SamplerName
394
- * is equals to HTTPRequest1 or HTTPRequest2, the DimensionFilter value will be
395
- * {"SamplerName", ["HTTPRequest1", "HTTPRequest2"}
396
- */
397
- filters?: Array<DimensionFilter>;
398
- }
399
- /** Dimension name and values to filter */
400
- export interface DimensionFilter {
401
- /** The dimension name */
402
- name?: string;
403
- /** The dimension values. Maximum values can be 20. */
404
- values?: string[];
405
- }
406
- /** Test run app component */
407
- export interface TestRunAppComponents {
408
- /**
409
- * Azure resource collection { resource id (fully qualified resource Id e.g
410
- * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName})
411
- * : resource object }
412
- */
413
- components: Record<string, AppComponent>;
414
- }
415
- /** Test run server metrics configuration */
416
- export interface TestRunServerMetricsConfiguration {
417
- /**
418
- * Azure resource metrics collection {metric id : metrics object} (Refer :
419
- * https://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition
420
- * for metric id).
421
- */
422
- metrics?: Record<string, ResourceMetric>;
423
- }
424
- /** The Test Profile Run Model. Test Profile Run resource enables you to instantiate an already created test profile and run load tests to get recommendations on the optimal configuration for the target resource. */
425
- export interface TestProfileRun {
426
- /** Display name for the test profile run. */
427
- displayName?: string;
428
- /** The test profile run description */
429
- description?: string;
430
- /** Associated test profile ID for the test profile run. This is required to create a test profile run and can't be updated. */
431
- testProfileId?: string;
432
- }
433
- /** Details of a particular test run for a test profile run. */
434
- export interface TestRunDetail {
435
- /**
436
- * Status of the test run.
437
- *
438
- * Possible values: "ACCEPTED", "NOTSTARTED", "PROVISIONING", "PROVISIONED", "CONFIGURING", "CONFIGURED", "EXECUTING", "EXECUTED", "DEPROVISIONING", "DEPROVISIONED", "DONE", "CANCELLING", "CANCELLED", "FAILED", "VALIDATION_SUCCESS", "VALIDATION_FAILURE"
439
- */
440
- status: TestRunStatus;
441
- /** ID of the configuration on which the test ran. */
442
- configurationId: string;
443
- /** Key value pair of extra properties associated with the test run. */
444
- properties: Record<string, string>;
445
- }
446
- /** A recommendation object that provides a list of configuration that optimizes its category. */
447
- export interface TestProfileRunRecommendation {
448
- /**
449
- * Category of the recommendation.
450
- *
451
- * Possible values: "ThroughputOptimized", "CostOptimized"
452
- */
453
- category: RecommendationCategory;
454
- /** List of configurations IDs for which the recommendation is applicable. These are a subset of the provided target resource configurations. */
455
- configurations?: string[];
456
- }
457
322
  /** Trigger model. */
458
323
  export interface TriggerParent {
459
324
  /** The name of the trigger. */
@@ -607,6 +472,172 @@ export interface TriggerDisabledNotificationEventFilter extends TestsNotificatio
607
472
  /** Event type for trigger disabled event. */
608
473
  kind: "TriggerDisabled";
609
474
  }
475
+ /** Load test run model */
476
+ export interface TestRun {
477
+ /** Pass fail criteria for a test. */
478
+ passFailCriteria?: PassFailCriteria;
479
+ /** Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window. */
480
+ autoStopCriteria?: AutoStopCriteria;
481
+ /**
482
+ * Secrets can be stored in an Azure Key Vault or any other secret store. If the
483
+ * secret is stored in an Azure Key Vault, the value should be the secret
484
+ * identifier and the type should be AKV_SECRET_URI. If the secret is stored
485
+ * elsewhere, the secret value should be provided directly and the type should be
486
+ * SECRET_VALUE.
487
+ */
488
+ secrets?: Record<string, Secret>;
489
+ /** Certificates metadata */
490
+ certificate?: CertificateMetadata;
491
+ /** Environment variables which are defined as a set of <name,value> pairs. */
492
+ environmentVariables?: Record<string, string>;
493
+ /** Display name of a testRun. */
494
+ displayName?: string;
495
+ /** Associated test Id. */
496
+ testId?: string;
497
+ /** The test run description. */
498
+ description?: string;
499
+ /**
500
+ * Request data collection level for test run
501
+ *
502
+ * Possible values: "NONE", "ERRORS"
503
+ */
504
+ requestDataLevel?: RequestDataLevel;
505
+ /** Enable or disable debug level logging. True if debug logs are enabled for the test run. False otherwise */
506
+ debugLogsEnabled?: boolean;
507
+ /**
508
+ * The type of the entity that created the test run. (E.x. User, ScheduleTrigger, etc).
509
+ *
510
+ * Possible values: "User", "ScheduledTrigger", "AzurePipelines", "GitHubWorkflows"
511
+ */
512
+ createdByType?: CreatedByType;
513
+ }
514
+ /** Error details if there is any failure in load test run */
515
+ export interface ErrorDetails {
516
+ }
517
+ /** Test run statistics. */
518
+ export interface TestRunStatistics {
519
+ }
520
+ /** Collection of test run artifacts */
521
+ export interface TestRunArtifacts {
522
+ /** The output artifacts for the test run. */
523
+ outputArtifacts?: TestRunOutputArtifacts;
524
+ }
525
+ /** The input artifacts for the test run. */
526
+ export interface TestRunInputArtifacts {
527
+ /** The load test YAML file that contains the the test configuration */
528
+ configFileInfo?: TestRunFileInfo;
529
+ /** The test script file for the test run */
530
+ testScriptFileInfo?: TestRunFileInfo;
531
+ /** The user properties file */
532
+ userPropFileInfo?: TestRunFileInfo;
533
+ /** The zip file for all input artifacts */
534
+ inputArtifactsZipFileInfo?: TestRunFileInfo;
535
+ /** The config json file for url based test */
536
+ urlTestConfigFileInfo?: TestRunFileInfo;
537
+ }
538
+ /** Test run file info. */
539
+ export interface TestRunFileInfo {
540
+ /** Name of the file. */
541
+ fileName: string;
542
+ }
543
+ /** The output artifacts for the test run. */
544
+ export interface TestRunOutputArtifacts {
545
+ /** The test run results file */
546
+ resultFileInfo?: TestRunFileInfo;
547
+ /** The test run report with metrics */
548
+ logsFileInfo?: TestRunFileInfo;
549
+ /** The container for test run artifacts. */
550
+ artifactsContainerInfo?: ArtifactsContainerInfo;
551
+ /** The report file for the test run. */
552
+ reportFileInfo?: TestRunFileInfo;
553
+ }
554
+ /** Artifacts container info. */
555
+ export interface ArtifactsContainerInfo {
556
+ /** This is a SAS URI to an Azure Storage Container that contains the test run artifacts. */
557
+ url?: string;
558
+ /** Expiry time of the container (RFC 3339 literal format) */
559
+ expireDateTime?: Date | string;
560
+ }
561
+ /** Represents insights for the test run. */
562
+ export interface TestRunInsights {
563
+ /** The rows of the insights. */
564
+ rows?: Record<string, Record<string, string>>;
565
+ }
566
+ /** Represents a column of the test run insight */
567
+ export interface TestRunInsightColumn {
568
+ /** Name of the column. */
569
+ name: string;
570
+ /** The data type of the column. */
571
+ dataType: string;
572
+ }
573
+ /** Filters to fetch the set of metric. */
574
+ export interface MetricRequestPayload {
575
+ /**
576
+ * Get metrics for specific dimension values. Example: Metric contains dimension
577
+ * like SamplerName, Error. To retrieve all the time series data where SamplerName
578
+ * is equals to HTTPRequest1 or HTTPRequest2, the DimensionFilter value will be
579
+ * {"SamplerName", ["HTTPRequest1", "HTTPRequest2"}
580
+ */
581
+ filters?: Array<DimensionFilter>;
582
+ }
583
+ /** Dimension name and values to filter */
584
+ export interface DimensionFilter {
585
+ /** The dimension name */
586
+ name?: string;
587
+ /** The dimension values. Maximum values can be 20. */
588
+ values?: string[];
589
+ }
590
+ /** Test run app component */
591
+ export interface TestRunAppComponents {
592
+ /**
593
+ * Azure resource collection { resource id (fully qualified resource Id e.g
594
+ * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName})
595
+ * : resource object }
596
+ */
597
+ components: Record<string, AppComponent>;
598
+ }
599
+ /** Test run server metrics configuration */
600
+ export interface TestRunServerMetricsConfiguration {
601
+ /**
602
+ * Azure resource metrics collection {metric id : metrics object} (Refer :
603
+ * https://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition
604
+ * for metric id).
605
+ */
606
+ metrics?: Record<string, ResourceMetric>;
607
+ }
608
+ /** The Test Profile Run Model. Test Profile Run resource enables you to instantiate an already created test profile and run load tests to get recommendations on the optimal configuration for the target resource. */
609
+ export interface TestProfileRun {
610
+ /** Display name for the test profile run. */
611
+ displayName?: string;
612
+ /** The test profile run description */
613
+ description?: string;
614
+ /** Associated test profile ID for the test profile run. This is required to create a test profile run and can't be updated. */
615
+ testProfileId?: string;
616
+ }
617
+ /** Details of a particular test run for a test profile run. */
618
+ export interface TestRunDetail {
619
+ /**
620
+ * Status of the test run.
621
+ *
622
+ * Possible values: "ACCEPTED", "NOTSTARTED", "PROVISIONING", "PROVISIONED", "CONFIGURING", "CONFIGURED", "EXECUTING", "EXECUTED", "DEPROVISIONING", "DEPROVISIONED", "DONE", "CANCELLING", "CANCELLED", "FAILED", "VALIDATION_SUCCESS", "VALIDATION_FAILURE"
623
+ */
624
+ status: TestRunStatus;
625
+ /** ID of the configuration on which the test ran. */
626
+ configurationId: string;
627
+ /** Key value pair of extra properties associated with the test run. */
628
+ properties: Record<string, string>;
629
+ }
630
+ /** A recommendation object that provides a list of configuration that optimizes its category. */
631
+ export interface TestProfileRunRecommendation {
632
+ /**
633
+ * Category of the recommendation.
634
+ *
635
+ * Possible values: "ThroughputOptimized", "CostOptimized"
636
+ */
637
+ category: RecommendationCategory;
638
+ /** List of configurations IDs for which the recommendation is applicable. These are a subset of the provided target resource configurations. */
639
+ configurations?: string[];
640
+ }
610
641
  /** Configurations of a target resource. This varies with the kind of resource. */
611
642
  export type TargetResourceConfigurations = TargetResourceConfigurationsParent | FunctionFlexConsumptionTargetResourceConfigurations;
612
643
  /** Trigger model. */
@@ -617,6 +648,8 @@ export type Recurrence = RecurrenceParent | DailyRecurrence | HourlyRecurrence |
617
648
  export type NotificationRule = NotificationRuleParent | TestsNotificationRule;
618
649
  /** The notification event filter for Tests scope. */
619
650
  export type TestsNotificationEventFilter = TestsNotificationEventFilterParent | TestRunEndedNotificationEventFilter | TestRunStartedNotificationEventFilter | TriggerCompletedNotificationEventFilter | TriggerDisabledNotificationEventFilter;
651
+ /** Alias for OperationState */
652
+ export type OperationState = string;
620
653
  /** Alias for PFMetrics */
621
654
  export type PFMetrics = string;
622
655
  /** Alias for PassFailAggregationFunction */
@@ -639,20 +672,6 @@ export type TestKind = string;
639
672
  export type ManagedIdentityType = string;
640
673
  /** Alias for ResourceKind */
641
674
  export type ResourceKind = string;
642
- /** Alias for PassFailTestResult */
643
- export type PassFailTestResult = string;
644
- /** Alias for TestRunStatus */
645
- export type TestRunStatus = string;
646
- /** Alias for RequestDataLevel */
647
- export type RequestDataLevel = string;
648
- /** Alias for CreatedByType */
649
- export type CreatedByType = string;
650
- /** Alias for TimeGrain */
651
- export type TimeGrain = string;
652
- /** Alias for TestProfileRunStatus */
653
- export type TestProfileRunStatus = string;
654
- /** Alias for RecommendationCategory */
655
- export type RecommendationCategory = string;
656
675
  /** Alias for TriggerType */
657
676
  export type TriggerType = string;
658
677
  /** Alias for TriggerState */
@@ -665,19 +684,33 @@ export type WeekDays = string;
665
684
  export type NotificationScopeType = string;
666
685
  /** Alias for NotificationEventType */
667
686
  export type NotificationEventType = string;
687
+ /** Alias for TestRunStatus */
688
+ export type TestRunStatus = string;
689
+ /** Alias for PassFailTestResult */
690
+ export type PassFailTestResult = string;
691
+ /** Alias for RequestDataLevel */
692
+ export type RequestDataLevel = string;
693
+ /** Alias for CreatedByType */
694
+ export type CreatedByType = string;
695
+ /** Alias for TimeGrain */
696
+ export type TimeGrain = string;
697
+ /** Alias for TestProfileRunStatus */
698
+ export type TestProfileRunStatus = string;
699
+ /** Alias for RecommendationCategory */
700
+ export type RecommendationCategory = string;
668
701
  /** Added Poller Types **/
669
702
  /**
670
703
  * Poller for File Upload and Validation
671
704
  */
672
- export type FileUploadAndValidatePoller = SimplePollerLike<OperationState<LoadTestAdministrationGetTestFile200Response>, LoadTestAdministrationGetTestFile200Response>;
705
+ export type FileUploadAndValidatePoller = SimplePollerLike<PollerOperationState<LoadTestAdministrationGetTestFile200Response>, LoadTestAdministrationGetTestFile200Response>;
673
706
  /**
674
707
  * Poller for Test Run Completion
675
708
  */
676
- export type TestRunCompletionPoller = SimplePollerLike<OperationState<LoadTestRunGetTestRun200Response>, LoadTestRunGetTestRun200Response>;
709
+ export type TestRunCompletionPoller = SimplePollerLike<PollerOperationState<LoadTestRunGetTestRun200Response>, LoadTestRunGetTestRun200Response>;
677
710
  /**
678
711
  * Poller for Test Profile Run Completion
679
712
  */
680
- export type TestProfileRunCompletionPoller = SimplePollerLike<OperationState<TestProfileRunAdministrationGetTestProfileRun200Response>, TestProfileRunAdministrationGetTestProfileRun200Response>;
713
+ export type TestProfileRunCompletionPoller = SimplePollerLike<PollerOperationState<TestProfileRunAdministrationGetTestProfileRun200Response>, TestProfileRunAdministrationGetTestProfileRun200Response>;
681
714
  export type TestRunCreateOrUpdateSuccessResponse = LoadTestRunCreateOrUpdateTestRun200Response | LoadTestRunCreateOrUpdateTestRun201Response;
682
715
  export type TestProfileRunCreateOrUpdateSuccessResponse = TestProfileRunAdministrationCreateOrUpdateTestProfileRun200Response | TestProfileRunAdministrationCreateOrUpdateTestProfileRun201Response;
683
716
  export type TestUploadFileSuccessResponse = LoadTestAdministrationUploadTestFile201Response;
@@ -1 +1 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationState, SimplePollerLike } from \"@azure/core-lro\";\nimport type {\n LoadTestAdministrationGetTestFile200Response,\n LoadTestAdministrationUploadTestFile201Response,\n LoadTestRunCreateOrUpdateTestRun200Response,\n LoadTestRunCreateOrUpdateTestRun201Response,\n LoadTestRunGetTestRun200Response,\n TestProfileRunAdministrationCreateOrUpdateTestProfileRun200Response,\n TestProfileRunAdministrationCreateOrUpdateTestProfileRun201Response,\n TestProfileRunAdministrationGetTestProfileRun200Response,\n} from \"./responses.js\";\n\n/** Load test model. */\nexport interface Test {\n /** Pass fail criteria for a test. */\n passFailCriteria?: PassFailCriteria;\n /** Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window. */\n autoStopCriteria?: AutoStopCriteria;\n /**\n * Secrets can be stored in an Azure Key Vault or any other secret store. If the\n * secret is stored in an Azure Key Vault, the value should be the secret\n * identifier and the type should be AKV_SECRET_URI. If the secret is stored\n * elsewhere, the secret value should be provided directly and the type should be\n * SECRET_VALUE.\n */\n secrets?: Record<string, Secret>;\n /** Certificates metadata. */\n certificate?: CertificateMetadata;\n /** Environment variables which are defined as a set of <name,value> pairs. */\n environmentVariables?: Record<string, string>;\n /** The load test configuration. */\n loadTestConfiguration?: LoadTestConfiguration;\n /** Id of the test run to be marked as baseline to view trends of client-side metrics from recent test runs */\n baselineTestRunId?: string;\n /** The test description. */\n description?: string;\n /** Display name of a test. */\n displayName?: string;\n /** Subnet ID on which the load test instances should run. */\n subnetId?: string;\n /**\n * Kind of test.\n *\n * Possible values: \"URL\", \"JMX\", \"Locust\"\n */\n kind?: TestKind;\n /** Inject load test engines without deploying public IP for outbound access */\n publicIPDisabled?: boolean;\n /** Type of the managed identity referencing the Key vault. */\n keyvaultReferenceIdentityType?: string;\n /** Resource Id of the managed identity referencing the Key vault. */\n keyvaultReferenceIdentityId?: string;\n /**\n * Type of the managed identity referencing the metrics.\n *\n * Possible values: \"SystemAssigned\", \"UserAssigned\"\n */\n metricsReferenceIdentityType?: ManagedIdentityType;\n /** Resource Id of the managed identity referencing the metrics. */\n metricsReferenceIdentityId?: string;\n /**\n * Type of the managed identity built in load test engines\n *\n * Possible values: \"SystemAssigned\", \"UserAssigned\"\n */\n engineBuiltInIdentityType?: ManagedIdentityType;\n /** Resource Ids of the managed identity built in to load test engines. Required if engineBuiltInIdentityType is UserAssigned. */\n engineBuiltInIdentityIds?: string[];\n}\n\n/** Pass fail criteria for a test. */\nexport interface PassFailCriteria {\n /** Map of id and pass fail metrics { id : pass fail metrics }. */\n passFailMetrics?: Record<string, PassFailMetric>;\n /** Map of id and pass fail server metrics { id : pass fail metrics }. */\n passFailServerMetrics?: Record<string, PassFailServerMetric>;\n}\n\n/** Pass fail metric */\nexport interface PassFailMetric {\n /**\n * The client metric on which the criteria should be applied.\n *\n * Possible values: \"response_time_ms\", \"latency\", \"error\", \"requests\", \"requests_per_sec\"\n */\n clientMetric?: PFMetrics;\n /**\n * The aggregation function to be applied on the client metric. Allowed functions\n * - ‘percentage’ - for error metric , ‘avg’, percentiles like ‘p50’, ‘p90’, & so on, ‘min’,\n * ‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec,\n * ‘count’ - for requests\n *\n * Possible values: \"count\", \"percentage\", \"avg\", \"p50\", \"p75\", \"p90\", \"p95\", \"p96\", \"p97\", \"p98\", \"p99\", \"p99.9\", \"p99.99\", \"min\", \"max\"\n */\n aggregate?: PassFailAggregationFunction;\n /** The comparison operator. Supported types ‘>’, ‘<’ */\n condition?: string;\n /** Request name for which the Pass fail criteria has to be applied */\n requestName?: string;\n /**\n * The value to compare with the client metric. Allowed values - ‘error : [0.0 ,\n * 100.0] unit- % ’, response_time_ms and latency : any integer value unit- ms.\n */\n value?: number;\n /**\n * Action taken after the threshold is met. Default is ‘continue’.\n *\n * Possible values: \"continue\", \"stop\"\n */\n action?: PassFailAction;\n}\n\n/** Pass fail server metric */\nexport interface PassFailServerMetric {\n /** The resource id of the resource emitting the metric. */\n resourceId: string;\n /** The server metric namespace. */\n metricNamespace: string;\n /** The server metric name. */\n metricName: string;\n /** Aggregation Type */\n aggregation: string;\n /** The comparison operator. Supported types ‘>’, ‘<’ */\n condition: string;\n /** The value to compare with the server metric. */\n value: number;\n /**\n * Action taken after the threshold is met. Default is ‘continue’.\n *\n * Possible values: \"continue\", \"stop\"\n */\n action?: PassFailAction;\n}\n\n/** Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window. */\nexport interface AutoStopCriteria {\n /** Whether auto-stop should be disabled. The default value is false. */\n autoStopDisabled?: boolean;\n /** Threshold percentage of errors on which test run should be automatically stopped. Allowed values are in range of 0.0-100.0 */\n errorRate?: number;\n /** Time window during which the error percentage should be evaluated in seconds. */\n errorRateTimeWindowInSeconds?: number;\n}\n\n/** Secret */\nexport interface Secret {\n /** The value of the secret for the respective type */\n value?: string;\n /**\n * Type of secret\n *\n * Possible values: \"AKV_SECRET_URI\", \"SECRET_VALUE\"\n */\n type?: SecretType;\n}\n\n/** Certificates metadata */\nexport interface CertificateMetadata {\n /** The value of the certificate for respective type */\n value?: string;\n /**\n * Type of certificate\n *\n * Possible values: \"AKV_CERT_URI\"\n */\n type?: CertificateType;\n /** Name of the certificate. */\n name?: string;\n}\n\n/** Configurations for the load test. */\nexport interface LoadTestConfiguration {\n /** The number of engine instances to execute load test. Supported values are in range of 1-400. Required for creating a new test. */\n engineInstances?: number;\n /**\n * If false, Azure Load Testing copies and processes your input files unmodified\n * across all test engine instances. If true, Azure Load Testing splits the CSV\n * input data evenly across all engine instances. If you provide multiple CSV\n * files, each file will be split evenly.\n */\n splitAllCSVs?: boolean;\n /**\n * If true, optionalLoadTestConfig is required and JMX script for the load test is\n * not required to upload.\n */\n quickStartTest?: boolean;\n /** Configuration for quick load test */\n optionalLoadTestConfig?: OptionalLoadTestConfiguration;\n /** Region distribution configuration for the load test. */\n regionalLoadTestConfig?: Array<RegionalConfiguration>;\n}\n\n/** Configuration for quick load test */\nexport interface OptionalLoadTestConfiguration {\n /** Test URL. Provide the complete HTTP URL. For example, https://contoso-app.azurewebsites.net/login */\n endpointUrl?: string;\n /** Target throughput (requests per second). This may not be necessarily achieved. The actual throughput will be lower if the application is not capable of handling it. */\n requestsPerSecond?: number;\n /** Maximum response time in milliseconds of the API/endpoint. */\n maxResponseTimeInMs?: number;\n /** No of concurrent virtual users. */\n virtualUsers?: number;\n /** Ramp up time in seconds. */\n rampUpTime?: number;\n /** Test run duration in seconds. */\n duration?: number;\n}\n\n/** Region distribution configuration for the load test. */\nexport interface RegionalConfiguration {\n /** The number of engine instances to execute load test in specified region. Supported values are in range of 1-400. */\n engineInstances: number;\n /**\n * Azure region name.\n * The region name should of format accepted by ARM, and should be a region supported by Azure Load Testing. For example, East US should be passed as \"eastus\".\n * The region name must match one of the strings in the \"Name\" column returned from running the \"az account list-locations -o table\" Azure CLI command.\n */\n region: string;\n}\n\n/** The input artifacts for the test. */\nexport interface TestInputArtifacts {\n /** The load test YAML file that contains the the test configuration */\n configFileInfo?: TestFileInfo;\n /** The test script file for the test run */\n testScriptFileInfo?: TestFileInfo;\n /** The user properties file */\n userPropFileInfo?: TestFileInfo;\n /** The zip file with all input artifacts */\n inputArtifactsZipFileInfo?: TestFileInfo;\n /** The config json file for url based test */\n urlTestConfigFileInfo?: TestFileInfo;\n}\n\n/** Test file info. */\nexport interface TestFileInfo {\n /** Name of the file. */\n fileName: string;\n}\n\n/** Test app components */\nexport interface TestAppComponents {\n /**\n * Azure resource collection { resource id (fully qualified resource Id e.g\n * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName})\n * : resource object }\n */\n components: Record<string, AppComponent>;\n}\n\n/** An Azure resource object (Refer azure generic resource model :https://learn.microsoft.com/en-us/rest/api/resources/resources/get-by-id#genericresource) */\nexport interface AppComponent {\n /** Azure resource name, required while creating the app component. */\n resourceName: string;\n /** Azure resource type, required while creating the app component. */\n resourceType: string;\n /** Azure resource display name */\n displayName?: string;\n /** Kind of Azure resource type */\n kind?: string;\n}\n\n/** Test server metrics configuration */\nexport interface TestServerMetricsConfiguration {\n /**\n * Azure resource metrics collection {metric id : metrics object} (Refer :\n * https://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition\n * for metric id).\n */\n metrics: Record<string, ResourceMetric>;\n}\n\n/**\n * Associated metric definition for particular metrics of the azure resource (\n * Refer :\n * https://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition).\n */\nexport interface ResourceMetric {\n /** Azure resource id. */\n resourceId: string;\n /** Metric name space. */\n metricNamespace: string;\n /** Metric description. */\n displayDescription?: string;\n /** The invariant value of metric name */\n name: string;\n /** Metric aggregation. */\n aggregation: string;\n /** Metric unit. */\n unit?: string;\n /** Azure resource type. */\n resourceType: string;\n}\n\n/** The Test Profile Model. A Test Profile resource enables you to set up a test profile which contains various configurations for a supported resource type and a load test to execute on that resource. */\nexport interface TestProfile {\n /** Display name of the test profile. */\n displayName?: string;\n /** Description for the test profile. */\n description?: string;\n /** Associated test ID for the test profile. This property is required for creating a Test Profile and it's not allowed to be updated. */\n testId?: string;\n /** Target resource ID on which the test profile is created. This property is required for creating a Test Profile and it's not allowed to be updated. */\n targetResourceId?: string;\n /** Configurations of the target resource on which testing would be done. */\n targetResourceConfigurations?: TargetResourceConfigurations;\n}\n\n/** Configurations of a target resource. This varies with the kind of resource. */\nexport interface TargetResourceConfigurationsParent {\n kind: ResourceKind;\n}\n\n/** Configurations for a Function App using Flex Consumption Plan. */\nexport interface FunctionFlexConsumptionTargetResourceConfigurations\n extends TargetResourceConfigurationsParent {\n /**\n * The kind value to use when providing configuration.\n * This should typically be not changed from its value.\n */\n kind: \"FunctionsFlexConsumption\";\n /** A map of configurations for a Function app using Flex Consumption Plan. */\n configurations?: Record<string, FunctionFlexConsumptionResourceConfiguration>;\n}\n\n/** Resource configuration instance for a Flex Consumption based Azure Function App. */\nexport interface FunctionFlexConsumptionResourceConfiguration {\n /** Memory size of the instance. Supported values are 2048, 4096. */\n instanceMemoryMB: number;\n /** HTTP Concurrency for the function app. */\n httpConcurrency?: number;\n}\n\n/** Load test run model */\nexport interface TestRun {\n /** Pass fail criteria for a test. */\n passFailCriteria?: PassFailCriteria;\n /** Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window. */\n autoStopCriteria?: AutoStopCriteria;\n /**\n * Secrets can be stored in an Azure Key Vault or any other secret store. If the\n * secret is stored in an Azure Key Vault, the value should be the secret\n * identifier and the type should be AKV_SECRET_URI. If the secret is stored\n * elsewhere, the secret value should be provided directly and the type should be\n * SECRET_VALUE.\n */\n secrets?: Record<string, Secret>;\n /** Certificates metadata */\n certificate?: CertificateMetadata;\n /** Environment variables which are defined as a set of <name,value> pairs. */\n environmentVariables?: Record<string, string>;\n /** Display name of a testRun. */\n displayName?: string;\n /** Associated test Id. */\n testId?: string;\n /** The test run description. */\n description?: string;\n /**\n * Request data collection level for test run\n *\n * Possible values: \"NONE\", \"ERRORS\"\n */\n requestDataLevel?: RequestDataLevel;\n /** Enable or disable debug level logging. True if debug logs are enabled for the test run. False otherwise */\n debugLogsEnabled?: boolean;\n /**\n * The type of the entity that created the test run. (E.x. User, ScheduleTrigger, etc).\n *\n * Possible values: \"User\", \"ScheduledTrigger\"\n */\n createdByType?: CreatedByType;\n}\n\n/** Error details if there is any failure in load test run */\nexport interface ErrorDetails {}\n\n/** Test run statistics. */\nexport interface TestRunStatistics {}\n\n/** Collection of test run artifacts */\nexport interface TestRunArtifacts {\n /** The output artifacts for the test run. */\n outputArtifacts?: TestRunOutputArtifacts;\n}\n\n/** The input artifacts for the test run. */\nexport interface TestRunInputArtifacts {\n /** The load test YAML file that contains the the test configuration */\n configFileInfo?: TestRunFileInfo;\n /** The test script file for the test run */\n testScriptFileInfo?: TestRunFileInfo;\n /** The user properties file */\n userPropFileInfo?: TestRunFileInfo;\n /** The zip file for all input artifacts */\n inputArtifactsZipFileInfo?: TestRunFileInfo;\n /** The config json file for url based test */\n urlTestConfigFileInfo?: TestRunFileInfo;\n}\n\n/** Test run file info. */\nexport interface TestRunFileInfo {\n /** Name of the file. */\n fileName: string;\n}\n\n/** The output artifacts for the test run. */\nexport interface TestRunOutputArtifacts {\n /** The test run results file */\n resultFileInfo?: TestRunFileInfo;\n /** The test run report with metrics */\n logsFileInfo?: TestRunFileInfo;\n /** The container for test run artifacts. */\n artifactsContainerInfo?: ArtifactsContainerInfo;\n /** The report file for the test run. */\n reportFileInfo?: TestRunFileInfo;\n}\n\n/** Artifacts container info. */\nexport interface ArtifactsContainerInfo {\n /** This is a SAS URI to an Azure Storage Container that contains the test run artifacts. */\n url?: string;\n /** Expiry time of the container (RFC 3339 literal format) */\n expireDateTime?: Date | string;\n}\n\n/** Filters to fetch the set of metric. */\nexport interface MetricRequestPayload {\n /**\n * Get metrics for specific dimension values. Example: Metric contains dimension\n * like SamplerName, Error. To retrieve all the time series data where SamplerName\n * is equals to HTTPRequest1 or HTTPRequest2, the DimensionFilter value will be\n * {\"SamplerName\", [\"HTTPRequest1\", \"HTTPRequest2\"}\n */\n filters?: Array<DimensionFilter>;\n}\n\n/** Dimension name and values to filter */\nexport interface DimensionFilter {\n /** The dimension name */\n name?: string;\n /** The dimension values. Maximum values can be 20. */\n values?: string[];\n}\n\n/** Test run app component */\nexport interface TestRunAppComponents {\n /**\n * Azure resource collection { resource id (fully qualified resource Id e.g\n * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName})\n * : resource object }\n */\n components: Record<string, AppComponent>;\n}\n\n/** Test run server metrics configuration */\nexport interface TestRunServerMetricsConfiguration {\n /**\n * Azure resource metrics collection {metric id : metrics object} (Refer :\n * https://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition\n * for metric id).\n */\n metrics?: Record<string, ResourceMetric>;\n}\n\n/** The Test Profile Run Model. Test Profile Run resource enables you to instantiate an already created test profile and run load tests to get recommendations on the optimal configuration for the target resource. */\nexport interface TestProfileRun {\n /** Display name for the test profile run. */\n displayName?: string;\n /** The test profile run description */\n description?: string;\n /** Associated test profile ID for the test profile run. This is required to create a test profile run and can't be updated. */\n testProfileId?: string;\n}\n\n/** Details of a particular test run for a test profile run. */\nexport interface TestRunDetail {\n /**\n * Status of the test run.\n *\n * Possible values: \"ACCEPTED\", \"NOTSTARTED\", \"PROVISIONING\", \"PROVISIONED\", \"CONFIGURING\", \"CONFIGURED\", \"EXECUTING\", \"EXECUTED\", \"DEPROVISIONING\", \"DEPROVISIONED\", \"DONE\", \"CANCELLING\", \"CANCELLED\", \"FAILED\", \"VALIDATION_SUCCESS\", \"VALIDATION_FAILURE\"\n */\n status: TestRunStatus;\n /** ID of the configuration on which the test ran. */\n configurationId: string;\n /** Key value pair of extra properties associated with the test run. */\n properties: Record<string, string>;\n}\n\n/** A recommendation object that provides a list of configuration that optimizes its category. */\nexport interface TestProfileRunRecommendation {\n /**\n * Category of the recommendation.\n *\n * Possible values: \"ThroughputOptimized\", \"CostOptimized\"\n */\n category: RecommendationCategory;\n /** List of configurations IDs for which the recommendation is applicable. These are a subset of the provided target resource configurations. */\n configurations?: string[];\n}\n\n/** Trigger model. */\nexport interface TriggerParent {\n /** The name of the trigger. */\n displayName: string;\n /** The description of the trigger. */\n description?: string;\n /**\n * The current state of the trigger.\n *\n * Possible values: \"Active\", \"Paused\", \"Completed\", \"Disabled\"\n */\n state?: TriggerState;\n kind: TriggerType;\n}\n\n/** State details of the trigger. */\nexport interface StateDetails {\n /** The error message if the trigger is in disabled state. */\n message?: string;\n}\n\n/** ScheduleTestsTrigger model. */\nexport interface ScheduleTestsTrigger extends TriggerParent {\n /** The type of the trigger is ScheduleTestsTrigger. */\n kind: \"ScheduleTestsTrigger\";\n /** The test id of test to be triggered by this schedule trigger. Currently only one test is supported for a trigger. */\n testIds: string[];\n /** Start date time of the trigger in UTC timezone. (RFC 3339 literal format) */\n startDateTime?: Date | string;\n /** Recurrence details of the trigger. Null if schedule is not recurring. */\n recurrence?: Recurrence;\n}\n\n/** Actual state of the recurrence for the trigger. */\nexport interface RecurrenceStatus {\n /** The number of occurrences remaining for the trigger. Null if recurrence end has end date instead of number of occurrences. */\n remainingOccurrences?: number;\n /** The next three execution times of the trigger. (RFC 3339 literal format) */\n nextScheduledDateTimes?: Date[] | string[];\n}\n\n/** Recurrence model. */\nexport interface RecurrenceParent {\n /** Recurrence end model. You can specify the end either by providing a numberOfOccurrences (which will end the recurrence after the specified number of occurrences) or by providing an endDateTime (which will end the recurrence after the specified date). If neither value is provided, the recurrence will continue until it is manually ended. However, if both values are provided, an error will be thrown. */\n recurrenceEnd?: RecurrenceEnd;\n frequency: Frequency;\n}\n\n/** Recurrence end model. Either provide numberOfOccurrences if you want recurrence to end after a specified number of occurrences or provide endDate if you want recurrence to end after a specified end date. If both values are provided, a validation error will be thrown indicating that only one field should be provided. If neither value is provided, the recurrence will end when manually ended. */\nexport interface RecurrenceEnd {\n /** Number of occurrences after which the recurrence will end. */\n numberOfOccurrences?: number;\n /** The date after which the recurrence will end. (RFC 3339 literal format) */\n endDateTime?: Date | string;\n}\n\n/** Recurrence model when frequency is set as Daily. */\nexport interface DailyRecurrence extends RecurrenceParent {\n /** Frequency of the day recurrence. */\n frequency: \"Daily\";\n /** The interval at which the recurrence should repeat. It signifies the number of days between each recurrence. */\n interval: number;\n}\n\n/** Recurrence model when frequency is set as Hourly. */\nexport interface HourlyRecurrence extends RecurrenceParent {\n /** Frequency of the hour recurrence. */\n frequency: \"Hourly\";\n /** The interval at which the recurrence should repeat. It signifies the number of hours between each recurrence. */\n interval: number;\n}\n\n/** Recurrence model when frequency is set as MonthlyByDays . */\nexport interface MonthlyRecurrenceByWeekDays extends RecurrenceParent {\n /** Frequency of the month recurrence. */\n frequency: \"MonthlyByDays\";\n /** Specific days of the week when the recurrence should repeat. */\n weekDaysInMonth?: WeekDays[];\n /** Index of the week in a month at which the recurrence should repeat. For example, if the index is '2', weekDay is 'Monday', interval is 3 and frequency is 'Month', the recurrence will run every second Monday of the month and repeat every 3 months. Value of index can be 1 to 5. */\n index: number;\n /** The interval at which the recurrence should repeat. It signifies the number of months between each recurrence. */\n interval: number;\n}\n\n/** Recurrence model when frequency is set as MonthlyByDates. */\nexport interface MonthlyRecurrenceByDates extends RecurrenceParent {\n /** Frequency of the month recurrence. */\n frequency: \"MonthlyByDates\";\n /** Recurrence set to repeat on the specified dates of the month. Value of dates can be 1 to 31 and -1. -1 represents the last day of the month. */\n datesInMonth?: number[];\n /** The interval at which the recurrence should repeat. It signifies the number of months between each recurrence. */\n interval?: number;\n}\n\n/** Recurrence is set based on cron expression. */\nexport interface RecurrenceWithCron extends RecurrenceParent {\n /** Specify frequency using a cron expression. */\n frequency: \"Cron\";\n /** Cron expression for the recurrence. */\n cronExpression: string;\n}\n\n/** Recurrence model when frequency is set as weekly. */\nexport interface WeeklyRecurrence extends RecurrenceParent {\n /** Frequency of the week recurrence. */\n frequency: \"Weekly\";\n /** Recurrence set to repeat on the specified days of the week. */\n daysOfWeek?: WeekDays[];\n /** The interval at which the recurrence should repeat. It signifies the number of weeks between each recurrence. */\n interval?: number;\n}\n\n/** Notification rule model. */\nexport interface NotificationRuleParent {\n /** The name of the notification rule. */\n displayName: string;\n /** The action groups to notify. */\n actionGroupIds: string[];\n scope: NotificationScopeType;\n}\n\n/** Tests Notification rule model. */\nexport interface TestsNotificationRule extends NotificationRuleParent {\n /** Scope of type Tests. */\n scope: \"Tests\";\n /** The test ids to include. If not provided, notification will be sent for all testIds. */\n testIds?: string[];\n /**\n * The event to receive notifications for along with filtering conditions.\n * Key is a user-assigned identifier for the event filter.\n */\n eventFilters: Record<string, TestsNotificationEventFilter>;\n}\n\n/** The notification event filter for Tests scope. */\nexport interface TestsNotificationEventFilterParent {\n kind: NotificationEventType;\n}\n\n/** The notification event filter when the event type is TestRunEnded and scope is Tests. */\nexport interface TestRunEndedNotificationEventFilter extends TestsNotificationEventFilterParent {\n /** Event type for test run ended event. */\n kind: \"TestRunEnded\";\n /** Event filtering condition. */\n condition?: TestRunEndedEventCondition;\n}\n\n/** TestRunEnded Event condition. */\nexport interface TestRunEndedEventCondition {\n /** The test run statuses to send notification for. */\n testRunStatuses?: TestRunStatus[];\n /** The test run results to send notification for. */\n testRunResults?: PassFailTestResult[];\n}\n\n/** The notification event filter when the event type is TestRunStarted and scope is Tests. */\nexport interface TestRunStartedNotificationEventFilter extends TestsNotificationEventFilterParent {\n /** Event type for test run started event. */\n kind: \"TestRunStarted\";\n}\n\n/** The notification event filter when the event type is TriggerCompleted. */\nexport interface TriggerCompletedNotificationEventFilter\n extends TestsNotificationEventFilterParent {\n /** Event type for trigger ended event. */\n kind: \"TriggerCompleted\";\n}\n\n/** The notification event filter when the event type is TriggerDisabled. */\nexport interface TriggerDisabledNotificationEventFilter extends TestsNotificationEventFilterParent {\n /** Event type for trigger disabled event. */\n kind: \"TriggerDisabled\";\n}\n\n/** Configurations of a target resource. This varies with the kind of resource. */\nexport type TargetResourceConfigurations =\n | TargetResourceConfigurationsParent\n | FunctionFlexConsumptionTargetResourceConfigurations;\n/** Trigger model. */\nexport type Trigger = TriggerParent | ScheduleTestsTrigger;\n/** Recurrence model. */\nexport type Recurrence =\n | RecurrenceParent\n | DailyRecurrence\n | HourlyRecurrence\n | MonthlyRecurrenceByWeekDays\n | MonthlyRecurrenceByDates\n | RecurrenceWithCron\n | WeeklyRecurrence;\n/** Notification rule model. */\nexport type NotificationRule = NotificationRuleParent | TestsNotificationRule;\n/** The notification event filter for Tests scope. */\nexport type TestsNotificationEventFilter =\n | TestsNotificationEventFilterParent\n | TestRunEndedNotificationEventFilter\n | TestRunStartedNotificationEventFilter\n | TriggerCompletedNotificationEventFilter\n | TriggerDisabledNotificationEventFilter;\n/** Alias for PFMetrics */\nexport type PFMetrics = string;\n/** Alias for PassFailAggregationFunction */\nexport type PassFailAggregationFunction = string;\n/** Alias for PassFailAction */\nexport type PassFailAction = string;\n/** Alias for PassFailResult */\nexport type PassFailResult = string;\n/** Alias for SecretType */\nexport type SecretType = string;\n/** Alias for CertificateType */\nexport type CertificateType = string;\n/** Alias for FileType */\nexport type FileType = string;\n/** Alias for FileValidationStatus */\nexport type FileValidationStatus = string;\n/** Alias for TestKind */\nexport type TestKind = string;\n/** Alias for ManagedIdentityType */\nexport type ManagedIdentityType = string;\n/** Alias for ResourceKind */\nexport type ResourceKind = string;\n/** Alias for PassFailTestResult */\nexport type PassFailTestResult = string;\n/** Alias for TestRunStatus */\nexport type TestRunStatus = string;\n/** Alias for RequestDataLevel */\nexport type RequestDataLevel = string;\n/** Alias for CreatedByType */\nexport type CreatedByType = string;\n/** Alias for TimeGrain */\nexport type TimeGrain = string;\n/** Alias for TestProfileRunStatus */\nexport type TestProfileRunStatus = string;\n/** Alias for RecommendationCategory */\nexport type RecommendationCategory = string;\n/** Alias for TriggerType */\nexport type TriggerType = string;\n/** Alias for TriggerState */\nexport type TriggerState = string;\n/** Alias for Frequency */\nexport type Frequency = string;\n/** Alias for WeekDays */\nexport type WeekDays = string;\n/** Alias for NotificationScopeType */\nexport type NotificationScopeType = string;\n/** Alias for NotificationEventType */\nexport type NotificationEventType = string;\n\n/** Added Poller Types **/\n\n/**\n * Poller for File Upload and Validation\n */\nexport type FileUploadAndValidatePoller = SimplePollerLike<\n OperationState<LoadTestAdministrationGetTestFile200Response>,\n LoadTestAdministrationGetTestFile200Response\n>;\n\n/**\n * Poller for Test Run Completion\n */\nexport type TestRunCompletionPoller = SimplePollerLike<\n OperationState<LoadTestRunGetTestRun200Response>,\n LoadTestRunGetTestRun200Response\n>;\n\n/**\n * Poller for Test Profile Run Completion\n */\nexport type TestProfileRunCompletionPoller = SimplePollerLike<\n OperationState<TestProfileRunAdministrationGetTestProfileRun200Response>,\n TestProfileRunAdministrationGetTestProfileRun200Response\n>;\n\nexport type TestRunCreateOrUpdateSuccessResponse =\n | LoadTestRunCreateOrUpdateTestRun200Response\n | LoadTestRunCreateOrUpdateTestRun201Response;\n\nexport type TestProfileRunCreateOrUpdateSuccessResponse =\n | TestProfileRunAdministrationCreateOrUpdateTestProfileRun200Response\n | TestProfileRunAdministrationCreateOrUpdateTestProfileRun201Response;\n\nexport type TestUploadFileSuccessResponse = LoadTestAdministrationUploadTestFile201Response;\n\nexport interface PolledOperationOptions {\n /**\n * Time delay between poll requests, in milliseconds.\n */\n updateIntervalInMs?: number;\n}\n"]}
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationState as PollerOperationState } from \"@azure/core-lro\";\nimport type { SimplePollerLike } from \"./pollingHelper.js\";\nimport type {\n LoadTestAdministrationGetTestFile200Response,\n LoadTestAdministrationUploadTestFile201Response,\n LoadTestRunCreateOrUpdateTestRun200Response,\n LoadTestRunCreateOrUpdateTestRun201Response,\n LoadTestRunGetTestRun200Response,\n TestProfileRunAdministrationCreateOrUpdateTestProfileRun200Response,\n TestProfileRunAdministrationCreateOrUpdateTestProfileRun201Response,\n TestProfileRunAdministrationGetTestProfileRun200Response,\n} from \"./responses.js\";\n\n/** Load test model. */\nexport interface Test {\n /** Pass fail criteria for a test. */\n passFailCriteria?: PassFailCriteria;\n /** Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window. */\n autoStopCriteria?: AutoStopCriteria;\n /**\n * Secrets can be stored in an Azure Key Vault or any other secret store. If the\n * secret is stored in an Azure Key Vault, the value should be the secret\n * identifier and the type should be AKV_SECRET_URI. If the secret is stored\n * elsewhere, the secret value should be provided directly and the type should be\n * SECRET_VALUE.\n */\n secrets?: Record<string, Secret>;\n /** Certificates metadata. */\n certificate?: CertificateMetadata;\n /** Environment variables which are defined as a set of <name,value> pairs. */\n environmentVariables?: Record<string, string>;\n /** The load test configuration. */\n loadTestConfiguration?: LoadTestConfiguration;\n /** Id of the test run to be marked as baseline to view trends of client-side metrics from recent test runs */\n baselineTestRunId?: string;\n /** The test description. */\n description?: string;\n /** Display name of a test. */\n displayName?: string;\n /** Subnet ID on which the load test instances should run. */\n subnetId?: string;\n /**\n * Kind of test.\n *\n * Possible values: \"URL\", \"JMX\", \"Locust\"\n */\n kind?: TestKind;\n /** Inject load test engines without deploying public IP for outbound access */\n publicIPDisabled?: boolean;\n /** Type of the managed identity referencing the Key vault. */\n keyvaultReferenceIdentityType?: string;\n /** Resource Id of the managed identity referencing the Key vault. */\n keyvaultReferenceIdentityId?: string;\n /**\n * Type of the managed identity referencing the metrics.\n *\n * Possible values: \"SystemAssigned\", \"UserAssigned\"\n */\n metricsReferenceIdentityType?: ManagedIdentityType;\n /** Resource Id of the managed identity referencing the metrics. */\n metricsReferenceIdentityId?: string;\n /**\n * Type of the managed identity built in load test engines\n *\n * Possible values: \"SystemAssigned\", \"UserAssigned\"\n */\n engineBuiltInIdentityType?: ManagedIdentityType;\n /** Resource Ids of the managed identity built in to load test engines. Required if engineBuiltInIdentityType is UserAssigned. */\n engineBuiltInIdentityIds?: string[];\n /** Preferences for the test. */\n preferences?: TestPreferences;\n}\n\n/** Pass fail criteria for a test. */\nexport interface PassFailCriteria {\n /** Map of id and pass fail metrics { id : pass fail metrics }. */\n passFailMetrics?: Record<string, PassFailMetric>;\n /** Map of id and pass fail server metrics { id : pass fail metrics }. */\n passFailServerMetrics?: Record<string, PassFailServerMetric>;\n}\n\n/** Pass fail metric */\nexport interface PassFailMetric {\n /**\n * The client metric on which the criteria should be applied.\n *\n * Possible values: \"response_time_ms\", \"latency\", \"error\", \"requests\", \"requests_per_sec\"\n */\n clientMetric?: PFMetrics;\n /**\n * The aggregation function to be applied on the client metric. Allowed functions\n * - ‘percentage’ - for error metric , ‘avg’, percentiles like ‘p50’, ‘p90’, & so on, ‘min’,\n * ‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec,\n * ‘count’ - for requests\n *\n * Possible values: \"count\", \"percentage\", \"avg\", \"p50\", \"p75\", \"p90\", \"p95\", \"p96\", \"p97\", \"p98\", \"p99\", \"p99.9\", \"p99.99\", \"min\", \"max\"\n */\n aggregate?: PassFailAggregationFunction;\n /** The comparison operator. Supported types ‘>’, ‘<’ */\n condition?: string;\n /** Request name for which the Pass fail criteria has to be applied */\n requestName?: string;\n /**\n * The value to compare with the client metric. Allowed values - ‘error : [0.0 ,\n * 100.0] unit- % ’, response_time_ms and latency : any integer value unit- ms.\n */\n value?: number;\n /**\n * Action taken after the threshold is met. Default is ‘continue’.\n *\n * Possible values: \"continue\", \"stop\"\n */\n action?: PassFailAction;\n}\n\n/** Pass fail server metric */\nexport interface PassFailServerMetric {\n /** The resource id of the resource emitting the metric. */\n resourceId: string;\n /** The server metric namespace. */\n metricNamespace: string;\n /** The server metric name. */\n metricName: string;\n /** Aggregation Type */\n aggregation: string;\n /** The comparison operator. Supported types ‘>’, ‘<’ */\n condition: string;\n /** The value to compare with the server metric. */\n value: number;\n /**\n * Action taken after the threshold is met. Default is ‘continue’.\n *\n * Possible values: \"continue\", \"stop\"\n */\n action?: PassFailAction;\n}\n\n/** Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window. */\nexport interface AutoStopCriteria {\n /** Whether auto-stop should be disabled. The default value is false. */\n autoStopDisabled?: boolean;\n /** Threshold percentage of errors on which test run should be automatically stopped. Allowed values are in range of 0.0-100.0 */\n errorRate?: number;\n /** Time window during which the error percentage should be evaluated in seconds. */\n errorRateTimeWindowInSeconds?: number;\n /** Maximum number of virtual users per load testing engine, at which the test run should be automatically stopped. */\n maximumVirtualUsersPerEngine?: number;\n}\n\n/** Secret */\nexport interface Secret {\n /** The value of the secret for the respective type */\n value?: string;\n /**\n * Type of secret\n *\n * Possible values: \"AKV_SECRET_URI\", \"SECRET_VALUE\"\n */\n type?: SecretType;\n}\n\n/** Certificates metadata */\nexport interface CertificateMetadata {\n /** The value of the certificate for respective type */\n value?: string;\n /**\n * Type of certificate\n *\n * Possible values: \"AKV_CERT_URI\"\n */\n type?: CertificateType;\n /** Name of the certificate. */\n name?: string;\n}\n\n/** Configurations for the load test. */\nexport interface LoadTestConfiguration {\n /** The number of engine instances to execute load test. Supported values are in range of 1-400. Required for creating a new test. */\n engineInstances?: number;\n /**\n * If false, Azure Load Testing copies and processes your input files unmodified\n * across all test engine instances. If true, Azure Load Testing splits the CSV\n * input data evenly across all engine instances. If you provide multiple CSV\n * files, each file will be split evenly.\n */\n splitAllCSVs?: boolean;\n /**\n * If true, optionalLoadTestConfig is required and JMX script for the load test is\n * not required to upload.\n */\n quickStartTest?: boolean;\n /** Configuration for quick load test */\n optionalLoadTestConfig?: OptionalLoadTestConfiguration;\n /** Region distribution configuration for the load test. */\n regionalLoadTestConfig?: Array<RegionalConfiguration>;\n}\n\n/** Configuration for quick load test */\nexport interface OptionalLoadTestConfiguration {\n /** Test URL. Provide the complete HTTP URL. For example, https://contoso-app.azurewebsites.net/login */\n endpointUrl?: string;\n /** Target throughput (requests per second). This may not be necessarily achieved. The actual throughput will be lower if the application is not capable of handling it. */\n requestsPerSecond?: number;\n /** Maximum response time in milliseconds of the API/endpoint. */\n maxResponseTimeInMs?: number;\n /** No of concurrent virtual users. */\n virtualUsers?: number;\n /** Ramp up time in seconds. */\n rampUpTime?: number;\n /** Test run duration in seconds. */\n duration?: number;\n}\n\n/** Region distribution configuration for the load test. */\nexport interface RegionalConfiguration {\n /** The number of engine instances to execute load test in specified region. Supported values are in range of 1-400. */\n engineInstances: number;\n /**\n * Azure region name.\n * The region name should of format accepted by ARM, and should be a region supported by Azure Load Testing. For example, East US should be passed as \"eastus\".\n * The region name must match one of the strings in the \"Name\" column returned from running the \"az account list-locations -o table\" Azure CLI command.\n */\n region: string;\n}\n\n/** The input artifacts for the test. */\nexport interface TestInputArtifacts {\n /** The load test YAML file that contains the the test configuration */\n configFileInfo?: TestFileInfo;\n /** The test script file for the test run */\n testScriptFileInfo?: TestFileInfo;\n /** The user properties file */\n userPropFileInfo?: TestFileInfo;\n /** The zip file with all input artifacts */\n inputArtifactsZipFileInfo?: TestFileInfo;\n /** The config json file for url based test */\n urlTestConfigFileInfo?: TestFileInfo;\n}\n\n/** Test file info. */\nexport interface TestFileInfo {\n /** Name of the file. */\n fileName: string;\n}\n\n/** Preferences for the test. */\nexport interface TestPreferences {\n /** Enable or disable AI based insights on Test Run Errors. */\n enableAIErrorInsights?: boolean;\n}\n\n/** Request to clone an existing test into a new test. */\nexport interface CloneTestRequest {\n /** Unique identifier for the new test that will be created. */\n newTestId: string;\n /** Display Name override for the newly created test. */\n displayName?: string;\n /** Description override for the newly created test. */\n description?: string;\n}\n\n/** Test app components */\nexport interface TestAppComponents {\n /**\n * Azure resource collection { resource id (fully qualified resource Id e.g\n * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName})\n * : resource object }\n */\n components: Record<string, AppComponent>;\n}\n\n/** An Azure resource object (Refer azure generic resource model :https://learn.microsoft.com/en-us/rest/api/resources/resources/get-by-id#genericresource) */\nexport interface AppComponent {\n /** Azure resource name, required while creating the app component. */\n resourceName: string;\n /** Azure resource type, required while creating the app component. */\n resourceType: string;\n /** Azure resource display name */\n displayName?: string;\n /** Kind of Azure resource type */\n kind?: string;\n}\n\n/** Test server metrics configuration */\nexport interface TestServerMetricsConfiguration {\n /**\n * Azure resource metrics collection {metric id : metrics object} (Refer :\n * https://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition\n * for metric id).\n */\n metrics: Record<string, ResourceMetric>;\n}\n\n/**\n * Associated metric definition for particular metrics of the azure resource (\n * Refer :\n * https://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition).\n */\nexport interface ResourceMetric {\n /** Azure resource id. */\n resourceId: string;\n /** Metric name space. */\n metricNamespace: string;\n /** Metric description. */\n displayDescription?: string;\n /** The invariant value of metric name */\n name: string;\n /** Metric aggregation. */\n aggregation: string;\n /** Metric unit. */\n unit?: string;\n /** Azure resource type. */\n resourceType: string;\n}\n\n/** The Test Profile Model. A Test Profile resource enables you to set up a test profile which contains various configurations for a supported resource type and a load test to execute on that resource. */\nexport interface TestProfile {\n /** Display name of the test profile. */\n displayName?: string;\n /** Description for the test profile. */\n description?: string;\n /** Associated test ID for the test profile. This property is required for creating a Test Profile and it's not allowed to be updated. */\n testId?: string;\n /** Target resource ID on which the test profile is created. This property is required for creating a Test Profile and it's not allowed to be updated. */\n targetResourceId?: string;\n /** Configurations of the target resource on which testing would be done. */\n targetResourceConfigurations?: TargetResourceConfigurations;\n}\n\n/** Configurations of a target resource. This varies with the kind of resource. */\nexport interface TargetResourceConfigurationsParent {\n kind: ResourceKind;\n}\n\n/** Configurations for a Function App using Flex Consumption Plan. */\nexport interface FunctionFlexConsumptionTargetResourceConfigurations extends TargetResourceConfigurationsParent {\n /**\n * The kind value to use when providing configuration.\n * This should typically be not changed from its value.\n */\n kind: \"FunctionsFlexConsumption\";\n /** A map of configurations for a Function app using Flex Consumption Plan. */\n configurations?: Record<string, FunctionFlexConsumptionResourceConfiguration>;\n}\n\n/** Resource configuration instance for a Flex Consumption based Azure Function App. */\nexport interface FunctionFlexConsumptionResourceConfiguration {\n /** Memory size of the instance. Supported values are 2048, 4096. */\n instanceMemoryMB: number;\n /** HTTP Concurrency for the function app. */\n httpConcurrency?: number;\n}\n\n/** Trigger model. */\nexport interface TriggerParent {\n /** The name of the trigger. */\n displayName: string;\n /** The description of the trigger. */\n description?: string;\n /**\n * The current state of the trigger.\n *\n * Possible values: \"Active\", \"Paused\", \"Completed\", \"Disabled\"\n */\n state?: TriggerState;\n kind: TriggerType;\n}\n\n/** State details of the trigger. */\nexport interface StateDetails {\n /** The error message if the trigger is in disabled state. */\n message?: string;\n}\n\n/** ScheduleTestsTrigger model. */\nexport interface ScheduleTestsTrigger extends TriggerParent {\n /** The type of the trigger is ScheduleTestsTrigger. */\n kind: \"ScheduleTestsTrigger\";\n /** The test id of test to be triggered by this schedule trigger. Currently only one test is supported for a trigger. */\n testIds: string[];\n /** Start date time of the trigger in UTC timezone. (RFC 3339 literal format) */\n startDateTime?: Date | string;\n /** Recurrence details of the trigger. Null if schedule is not recurring. */\n recurrence?: Recurrence;\n}\n\n/** Actual state of the recurrence for the trigger. */\nexport interface RecurrenceStatus {\n /** The number of occurrences remaining for the trigger. Null if recurrence end has end date instead of number of occurrences. */\n remainingOccurrences?: number;\n /** The next three execution times of the trigger. (RFC 3339 literal format) */\n nextScheduledDateTimes?: Date[] | string[];\n}\n\n/** Recurrence model. */\nexport interface RecurrenceParent {\n /** Recurrence end model. You can specify the end either by providing a numberOfOccurrences (which will end the recurrence after the specified number of occurrences) or by providing an endDateTime (which will end the recurrence after the specified date). If neither value is provided, the recurrence will continue until it is manually ended. However, if both values are provided, an error will be thrown. */\n recurrenceEnd?: RecurrenceEnd;\n frequency: Frequency;\n}\n\n/** Recurrence end model. Either provide numberOfOccurrences if you want recurrence to end after a specified number of occurrences or provide endDate if you want recurrence to end after a specified end date. If both values are provided, a validation error will be thrown indicating that only one field should be provided. If neither value is provided, the recurrence will end when manually ended. */\nexport interface RecurrenceEnd {\n /** Number of occurrences after which the recurrence will end. */\n numberOfOccurrences?: number;\n /** The date after which the recurrence will end. (RFC 3339 literal format) */\n endDateTime?: Date | string;\n}\n\n/** Recurrence model when frequency is set as Daily. */\nexport interface DailyRecurrence extends RecurrenceParent {\n /** Frequency of the day recurrence. */\n frequency: \"Daily\";\n /** The interval at which the recurrence should repeat. It signifies the number of days between each recurrence. */\n interval: number;\n}\n\n/** Recurrence model when frequency is set as Hourly. */\nexport interface HourlyRecurrence extends RecurrenceParent {\n /** Frequency of the hour recurrence. */\n frequency: \"Hourly\";\n /** The interval at which the recurrence should repeat. It signifies the number of hours between each recurrence. */\n interval: number;\n}\n\n/** Recurrence model when frequency is set as MonthlyByDays . */\nexport interface MonthlyRecurrenceByWeekDays extends RecurrenceParent {\n /** Frequency of the month recurrence. */\n frequency: \"MonthlyByDays\";\n /** Specific days of the week when the recurrence should repeat. */\n weekDaysInMonth?: WeekDays[];\n /** Index of the week in a month at which the recurrence should repeat. For example, if the index is '2', weekDay is 'Monday', interval is 3 and frequency is 'Month', the recurrence will run every second Monday of the month and repeat every 3 months. Value of index can be 1 to 5. */\n index: number;\n /** The interval at which the recurrence should repeat. It signifies the number of months between each recurrence. */\n interval: number;\n}\n\n/** Recurrence model when frequency is set as MonthlyByDates. */\nexport interface MonthlyRecurrenceByDates extends RecurrenceParent {\n /** Frequency of the month recurrence. */\n frequency: \"MonthlyByDates\";\n /** Recurrence set to repeat on the specified dates of the month. Value of dates can be 1 to 31 and -1. -1 represents the last day of the month. */\n datesInMonth?: number[];\n /** The interval at which the recurrence should repeat. It signifies the number of months between each recurrence. */\n interval?: number;\n}\n\n/** Recurrence is set based on cron expression. */\nexport interface RecurrenceWithCron extends RecurrenceParent {\n /** Specify frequency using a cron expression. */\n frequency: \"Cron\";\n /** Cron expression for the recurrence. */\n cronExpression: string;\n}\n\n/** Recurrence model when frequency is set as weekly. */\nexport interface WeeklyRecurrence extends RecurrenceParent {\n /** Frequency of the week recurrence. */\n frequency: \"Weekly\";\n /** Recurrence set to repeat on the specified days of the week. */\n daysOfWeek?: WeekDays[];\n /** The interval at which the recurrence should repeat. It signifies the number of weeks between each recurrence. */\n interval?: number;\n}\n\n/** Notification rule model. */\nexport interface NotificationRuleParent {\n /** The name of the notification rule. */\n displayName: string;\n /** The action groups to notify. */\n actionGroupIds: string[];\n scope: NotificationScopeType;\n}\n\n/** Tests Notification rule model. */\nexport interface TestsNotificationRule extends NotificationRuleParent {\n /** Scope of type Tests. */\n scope: \"Tests\";\n /** The test ids to include. If not provided, notification will be sent for all testIds. */\n testIds?: string[];\n /**\n * The event to receive notifications for along with filtering conditions.\n * Key is a user-assigned identifier for the event filter.\n */\n eventFilters: Record<string, TestsNotificationEventFilter>;\n}\n\n/** The notification event filter for Tests scope. */\nexport interface TestsNotificationEventFilterParent {\n kind: NotificationEventType;\n}\n\n/** The notification event filter when the event type is TestRunEnded and scope is Tests. */\nexport interface TestRunEndedNotificationEventFilter extends TestsNotificationEventFilterParent {\n /** Event type for test run ended event. */\n kind: \"TestRunEnded\";\n /** Event filtering condition. */\n condition?: TestRunEndedEventCondition;\n}\n\n/** TestRunEnded Event condition. */\nexport interface TestRunEndedEventCondition {\n /** The test run statuses to send notification for. */\n testRunStatuses?: TestRunStatus[];\n /** The test run results to send notification for. */\n testRunResults?: PassFailTestResult[];\n}\n\n/** The notification event filter when the event type is TestRunStarted and scope is Tests. */\nexport interface TestRunStartedNotificationEventFilter extends TestsNotificationEventFilterParent {\n /** Event type for test run started event. */\n kind: \"TestRunStarted\";\n}\n\n/** The notification event filter when the event type is TriggerCompleted. */\nexport interface TriggerCompletedNotificationEventFilter extends TestsNotificationEventFilterParent {\n /** Event type for trigger ended event. */\n kind: \"TriggerCompleted\";\n}\n\n/** The notification event filter when the event type is TriggerDisabled. */\nexport interface TriggerDisabledNotificationEventFilter extends TestsNotificationEventFilterParent {\n /** Event type for trigger disabled event. */\n kind: \"TriggerDisabled\";\n}\n\n/** Load test run model */\nexport interface TestRun {\n /** Pass fail criteria for a test. */\n passFailCriteria?: PassFailCriteria;\n /** Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window. */\n autoStopCriteria?: AutoStopCriteria;\n /**\n * Secrets can be stored in an Azure Key Vault or any other secret store. If the\n * secret is stored in an Azure Key Vault, the value should be the secret\n * identifier and the type should be AKV_SECRET_URI. If the secret is stored\n * elsewhere, the secret value should be provided directly and the type should be\n * SECRET_VALUE.\n */\n secrets?: Record<string, Secret>;\n /** Certificates metadata */\n certificate?: CertificateMetadata;\n /** Environment variables which are defined as a set of <name,value> pairs. */\n environmentVariables?: Record<string, string>;\n /** Display name of a testRun. */\n displayName?: string;\n /** Associated test Id. */\n testId?: string;\n /** The test run description. */\n description?: string;\n /**\n * Request data collection level for test run\n *\n * Possible values: \"NONE\", \"ERRORS\"\n */\n requestDataLevel?: RequestDataLevel;\n /** Enable or disable debug level logging. True if debug logs are enabled for the test run. False otherwise */\n debugLogsEnabled?: boolean;\n /**\n * The type of the entity that created the test run. (E.x. User, ScheduleTrigger, etc).\n *\n * Possible values: \"User\", \"ScheduledTrigger\", \"AzurePipelines\", \"GitHubWorkflows\"\n */\n createdByType?: CreatedByType;\n}\n\n/** Error details if there is any failure in load test run */\nexport interface ErrorDetails {}\n\n/** Test run statistics. */\nexport interface TestRunStatistics {}\n\n/** Collection of test run artifacts */\nexport interface TestRunArtifacts {\n /** The output artifacts for the test run. */\n outputArtifacts?: TestRunOutputArtifacts;\n}\n\n/** The input artifacts for the test run. */\nexport interface TestRunInputArtifacts {\n /** The load test YAML file that contains the the test configuration */\n configFileInfo?: TestRunFileInfo;\n /** The test script file for the test run */\n testScriptFileInfo?: TestRunFileInfo;\n /** The user properties file */\n userPropFileInfo?: TestRunFileInfo;\n /** The zip file for all input artifacts */\n inputArtifactsZipFileInfo?: TestRunFileInfo;\n /** The config json file for url based test */\n urlTestConfigFileInfo?: TestRunFileInfo;\n}\n\n/** Test run file info. */\nexport interface TestRunFileInfo {\n /** Name of the file. */\n fileName: string;\n}\n\n/** The output artifacts for the test run. */\nexport interface TestRunOutputArtifacts {\n /** The test run results file */\n resultFileInfo?: TestRunFileInfo;\n /** The test run report with metrics */\n logsFileInfo?: TestRunFileInfo;\n /** The container for test run artifacts. */\n artifactsContainerInfo?: ArtifactsContainerInfo;\n /** The report file for the test run. */\n reportFileInfo?: TestRunFileInfo;\n}\n\n/** Artifacts container info. */\nexport interface ArtifactsContainerInfo {\n /** This is a SAS URI to an Azure Storage Container that contains the test run artifacts. */\n url?: string;\n /** Expiry time of the container (RFC 3339 literal format) */\n expireDateTime?: Date | string;\n}\n\n/** Represents insights for the test run. */\nexport interface TestRunInsights {\n /** The rows of the insights. */\n rows?: Record<string, Record<string, string>>;\n}\n\n/** Represents a column of the test run insight */\nexport interface TestRunInsightColumn {\n /** Name of the column. */\n name: string;\n /** The data type of the column. */\n dataType: string;\n}\n\n/** Filters to fetch the set of metric. */\nexport interface MetricRequestPayload {\n /**\n * Get metrics for specific dimension values. Example: Metric contains dimension\n * like SamplerName, Error. To retrieve all the time series data where SamplerName\n * is equals to HTTPRequest1 or HTTPRequest2, the DimensionFilter value will be\n * {\"SamplerName\", [\"HTTPRequest1\", \"HTTPRequest2\"}\n */\n filters?: Array<DimensionFilter>;\n}\n\n/** Dimension name and values to filter */\nexport interface DimensionFilter {\n /** The dimension name */\n name?: string;\n /** The dimension values. Maximum values can be 20. */\n values?: string[];\n}\n\n/** Test run app component */\nexport interface TestRunAppComponents {\n /**\n * Azure resource collection { resource id (fully qualified resource Id e.g\n * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName})\n * : resource object }\n */\n components: Record<string, AppComponent>;\n}\n\n/** Test run server metrics configuration */\nexport interface TestRunServerMetricsConfiguration {\n /**\n * Azure resource metrics collection {metric id : metrics object} (Refer :\n * https://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition\n * for metric id).\n */\n metrics?: Record<string, ResourceMetric>;\n}\n\n/** The Test Profile Run Model. Test Profile Run resource enables you to instantiate an already created test profile and run load tests to get recommendations on the optimal configuration for the target resource. */\nexport interface TestProfileRun {\n /** Display name for the test profile run. */\n displayName?: string;\n /** The test profile run description */\n description?: string;\n /** Associated test profile ID for the test profile run. This is required to create a test profile run and can't be updated. */\n testProfileId?: string;\n}\n\n/** Details of a particular test run for a test profile run. */\nexport interface TestRunDetail {\n /**\n * Status of the test run.\n *\n * Possible values: \"ACCEPTED\", \"NOTSTARTED\", \"PROVISIONING\", \"PROVISIONED\", \"CONFIGURING\", \"CONFIGURED\", \"EXECUTING\", \"EXECUTED\", \"DEPROVISIONING\", \"DEPROVISIONED\", \"DONE\", \"CANCELLING\", \"CANCELLED\", \"FAILED\", \"VALIDATION_SUCCESS\", \"VALIDATION_FAILURE\"\n */\n status: TestRunStatus;\n /** ID of the configuration on which the test ran. */\n configurationId: string;\n /** Key value pair of extra properties associated with the test run. */\n properties: Record<string, string>;\n}\n\n/** A recommendation object that provides a list of configuration that optimizes its category. */\nexport interface TestProfileRunRecommendation {\n /**\n * Category of the recommendation.\n *\n * Possible values: \"ThroughputOptimized\", \"CostOptimized\"\n */\n category: RecommendationCategory;\n /** List of configurations IDs for which the recommendation is applicable. These are a subset of the provided target resource configurations. */\n configurations?: string[];\n}\n\n/** Configurations of a target resource. This varies with the kind of resource. */\nexport type TargetResourceConfigurations =\n | TargetResourceConfigurationsParent\n | FunctionFlexConsumptionTargetResourceConfigurations;\n/** Trigger model. */\nexport type Trigger = TriggerParent | ScheduleTestsTrigger;\n/** Recurrence model. */\nexport type Recurrence =\n | RecurrenceParent\n | DailyRecurrence\n | HourlyRecurrence\n | MonthlyRecurrenceByWeekDays\n | MonthlyRecurrenceByDates\n | RecurrenceWithCron\n | WeeklyRecurrence;\n/** Notification rule model. */\nexport type NotificationRule = NotificationRuleParent | TestsNotificationRule;\n/** The notification event filter for Tests scope. */\nexport type TestsNotificationEventFilter =\n | TestsNotificationEventFilterParent\n | TestRunEndedNotificationEventFilter\n | TestRunStartedNotificationEventFilter\n | TriggerCompletedNotificationEventFilter\n | TriggerDisabledNotificationEventFilter;\n/** Alias for OperationState */\nexport type OperationState = string;\n/** Alias for PFMetrics */\nexport type PFMetrics = string;\n/** Alias for PassFailAggregationFunction */\nexport type PassFailAggregationFunction = string;\n/** Alias for PassFailAction */\nexport type PassFailAction = string;\n/** Alias for PassFailResult */\nexport type PassFailResult = string;\n/** Alias for SecretType */\nexport type SecretType = string;\n/** Alias for CertificateType */\nexport type CertificateType = string;\n/** Alias for FileType */\nexport type FileType = string;\n/** Alias for FileValidationStatus */\nexport type FileValidationStatus = string;\n/** Alias for TestKind */\nexport type TestKind = string;\n/** Alias for ManagedIdentityType */\nexport type ManagedIdentityType = string;\n/** Alias for ResourceKind */\nexport type ResourceKind = string;\n/** Alias for TriggerType */\nexport type TriggerType = string;\n/** Alias for TriggerState */\nexport type TriggerState = string;\n/** Alias for Frequency */\nexport type Frequency = string;\n/** Alias for WeekDays */\nexport type WeekDays = string;\n/** Alias for NotificationScopeType */\nexport type NotificationScopeType = string;\n/** Alias for NotificationEventType */\nexport type NotificationEventType = string;\n/** Alias for TestRunStatus */\nexport type TestRunStatus = string;\n/** Alias for PassFailTestResult */\nexport type PassFailTestResult = string;\n/** Alias for RequestDataLevel */\nexport type RequestDataLevel = string;\n/** Alias for CreatedByType */\nexport type CreatedByType = string;\n/** Alias for TimeGrain */\nexport type TimeGrain = string;\n/** Alias for TestProfileRunStatus */\nexport type TestProfileRunStatus = string;\n/** Alias for RecommendationCategory */\nexport type RecommendationCategory = string;\n\n/** Added Poller Types **/\n\n/**\n * Poller for File Upload and Validation\n */\nexport type FileUploadAndValidatePoller = SimplePollerLike<\n PollerOperationState<LoadTestAdministrationGetTestFile200Response>,\n LoadTestAdministrationGetTestFile200Response\n>;\n\n/**\n * Poller for Test Run Completion\n */\nexport type TestRunCompletionPoller = SimplePollerLike<\n PollerOperationState<LoadTestRunGetTestRun200Response>,\n LoadTestRunGetTestRun200Response\n>;\n\n/**\n * Poller for Test Profile Run Completion\n */\nexport type TestProfileRunCompletionPoller = SimplePollerLike<\n PollerOperationState<TestProfileRunAdministrationGetTestProfileRun200Response>,\n TestProfileRunAdministrationGetTestProfileRun200Response\n>;\n\nexport type TestRunCreateOrUpdateSuccessResponse =\n | LoadTestRunCreateOrUpdateTestRun200Response\n | LoadTestRunCreateOrUpdateTestRun201Response;\n\nexport type TestProfileRunCreateOrUpdateSuccessResponse =\n | TestProfileRunAdministrationCreateOrUpdateTestProfileRun200Response\n | TestProfileRunAdministrationCreateOrUpdateTestProfileRun201Response;\n\nexport type TestUploadFileSuccessResponse = LoadTestAdministrationUploadTestFile201Response;\n\nexport interface PolledOperationOptions {\n /**\n * Time delay between poll requests, in milliseconds.\n */\n updateIntervalInMs?: number;\n}\n"]}