@azure-rest/load-testing 1.0.1 → 1.1.0-alpha.20250324.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 (208) hide show
  1. package/LICENSE +4 -4
  2. package/README.md +91 -107
  3. package/dist/browser/azureLoadTesting.d.ts +10 -4
  4. package/dist/browser/azureLoadTesting.d.ts.map +1 -1
  5. package/dist/browser/azureLoadTesting.js +28 -11
  6. package/dist/browser/azureLoadTesting.js.map +1 -1
  7. package/dist/browser/clientDefinitions.d.ts +164 -84
  8. package/dist/browser/clientDefinitions.d.ts.map +1 -1
  9. package/dist/browser/clientDefinitions.js.map +1 -1
  10. package/dist/browser/getFileValidationPoller.d.ts +2 -2
  11. package/dist/browser/getFileValidationPoller.d.ts.map +1 -1
  12. package/dist/browser/getFileValidationPoller.js.map +1 -1
  13. package/dist/browser/getTestProfileRunCompletionPoller.d.ts +11 -0
  14. package/dist/browser/getTestProfileRunCompletionPoller.d.ts.map +1 -0
  15. package/dist/browser/getTestProfileRunCompletionPoller.js +127 -0
  16. package/dist/browser/getTestProfileRunCompletionPoller.js.map +1 -0
  17. package/dist/browser/getTestRunCompletionPoller.d.ts +2 -2
  18. package/dist/browser/getTestRunCompletionPoller.d.ts.map +1 -1
  19. package/dist/browser/getTestRunCompletionPoller.js.map +1 -1
  20. package/dist/browser/index.d.ts.map +1 -1
  21. package/dist/browser/index.js.map +1 -1
  22. package/dist/browser/isUnexpected.d.ts +44 -27
  23. package/dist/browser/isUnexpected.d.ts.map +1 -1
  24. package/dist/browser/isUnexpected.js +52 -32
  25. package/dist/browser/isUnexpected.js.map +1 -1
  26. package/dist/browser/logger.d.ts +2 -0
  27. package/dist/browser/logger.d.ts.map +1 -0
  28. package/dist/browser/logger.js +5 -0
  29. package/dist/browser/logger.js.map +1 -0
  30. package/dist/browser/models.d.ts +545 -220
  31. package/dist/browser/models.d.ts.map +1 -1
  32. package/dist/browser/models.js.map +1 -1
  33. package/dist/browser/outputModels.d.ts +844 -207
  34. package/dist/browser/outputModels.d.ts.map +1 -1
  35. package/dist/browser/outputModels.js.map +1 -1
  36. package/dist/browser/paginateHelper.d.ts +27 -2
  37. package/dist/browser/paginateHelper.d.ts.map +1 -1
  38. package/dist/browser/paginateHelper.js +98 -1
  39. package/dist/browser/paginateHelper.js.map +1 -1
  40. package/dist/browser/parameters.d.ts +327 -123
  41. package/dist/browser/parameters.d.ts.map +1 -1
  42. package/dist/browser/parameters.js.map +1 -1
  43. package/dist/browser/pollingHelper.d.ts +2 -1
  44. package/dist/browser/pollingHelper.d.ts.map +1 -1
  45. package/dist/browser/pollingHelper.js +7 -0
  46. package/dist/browser/pollingHelper.js.map +1 -1
  47. package/dist/browser/responses.d.ts +464 -239
  48. package/dist/browser/responses.d.ts.map +1 -1
  49. package/dist/browser/responses.js.map +1 -1
  50. package/dist/browser/util/LROUtil.d.ts +2 -1
  51. package/dist/browser/util/LROUtil.d.ts.map +1 -1
  52. package/dist/browser/util/LROUtil.js +13 -0
  53. package/dist/browser/util/LROUtil.js.map +1 -1
  54. package/dist/commonjs/azureLoadTesting.d.ts +10 -4
  55. package/dist/commonjs/azureLoadTesting.d.ts.map +1 -1
  56. package/dist/commonjs/azureLoadTesting.js +28 -11
  57. package/dist/commonjs/azureLoadTesting.js.map +1 -1
  58. package/dist/commonjs/clientDefinitions.d.ts +164 -84
  59. package/dist/commonjs/clientDefinitions.d.ts.map +1 -1
  60. package/dist/commonjs/clientDefinitions.js.map +1 -1
  61. package/dist/commonjs/getFileValidationPoller.d.ts +2 -2
  62. package/dist/commonjs/getFileValidationPoller.d.ts.map +1 -1
  63. package/dist/commonjs/getFileValidationPoller.js.map +1 -1
  64. package/dist/commonjs/getTestProfileRunCompletionPoller.d.ts +11 -0
  65. package/dist/commonjs/getTestProfileRunCompletionPoller.d.ts.map +1 -0
  66. package/dist/commonjs/getTestProfileRunCompletionPoller.js +130 -0
  67. package/dist/commonjs/getTestProfileRunCompletionPoller.js.map +1 -0
  68. package/dist/commonjs/getTestRunCompletionPoller.d.ts +2 -2
  69. package/dist/commonjs/getTestRunCompletionPoller.d.ts.map +1 -1
  70. package/dist/commonjs/getTestRunCompletionPoller.js.map +1 -1
  71. package/dist/commonjs/index.d.ts.map +1 -1
  72. package/dist/commonjs/index.js.map +1 -1
  73. package/dist/commonjs/isUnexpected.d.ts +44 -27
  74. package/dist/commonjs/isUnexpected.d.ts.map +1 -1
  75. package/dist/commonjs/isUnexpected.js +52 -32
  76. package/dist/commonjs/isUnexpected.js.map +1 -1
  77. package/dist/commonjs/logger.d.ts +2 -0
  78. package/dist/commonjs/logger.d.ts.map +1 -0
  79. package/dist/commonjs/logger.js +8 -0
  80. package/dist/commonjs/logger.js.map +1 -0
  81. package/dist/commonjs/models.d.ts +545 -220
  82. package/dist/commonjs/models.d.ts.map +1 -1
  83. package/dist/commonjs/models.js.map +1 -1
  84. package/dist/commonjs/outputModels.d.ts +844 -207
  85. package/dist/commonjs/outputModels.d.ts.map +1 -1
  86. package/dist/commonjs/outputModels.js.map +1 -1
  87. package/dist/commonjs/paginateHelper.d.ts +27 -2
  88. package/dist/commonjs/paginateHelper.d.ts.map +1 -1
  89. package/dist/commonjs/paginateHelper.js +99 -2
  90. package/dist/commonjs/paginateHelper.js.map +1 -1
  91. package/dist/commonjs/parameters.d.ts +327 -123
  92. package/dist/commonjs/parameters.d.ts.map +1 -1
  93. package/dist/commonjs/parameters.js.map +1 -1
  94. package/dist/commonjs/pollingHelper.d.ts +2 -1
  95. package/dist/commonjs/pollingHelper.d.ts.map +1 -1
  96. package/dist/commonjs/pollingHelper.js +7 -0
  97. package/dist/commonjs/pollingHelper.js.map +1 -1
  98. package/dist/commonjs/responses.d.ts +464 -239
  99. package/dist/commonjs/responses.d.ts.map +1 -1
  100. package/dist/commonjs/responses.js.map +1 -1
  101. package/dist/commonjs/tsdoc-metadata.json +1 -1
  102. package/dist/commonjs/util/LROUtil.d.ts +2 -1
  103. package/dist/commonjs/util/LROUtil.d.ts.map +1 -1
  104. package/dist/commonjs/util/LROUtil.js +14 -0
  105. package/dist/commonjs/util/LROUtil.js.map +1 -1
  106. package/dist/esm/azureLoadTesting.d.ts +10 -4
  107. package/dist/esm/azureLoadTesting.d.ts.map +1 -1
  108. package/dist/esm/azureLoadTesting.js +28 -11
  109. package/dist/esm/azureLoadTesting.js.map +1 -1
  110. package/dist/esm/clientDefinitions.d.ts +164 -84
  111. package/dist/esm/clientDefinitions.d.ts.map +1 -1
  112. package/dist/esm/clientDefinitions.js.map +1 -1
  113. package/dist/esm/getFileValidationPoller.d.ts +2 -2
  114. package/dist/esm/getFileValidationPoller.d.ts.map +1 -1
  115. package/dist/esm/getFileValidationPoller.js.map +1 -1
  116. package/dist/esm/getTestProfileRunCompletionPoller.d.ts +11 -0
  117. package/dist/esm/getTestProfileRunCompletionPoller.d.ts.map +1 -0
  118. package/dist/esm/getTestProfileRunCompletionPoller.js +127 -0
  119. package/dist/esm/getTestProfileRunCompletionPoller.js.map +1 -0
  120. package/dist/esm/getTestRunCompletionPoller.d.ts +2 -2
  121. package/dist/esm/getTestRunCompletionPoller.d.ts.map +1 -1
  122. package/dist/esm/getTestRunCompletionPoller.js.map +1 -1
  123. package/dist/esm/index.d.ts.map +1 -1
  124. package/dist/esm/index.js.map +1 -1
  125. package/dist/esm/isUnexpected.d.ts +44 -27
  126. package/dist/esm/isUnexpected.d.ts.map +1 -1
  127. package/dist/esm/isUnexpected.js +52 -32
  128. package/dist/esm/isUnexpected.js.map +1 -1
  129. package/dist/esm/logger.d.ts +2 -0
  130. package/dist/esm/logger.d.ts.map +1 -0
  131. package/dist/esm/logger.js +5 -0
  132. package/dist/esm/logger.js.map +1 -0
  133. package/dist/esm/models.d.ts +545 -220
  134. package/dist/esm/models.d.ts.map +1 -1
  135. package/dist/esm/models.js.map +1 -1
  136. package/dist/esm/outputModels.d.ts +844 -207
  137. package/dist/esm/outputModels.d.ts.map +1 -1
  138. package/dist/esm/outputModels.js.map +1 -1
  139. package/dist/esm/paginateHelper.d.ts +27 -2
  140. package/dist/esm/paginateHelper.d.ts.map +1 -1
  141. package/dist/esm/paginateHelper.js +98 -1
  142. package/dist/esm/paginateHelper.js.map +1 -1
  143. package/dist/esm/parameters.d.ts +327 -123
  144. package/dist/esm/parameters.d.ts.map +1 -1
  145. package/dist/esm/parameters.js.map +1 -1
  146. package/dist/esm/pollingHelper.d.ts +2 -1
  147. package/dist/esm/pollingHelper.d.ts.map +1 -1
  148. package/dist/esm/pollingHelper.js +7 -0
  149. package/dist/esm/pollingHelper.js.map +1 -1
  150. package/dist/esm/responses.d.ts +464 -239
  151. package/dist/esm/responses.d.ts.map +1 -1
  152. package/dist/esm/responses.js.map +1 -1
  153. package/dist/esm/util/LROUtil.d.ts +2 -1
  154. package/dist/esm/util/LROUtil.d.ts.map +1 -1
  155. package/dist/esm/util/LROUtil.js +13 -0
  156. package/dist/esm/util/LROUtil.js.map +1 -1
  157. package/dist/react-native/azureLoadTesting.d.ts +10 -4
  158. package/dist/react-native/azureLoadTesting.d.ts.map +1 -1
  159. package/dist/react-native/azureLoadTesting.js +28 -11
  160. package/dist/react-native/azureLoadTesting.js.map +1 -1
  161. package/dist/react-native/clientDefinitions.d.ts +164 -84
  162. package/dist/react-native/clientDefinitions.d.ts.map +1 -1
  163. package/dist/react-native/clientDefinitions.js.map +1 -1
  164. package/dist/react-native/getFileValidationPoller.d.ts +2 -2
  165. package/dist/react-native/getFileValidationPoller.d.ts.map +1 -1
  166. package/dist/react-native/getFileValidationPoller.js.map +1 -1
  167. package/dist/react-native/getTestProfileRunCompletionPoller.d.ts +11 -0
  168. package/dist/react-native/getTestProfileRunCompletionPoller.d.ts.map +1 -0
  169. package/dist/react-native/getTestProfileRunCompletionPoller.js +127 -0
  170. package/dist/react-native/getTestProfileRunCompletionPoller.js.map +1 -0
  171. package/dist/react-native/getTestRunCompletionPoller.d.ts +2 -2
  172. package/dist/react-native/getTestRunCompletionPoller.d.ts.map +1 -1
  173. package/dist/react-native/getTestRunCompletionPoller.js.map +1 -1
  174. package/dist/react-native/index.d.ts.map +1 -1
  175. package/dist/react-native/index.js.map +1 -1
  176. package/dist/react-native/isUnexpected.d.ts +44 -27
  177. package/dist/react-native/isUnexpected.d.ts.map +1 -1
  178. package/dist/react-native/isUnexpected.js +52 -32
  179. package/dist/react-native/isUnexpected.js.map +1 -1
  180. package/dist/react-native/logger.d.ts +2 -0
  181. package/dist/react-native/logger.d.ts.map +1 -0
  182. package/dist/react-native/logger.js +5 -0
  183. package/dist/react-native/logger.js.map +1 -0
  184. package/dist/react-native/models.d.ts +545 -220
  185. package/dist/react-native/models.d.ts.map +1 -1
  186. package/dist/react-native/models.js.map +1 -1
  187. package/dist/react-native/outputModels.d.ts +844 -207
  188. package/dist/react-native/outputModels.d.ts.map +1 -1
  189. package/dist/react-native/outputModels.js.map +1 -1
  190. package/dist/react-native/paginateHelper.d.ts +27 -2
  191. package/dist/react-native/paginateHelper.d.ts.map +1 -1
  192. package/dist/react-native/paginateHelper.js +98 -1
  193. package/dist/react-native/paginateHelper.js.map +1 -1
  194. package/dist/react-native/parameters.d.ts +327 -123
  195. package/dist/react-native/parameters.d.ts.map +1 -1
  196. package/dist/react-native/parameters.js.map +1 -1
  197. package/dist/react-native/pollingHelper.d.ts +2 -1
  198. package/dist/react-native/pollingHelper.d.ts.map +1 -1
  199. package/dist/react-native/pollingHelper.js +7 -0
  200. package/dist/react-native/pollingHelper.js.map +1 -1
  201. package/dist/react-native/responses.d.ts +464 -239
  202. package/dist/react-native/responses.d.ts.map +1 -1
  203. package/dist/react-native/responses.js.map +1 -1
  204. package/dist/react-native/util/LROUtil.d.ts +2 -1
  205. package/dist/react-native/util/LROUtil.d.ts.map +1 -1
  206. package/dist/react-native/util/LROUtil.js +13 -0
  207. package/dist/react-native/util/LROUtil.js.map +1 -1
  208. package/package.json +23 -21
@@ -1,181 +1,256 @@
1
1
  import type { OperationState, SimplePollerLike } from "@azure/core-lro";
2
- import type { TestGetFile200Response, TestRunCreateOrUpdate200Response, TestRunCreateOrUpdate201Response, TestRunGet200Response, TestUploadFile201Response } from "./responses.js";
3
- /** Load test model */
2
+ import type { LoadTestAdministrationGetTestFile200Response, LoadTestAdministrationUploadTestFile201Response, LoadTestRunCreateOrUpdateTestRun200Response, LoadTestRunCreateOrUpdateTestRun201Response, LoadTestRunGetTestRun200Response, TestProfileRunAdministrationCreateOrUpdateTestProfileRun200Response, TestProfileRunAdministrationCreateOrUpdateTestProfileRun201Response, TestProfileRunAdministrationGetTestProfileRun200Response } from "./responses.js";
3
+ /** Load test model. */
4
4
  export interface Test {
5
5
  /** Pass fail criteria for a test. */
6
6
  passFailCriteria?: PassFailCriteria;
7
- /** Secrets can be stored in an Azure Key Vault or any other secret store. If the secret is stored in an Azure Key Vault, the value should be the secret identifier and the type should be AKV_SECRET_URI. If the secret is stored elsewhere, the secret value should be provided directly and the type should be SECRET_VALUE. */
7
+ /** Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window. */
8
+ autoStopCriteria?: AutoStopCriteria;
9
+ /**
10
+ * Secrets can be stored in an Azure Key Vault or any other secret store. If the
11
+ * secret is stored in an Azure Key Vault, the value should be the secret
12
+ * identifier and the type should be AKV_SECRET_URI. If the secret is stored
13
+ * elsewhere, the secret value should be provided directly and the type should be
14
+ * SECRET_VALUE.
15
+ */
8
16
  secrets?: Record<string, Secret>;
9
- /** Certificates metadata */
17
+ /** Certificates metadata. */
10
18
  certificate?: CertificateMetadata;
11
19
  /** Environment variables which are defined as a set of <name,value> pairs. */
12
20
  environmentVariables?: Record<string, string>;
13
21
  /** The load test configuration. */
14
22
  loadTestConfiguration?: LoadTestConfiguration;
15
- /** The input artifacts for the test. */
16
- inputArtifacts?: TestInputArtifacts;
17
- /** Unique test name as identifier. */
18
- testId?: string;
23
+ /** Id of the test run to be marked as baseline to view trends of client-side metrics from recent test runs */
24
+ baselineTestRunId?: string;
19
25
  /** The test description. */
20
26
  description?: string;
21
27
  /** Display name of a test. */
22
28
  displayName?: string;
23
29
  /** Subnet ID on which the load test instances should run. */
24
30
  subnetId?: string;
31
+ /**
32
+ * Kind of test.
33
+ *
34
+ * Possible values: "URL", "JMX", "Locust"
35
+ */
36
+ kind?: TestKind;
37
+ /** Inject load test engines without deploying public IP for outbound access */
38
+ publicIPDisabled?: boolean;
25
39
  /** Type of the managed identity referencing the Key vault. */
26
40
  keyvaultReferenceIdentityType?: string;
27
41
  /** Resource Id of the managed identity referencing the Key vault. */
28
42
  keyvaultReferenceIdentityId?: string;
29
- /** The creation datetime(ISO 8601 literal format). */
30
- createdDateTime?: Date | string;
31
- /** The user that created. */
32
- createdBy?: string;
33
- /** The last Modified datetime(ISO 8601 literal format). */
34
- lastModifiedDateTime?: Date | string;
35
- /** The user that last modified. */
36
- lastModifiedBy?: string;
43
+ /**
44
+ * Type of the managed identity referencing the metrics.
45
+ *
46
+ * Possible values: "SystemAssigned", "UserAssigned"
47
+ */
48
+ metricsReferenceIdentityType?: ManagedIdentityType;
49
+ /** Resource Id of the managed identity referencing the metrics. */
50
+ metricsReferenceIdentityId?: string;
51
+ /**
52
+ * Type of the managed identity built in load test engines
53
+ *
54
+ * Possible values: "SystemAssigned", "UserAssigned"
55
+ */
56
+ engineBuiltInIdentityType?: ManagedIdentityType;
57
+ /** Resource Ids of the managed identity built in to load test engines. Required if engineBuiltInIdentityType is UserAssigned. */
58
+ engineBuiltInIdentityIds?: string[];
37
59
  }
38
60
  /** Pass fail criteria for a test. */
39
61
  export interface PassFailCriteria {
40
62
  /** Map of id and pass fail metrics { id : pass fail metrics }. */
41
63
  passFailMetrics?: Record<string, PassFailMetric>;
64
+ /** Map of id and pass fail server metrics { id : pass fail metrics }. */
65
+ passFailServerMetrics?: Record<string, PassFailServerMetric>;
42
66
  }
43
67
  /** Pass fail metric */
44
68
  export interface PassFailMetric {
45
- /** The client metric on which the criteria should be applied. */
46
- clientMetric?: "response_time_ms" | "latency" | "error" | "requests" | "requests_per_sec";
47
- /** The aggregation function to be applied on the client metric. Allowed functions - ‘percentage’ - for error metric , ‘avg’, ‘p50’, ‘p90’, ‘p95’, ‘p99’, ‘min’, ‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec, ‘count’ - for requests */
48
- aggregate?: "count" | "percentage" | "avg" | "p50" | "p90" | "p95" | "p99" | "min" | "max";
69
+ /**
70
+ * The client metric on which the criteria should be applied.
71
+ *
72
+ * Possible values: "response_time_ms", "latency", "error", "requests", "requests_per_sec"
73
+ */
74
+ clientMetric?: PFMetrics;
75
+ /**
76
+ * The aggregation function to be applied on the client metric. Allowed functions
77
+ * - ‘percentage’ - for error metric , ‘avg’, percentiles like ‘p50’, ‘p90’, & so on, ‘min’,
78
+ * ‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec,
79
+ * ‘count’ - for requests
80
+ *
81
+ * Possible values: "count", "percentage", "avg", "p50", "p75", "p90", "p95", "p96", "p97", "p98", "p99", "p99.9", "p99.99", "min", "max"
82
+ */
83
+ aggregate?: PassFailAggregationFunction;
49
84
  /** The comparison operator. Supported types ‘>’, ‘<’ */
50
85
  condition?: string;
51
86
  /** Request name for which the Pass fail criteria has to be applied */
52
87
  requestName?: string;
53
- /** The value to compare with the client metric. Allowed values - ‘error : [0.0 , 100.0] unit- % ’, response_time_ms and latency : any integer value unit- ms. */
88
+ /**
89
+ * The value to compare with the client metric. Allowed values - ‘error : [0.0 ,
90
+ * 100.0] unit- % ’, response_time_ms and latency : any integer value unit- ms.
91
+ */
54
92
  value?: number;
55
- /** Action taken after the threshold is met. Default is ‘continue’. */
56
- action?: "stop" | "continue";
57
- /** The actual value of the client metric for the test run. */
58
- actualValue?: number;
59
- /** Outcome of the test run. */
60
- result?: "passed" | "undetermined" | "failed";
93
+ /**
94
+ * Action taken after the threshold is met. Default is ‘continue’.
95
+ *
96
+ * Possible values: "continue", "stop"
97
+ */
98
+ action?: PassFailAction;
99
+ }
100
+ /** Pass fail server metric */
101
+ export interface PassFailServerMetric {
102
+ /** The resource id of the resource emitting the metric. */
103
+ resourceId: string;
104
+ /** The server metric namespace. */
105
+ metricNamespace: string;
106
+ /** The server metric name. */
107
+ metricName: string;
108
+ /** Aggregation Type */
109
+ aggregation: string;
110
+ /** The comparison operator. Supported types ‘>’, ‘<’ */
111
+ condition: string;
112
+ /** The value to compare with the server metric. */
113
+ value: number;
114
+ /**
115
+ * Action taken after the threshold is met. Default is ‘continue’.
116
+ *
117
+ * Possible values: "continue", "stop"
118
+ */
119
+ action?: PassFailAction;
120
+ }
121
+ /** Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window. */
122
+ export interface AutoStopCriteria {
123
+ /** Whether auto-stop should be disabled. The default value is false. */
124
+ autoStopDisabled?: boolean;
125
+ /** Threshold percentage of errors on which test run should be automatically stopped. Allowed values are in range of 0.0-100.0 */
126
+ errorRate?: number;
127
+ /** Time window during which the error percentage should be evaluated in seconds. */
128
+ errorRateTimeWindowInSeconds?: number;
61
129
  }
62
130
  /** Secret */
63
131
  export interface Secret {
64
132
  /** The value of the secret for the respective type */
65
133
  value?: string;
66
- /** Type of secret */
67
- type?: "AKV_SECRET_URI" | "SECRET_VALUE";
134
+ /**
135
+ * Type of secret
136
+ *
137
+ * Possible values: "AKV_SECRET_URI", "SECRET_VALUE"
138
+ */
139
+ type?: SecretType;
68
140
  }
69
141
  /** Certificates metadata */
70
142
  export interface CertificateMetadata {
71
143
  /** The value of the certificate for respective type */
72
144
  value?: string;
73
- /** Type of certificate */
74
- type?: "AKV_CERT_URI";
145
+ /**
146
+ * Type of certificate
147
+ *
148
+ * Possible values: "AKV_CERT_URI"
149
+ */
150
+ type?: CertificateType;
75
151
  /** Name of the certificate. */
76
152
  name?: string;
77
153
  }
78
- /** The load test configuration. */
154
+ /** Configurations for the load test. */
79
155
  export interface LoadTestConfiguration {
80
- /** The number of engine instances to execute load test. Supported values are in range of 1-45. Required for creating a new test. */
156
+ /** The number of engine instances to execute load test. Supported values are in range of 1-400. Required for creating a new test. */
81
157
  engineInstances?: number;
82
- /** If false, Azure Load Testing copies and processes your input files unmodified across all test engine instances. If true, Azure Load Testing splits the CSV input data evenly across all engine instances. If you provide multiple CSV files, each file will be split evenly. */
158
+ /**
159
+ * If false, Azure Load Testing copies and processes your input files unmodified
160
+ * across all test engine instances. If true, Azure Load Testing splits the CSV
161
+ * input data evenly across all engine instances. If you provide multiple CSV
162
+ * files, each file will be split evenly.
163
+ */
83
164
  splitAllCSVs?: boolean;
84
- /** If true, optionalLoadTestConfig is required and JMX script for the load test is not required to upload. */
165
+ /**
166
+ * If true, optionalLoadTestConfig is required and JMX script for the load test is
167
+ * not required to upload.
168
+ */
85
169
  quickStartTest?: boolean;
86
- /** Optional load test config */
87
- optionalLoadTestConfig?: OptionalLoadTestConfig;
170
+ /** Configuration for quick load test */
171
+ optionalLoadTestConfig?: OptionalLoadTestConfiguration;
172
+ /** Region distribution configuration for the load test. */
173
+ regionalLoadTestConfig?: Array<RegionalConfiguration>;
88
174
  }
89
- /** Optional load test config */
90
- export interface OptionalLoadTestConfig {
91
- /** Test URL. Provide the complete HTTP URL. For example, http://contoso-app.azurewebsites.net/login */
175
+ /** Configuration for quick load test */
176
+ export interface OptionalLoadTestConfiguration {
177
+ /** Test URL. Provide the complete HTTP URL. For example, https://contoso-app.azurewebsites.net/login */
92
178
  endpointUrl?: string;
93
- /** No of concurrent virtual users */
179
+ /** 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. */
180
+ requestsPerSecond?: number;
181
+ /** Maximum response time in milliseconds of the API/endpoint. */
182
+ maxResponseTimeInMs?: number;
183
+ /** No of concurrent virtual users. */
94
184
  virtualUsers?: number;
95
- /** Ramp up time */
185
+ /** Ramp up time in seconds. */
96
186
  rampUpTime?: number;
97
- /** Test run duration */
187
+ /** Test run duration in seconds. */
98
188
  duration?: number;
99
189
  }
190
+ /** Region distribution configuration for the load test. */
191
+ export interface RegionalConfiguration {
192
+ /** The number of engine instances to execute load test in specified region. Supported values are in range of 1-400. */
193
+ engineInstances: number;
194
+ /**
195
+ * Azure region name.
196
+ * 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".
197
+ * 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.
198
+ */
199
+ region: string;
200
+ }
100
201
  /** The input artifacts for the test. */
101
202
  export interface TestInputArtifacts {
102
- /** File info */
103
- configFileInfo?: FileInfo;
104
- /** File info */
105
- testScriptFileInfo?: FileInfo;
106
- /** File info */
107
- userPropFileInfo?: FileInfo;
108
- /** File info */
109
- inputArtifactsZipFileInfo?: FileInfo;
110
- /** Additional supported files for the test run */
111
- additionalFileInfo?: Array<FileInfo>;
112
- }
113
- /** File info */
114
- export interface FileInfo {
115
- /** File URL. */
116
- url?: string;
203
+ /** The load test YAML file that contains the the test configuration */
204
+ configFileInfo?: TestFileInfo;
205
+ /** The test script file for the test run */
206
+ testScriptFileInfo?: TestFileInfo;
207
+ /** The user properties file */
208
+ userPropFileInfo?: TestFileInfo;
209
+ /** The zip file with all input artifacts */
210
+ inputArtifactsZipFileInfo?: TestFileInfo;
211
+ /** The config json file for url based test */
212
+ urlTestConfigFileInfo?: TestFileInfo;
213
+ }
214
+ /** Test file info. */
215
+ export interface TestFileInfo {
117
216
  /** Name of the file. */
118
- fileName?: string;
119
- /** File type */
120
- fileType?: "JMX_FILE" | "USER_PROPERTIES" | "ADDITIONAL_ARTIFACTS";
121
- /** Expiry time of the file (ISO 8601 literal format) */
122
- expireDateTime?: Date | string;
123
- /** Validation status of the file */
124
- validationStatus?: "NOT_VALIDATED" | "VALIDATION_SUCCESS" | "VALIDATION_FAILURE" | "VALIDATION_INITIATED" | "VALIDATION_NOT_REQUIRED";
125
- /** Validation failure error details */
126
- validationFailureDetails?: string;
217
+ fileName: string;
127
218
  }
128
- /** Test app component */
219
+ /** Test app components */
129
220
  export interface TestAppComponents {
130
- /** Azure resource collection { resource id (fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) : resource object } */
221
+ /**
222
+ * Azure resource collection { resource id (fully qualified resource Id e.g
223
+ * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName})
224
+ * : resource object }
225
+ */
131
226
  components: Record<string, AppComponent>;
132
- /** Test identifier */
133
- testId?: string;
134
- /** The creation datetime(ISO 8601 literal format). */
135
- createdDateTime?: Date | string;
136
- /** The user that created. */
137
- createdBy?: string;
138
- /** The last Modified datetime(ISO 8601 literal format). */
139
- lastModifiedDateTime?: Date | string;
140
- /** The user that last modified. */
141
- lastModifiedBy?: string;
142
- }
143
- /** An Azure resource object (Refer azure generic resource model : https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id#genericresource) */
227
+ }
228
+ /** An Azure resource object (Refer azure generic resource model :https://learn.microsoft.com/en-us/rest/api/resources/resources/get-by-id#genericresource) */
144
229
  export interface AppComponent {
145
- /** fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} */
146
- resourceId?: string;
147
230
  /** Azure resource name, required while creating the app component. */
148
- resourceName?: string;
231
+ resourceName: string;
149
232
  /** Azure resource type, required while creating the app component. */
150
- resourceType?: string;
233
+ resourceType: string;
151
234
  /** Azure resource display name */
152
235
  displayName?: string;
153
- /** Resource group name of the Azure resource */
154
- resourceGroup?: string;
155
- /** Subscription Id of the Azure resource */
156
- subscriptionId?: string;
157
236
  /** Kind of Azure resource type */
158
237
  kind?: string;
159
238
  }
160
239
  /** Test server metrics configuration */
161
- export interface TestServerMetricConfig {
162
- /** Test identifier */
163
- testId?: string;
164
- /** Azure resource metrics collection {metric id : metrics object} (Refer : https://docs.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition for metric id). */
165
- metrics?: Record<string, ResourceMetric>;
166
- /** The creation datetime(ISO 8601 literal format). */
167
- createdDateTime?: Date | string;
168
- /** The user that created. */
169
- createdBy?: string;
170
- /** The last Modified datetime(ISO 8601 literal format). */
171
- lastModifiedDateTime?: Date | string;
172
- /** The user that last modified. */
173
- lastModifiedBy?: string;
174
- }
175
- /** Associated metric definition for particular metrics of the azure resource ( Refer : https://docs.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition). */
240
+ export interface TestServerMetricsConfiguration {
241
+ /**
242
+ * Azure resource metrics collection {metric id : metrics object} (Refer :
243
+ * https://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition
244
+ * for metric id).
245
+ */
246
+ metrics: Record<string, ResourceMetric>;
247
+ }
248
+ /**
249
+ * Associated metric definition for particular metrics of the azure resource (
250
+ * Refer :
251
+ * https://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition).
252
+ */
176
253
  export interface ResourceMetric {
177
- /** Unique name for metric. */
178
- id?: string;
179
254
  /** Azure resource id. */
180
255
  resourceId: string;
181
256
  /** Metric name space. */
@@ -191,125 +266,134 @@ export interface ResourceMetric {
191
266
  /** Azure resource type. */
192
267
  resourceType: string;
193
268
  }
269
+ /** 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. */
270
+ export interface TestProfile {
271
+ /** Display name of the test profile. */
272
+ displayName?: string;
273
+ /** Description for the test profile. */
274
+ description?: string;
275
+ /** Associated test ID for the test profile. This property is required for creating a Test Profile and it's not allowed to be updated. */
276
+ testId?: string;
277
+ /** 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. */
278
+ targetResourceId?: string;
279
+ /** Configurations of the target resource on which testing would be done. */
280
+ targetResourceConfigurations?: TargetResourceConfigurations;
281
+ }
282
+ /** Configurations of a target resource. This varies with the kind of resource. */
283
+ export interface TargetResourceConfigurationsParent {
284
+ kind: ResourceKind;
285
+ }
286
+ /** Configurations for a Function App using Flex Consumption Plan. */
287
+ export interface FunctionFlexConsumptionTargetResourceConfigurations extends TargetResourceConfigurationsParent {
288
+ /**
289
+ * The kind value to use when providing configuration.
290
+ * This should typically be not changed from its value.
291
+ */
292
+ kind: "FunctionsFlexConsumption";
293
+ /** A map of configurations for a Function app using Flex Consumption Plan. */
294
+ configurations?: Record<string, FunctionFlexConsumptionResourceConfiguration>;
295
+ }
296
+ /** Resource configuration instance for a Flex Consumption based Azure Function App. */
297
+ export interface FunctionFlexConsumptionResourceConfiguration {
298
+ /** Memory size of the instance. Supported values are 2048, 4096. */
299
+ instanceMemoryMB: number;
300
+ /** HTTP Concurrency for the function app. */
301
+ httpConcurrency?: number;
302
+ }
194
303
  /** Load test run model */
195
304
  export interface TestRun {
196
305
  /** Pass fail criteria for a test. */
197
306
  passFailCriteria?: PassFailCriteria;
198
- /** Secrets can be stored in an Azure Key Vault or any other secret store. If the secret is stored in an Azure Key Vault, the value should be the secret identifier and the type should be AKV_SECRET_URI. If the secret is stored elsewhere, the secret value should be provided directly and the type should be SECRET_VALUE. */
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
+ */
199
316
  secrets?: Record<string, Secret>;
200
317
  /** Certificates metadata */
201
318
  certificate?: CertificateMetadata;
202
319
  /** Environment variables which are defined as a set of <name,value> pairs. */
203
320
  environmentVariables?: Record<string, string>;
204
- /** Error details if there is any failure in load test run */
205
- errorDetails?: Array<ErrorDetails>;
206
- /** Test run statistics. */
207
- testRunStatistics?: Record<string, TestRunStatistics>;
208
- /** The load test configuration. */
209
- loadTestConfiguration?: LoadTestConfiguration;
210
- /** Collection of test run artifacts */
211
- testArtifacts?: TestRunArtifacts;
212
- /** Test result for pass/Fail criteria used during the test run. */
213
- testResult?: "PASSED" | "NOT_APPLICABLE" | "FAILED";
214
- /** Number of virtual users, for which test has been run. */
215
- virtualUsers?: number;
216
- /** Unique test run name as identifier */
217
- testRunId?: string;
218
321
  /** Display name of a testRun. */
219
322
  displayName?: string;
220
323
  /** Associated test Id. */
221
324
  testId?: string;
222
325
  /** The test run description. */
223
326
  description?: string;
224
- /** The test run status. */
225
- status?: "ACCEPTED" | "NOTSTARTED" | "PROVISIONING" | "PROVISIONED" | "CONFIGURING" | "CONFIGURED" | "EXECUTING" | "EXECUTED" | "DEPROVISIONING" | "DEPROVISIONED" | "DONE" | "CANCELLING" | "CANCELLED" | "FAILED" | "VALIDATION_SUCCESS" | "VALIDATION_FAILURE";
226
- /** The test run start DateTime(ISO 8601 literal format). */
227
- startDateTime?: Date | string;
228
- /** The test run end DateTime(ISO 8601 literal format). */
229
- endDateTime?: Date | string;
230
- /** Test run initiated time. */
231
- executedDateTime?: Date | string;
232
- /** Portal url. */
233
- portalUrl?: string;
234
- /** Test run duration in milliseconds. */
235
- duration?: number;
236
- /** Subnet ID on which the load test instances should run. */
237
- subnetId?: string;
238
- /** The creation datetime(ISO 8601 literal format). */
239
- createdDateTime?: Date | string;
240
- /** The user that created. */
241
- createdBy?: string;
242
- /** The last Modified datetime(ISO 8601 literal format). */
243
- lastModifiedDateTime?: Date | string;
244
- /** The user that last modified. */
245
- lastModifiedBy?: 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;
246
341
  }
247
342
  /** Error details if there is any failure in load test run */
248
343
  export interface ErrorDetails {
249
- /** Error details in case test run was not successfully run. */
250
- message?: string;
251
344
  }
252
345
  /** Test run statistics. */
253
346
  export interface TestRunStatistics {
254
- /** Transaction name. */
255
- transaction?: string;
256
- /** Sampler count. */
257
- sampleCount?: number;
258
- /** Error count. */
259
- errorCount?: number;
260
- /** Error percentage. */
261
- errorPct?: number;
262
- /** Mean response time. */
263
- meanResTime?: number;
264
- /** Median response time. */
265
- medianResTime?: number;
266
- /** Max response time. */
267
- maxResTime?: number;
268
- /** Minimum response time. */
269
- minResTime?: number;
270
- /** 90 percentile response time. */
271
- pct1ResTime?: number;
272
- /** 95 percentile response time. */
273
- pct2ResTime?: number;
274
- /** 99 percentile response time. */
275
- pct3ResTime?: number;
276
- /** Throughput. */
277
- throughput?: number;
278
- /** Received network bytes. */
279
- receivedKBytesPerSec?: number;
280
- /** Send network bytes. */
281
- sentKBytesPerSec?: number;
282
347
  }
283
348
  /** Collection of test run artifacts */
284
349
  export interface TestRunArtifacts {
285
- /** The input artifacts for the test run. */
286
- inputArtifacts?: TestRunInputArtifacts;
287
350
  /** The output artifacts for the test run. */
288
351
  outputArtifacts?: TestRunOutputArtifacts;
289
352
  }
290
353
  /** The input artifacts for the test run. */
291
354
  export interface TestRunInputArtifacts {
292
- /** File info */
293
- configFileInfo?: FileInfo;
294
- /** File info */
295
- testScriptFileInfo?: FileInfo;
296
- /** File info */
297
- userPropFileInfo?: FileInfo;
298
- /** File info */
299
- inputArtifactsZipFileInfo?: FileInfo;
300
- /** Additional supported files for the test run */
301
- additionalFileInfo?: Array<FileInfo>;
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;
302
370
  }
303
371
  /** The output artifacts for the test run. */
304
372
  export interface TestRunOutputArtifacts {
305
- /** File info */
306
- resultFileInfo?: FileInfo;
307
- /** File info */
308
- logsFileInfo?: FileInfo;
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;
309
388
  }
310
- /** Filters to fetch the set of metric */
389
+ /** Filters to fetch the set of metric. */
311
390
  export interface MetricRequestPayload {
312
- /** Get metrics for specific dimension values. Example: Metric contains dimension like SamplerName, Error. To retrieve all the time series data where SamplerName is equals to HTTPRequest1 or HTTPRequest2, the DimensionFilter value will be {"SamplerName", ["HTTPRequest1", "HTTPRequest2"} */
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
+ */
313
397
  filters?: Array<DimensionFilter>;
314
398
  }
315
399
  /** Dimension name and values to filter */
@@ -317,45 +401,286 @@ export interface DimensionFilter {
317
401
  /** The dimension name */
318
402
  name?: string;
319
403
  /** The dimension values. Maximum values can be 20. */
320
- values?: Array<string>;
404
+ values?: string[];
321
405
  }
322
406
  /** Test run app component */
323
407
  export interface TestRunAppComponents {
324
- /** Azure resource collection { resource id (fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) : resource object } */
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
+ */
325
413
  components: Record<string, AppComponent>;
326
- /** Test run identifier */
327
- testRunId?: string;
328
- /** The creation datetime(ISO 8601 literal format). */
329
- createdDateTime?: Date | string;
330
- /** The user that created. */
331
- createdBy?: string;
332
- /** The last Modified datetime(ISO 8601 literal format). */
333
- lastModifiedDateTime?: Date | string;
334
- /** The user that last modified. */
335
- lastModifiedBy?: string;
336
414
  }
337
415
  /** Test run server metrics configuration */
338
- export interface TestRunServerMetricConfig {
339
- /** Test run identifier */
340
- testRunId?: string;
341
- /** Azure resource metrics collection {metric id : metrics object} (Refer : https://docs.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition for metric id). */
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
+ */
342
422
  metrics?: Record<string, ResourceMetric>;
343
- /** The creation datetime(ISO 8601 literal format). */
344
- createdDateTime?: Date | string;
345
- /** The user that created. */
346
- createdBy?: string;
347
- /** The last Modified datetime(ISO 8601 literal format). */
348
- lastModifiedDateTime?: Date | string;
349
- /** The user that last modified. */
350
- lastModifiedBy?: string;
351
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
+ /** Trigger model. */
458
+ export interface TriggerParent {
459
+ /** The name of the trigger. */
460
+ displayName: string;
461
+ /** The description of the trigger. */
462
+ description?: string;
463
+ /**
464
+ * The current state of the trigger.
465
+ *
466
+ * Possible values: "Active", "Paused", "Completed", "Disabled"
467
+ */
468
+ state?: TriggerState;
469
+ kind: TriggerType;
470
+ }
471
+ /** State details of the trigger. */
472
+ export interface StateDetails {
473
+ /** The error message if the trigger is in disabled state. */
474
+ message?: string;
475
+ }
476
+ /** ScheduleTestsTrigger model. */
477
+ export interface ScheduleTestsTrigger extends TriggerParent {
478
+ /** The type of the trigger is ScheduleTestsTrigger. */
479
+ kind: "ScheduleTestsTrigger";
480
+ /** The test id of test to be triggered by this schedule trigger. Currently only one test is supported for a trigger. */
481
+ testIds: string[];
482
+ /** Start date time of the trigger in UTC timezone. (RFC 3339 literal format) */
483
+ startDateTime?: Date | string;
484
+ /** Recurrence details of the trigger. Null if schedule is not recurring. */
485
+ recurrence?: Recurrence;
486
+ }
487
+ /** Actual state of the recurrence for the trigger. */
488
+ export interface RecurrenceStatus {
489
+ /** The number of occurrences remaining for the trigger. Null if recurrence end has end date instead of number of occurrences. */
490
+ remainingOccurrences?: number;
491
+ /** The next three execution times of the trigger. (RFC 3339 literal format) */
492
+ nextScheduledDateTimes?: Date[] | string[];
493
+ }
494
+ /** Recurrence model. */
495
+ export interface RecurrenceParent {
496
+ /** 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. */
497
+ recurrenceEnd?: RecurrenceEnd;
498
+ frequency: Frequency;
499
+ }
500
+ /** 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. */
501
+ export interface RecurrenceEnd {
502
+ /** Number of occurrences after which the recurrence will end. */
503
+ numberOfOccurrences?: number;
504
+ /** The date after which the recurrence will end. (RFC 3339 literal format) */
505
+ endDateTime?: Date | string;
506
+ }
507
+ /** Recurrence model when frequency is set as Daily. */
508
+ export interface DailyRecurrence extends RecurrenceParent {
509
+ /** Frequency of the day recurrence. */
510
+ frequency: "Daily";
511
+ /** The interval at which the recurrence should repeat. It signifies the number of days between each recurrence. */
512
+ interval: number;
513
+ }
514
+ /** Recurrence model when frequency is set as Hourly. */
515
+ export interface HourlyRecurrence extends RecurrenceParent {
516
+ /** Frequency of the hour recurrence. */
517
+ frequency: "Hourly";
518
+ /** The interval at which the recurrence should repeat. It signifies the number of hours between each recurrence. */
519
+ interval: number;
520
+ }
521
+ /** Recurrence model when frequency is set as MonthlyByDays . */
522
+ export interface MonthlyRecurrenceByWeekDays extends RecurrenceParent {
523
+ /** Frequency of the month recurrence. */
524
+ frequency: "MonthlyByDays";
525
+ /** Specific days of the week when the recurrence should repeat. */
526
+ weekDaysInMonth?: WeekDays[];
527
+ /** 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. */
528
+ index: number;
529
+ /** The interval at which the recurrence should repeat. It signifies the number of months between each recurrence. */
530
+ interval: number;
531
+ }
532
+ /** Recurrence model when frequency is set as MonthlyByDates. */
533
+ export interface MonthlyRecurrenceByDates extends RecurrenceParent {
534
+ /** Frequency of the month recurrence. */
535
+ frequency: "MonthlyByDates";
536
+ /** 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. */
537
+ datesInMonth?: number[];
538
+ /** The interval at which the recurrence should repeat. It signifies the number of months between each recurrence. */
539
+ interval?: number;
540
+ }
541
+ /** Recurrence is set based on cron expression. */
542
+ export interface RecurrenceWithCron extends RecurrenceParent {
543
+ /** Specify frequency using a cron expression. */
544
+ frequency: "Cron";
545
+ /** Cron expression for the recurrence. */
546
+ cronExpression: string;
547
+ }
548
+ /** Recurrence model when frequency is set as weekly. */
549
+ export interface WeeklyRecurrence extends RecurrenceParent {
550
+ /** Frequency of the week recurrence. */
551
+ frequency: "Weekly";
552
+ /** Recurrence set to repeat on the specified days of the week. */
553
+ daysOfWeek?: WeekDays[];
554
+ /** The interval at which the recurrence should repeat. It signifies the number of weeks between each recurrence. */
555
+ interval?: number;
556
+ }
557
+ /** Notification rule model. */
558
+ export interface NotificationRuleParent {
559
+ /** The name of the notification rule. */
560
+ displayName: string;
561
+ /** The action groups to notify. */
562
+ actionGroupIds: string[];
563
+ scope: NotificationScopeType;
564
+ }
565
+ /** Tests Notification rule model. */
566
+ export interface TestsNotificationRule extends NotificationRuleParent {
567
+ /** Scope of type Tests. */
568
+ scope: "Tests";
569
+ /** The test ids to include. If not provided, notification will be sent for all testIds. */
570
+ testIds?: string[];
571
+ /**
572
+ * The event to receive notifications for along with filtering conditions.
573
+ * Key is a user-assigned identifier for the event filter.
574
+ */
575
+ eventFilters: Record<string, TestsNotificationEventFilter>;
576
+ }
577
+ /** The notification event filter for Tests scope. */
578
+ export interface TestsNotificationEventFilterParent {
579
+ kind: NotificationEventType;
580
+ }
581
+ /** The notification event filter when the event type is TestRunEnded and scope is Tests. */
582
+ export interface TestRunEndedNotificationEventFilter extends TestsNotificationEventFilterParent {
583
+ /** Event type for test run ended event. */
584
+ kind: "TestRunEnded";
585
+ /** Event filtering condition. */
586
+ condition?: TestRunEndedEventCondition;
587
+ }
588
+ /** TestRunEnded Event condition. */
589
+ export interface TestRunEndedEventCondition {
590
+ /** The test run statuses to send notification for. */
591
+ testRunStatuses?: TestRunStatus[];
592
+ /** The test run results to send notification for. */
593
+ testRunResults?: PassFailTestResult[];
594
+ }
595
+ /** The notification event filter when the event type is TestRunStarted and scope is Tests. */
596
+ export interface TestRunStartedNotificationEventFilter extends TestsNotificationEventFilterParent {
597
+ /** Event type for test run started event. */
598
+ kind: "TestRunStarted";
599
+ }
600
+ /** The notification event filter when the event type is TriggerCompleted. */
601
+ export interface TriggerCompletedNotificationEventFilter extends TestsNotificationEventFilterParent {
602
+ /** Event type for trigger ended event. */
603
+ kind: "TriggerCompleted";
604
+ }
605
+ /** The notification event filter when the event type is TriggerDisabled. */
606
+ export interface TriggerDisabledNotificationEventFilter extends TestsNotificationEventFilterParent {
607
+ /** Event type for trigger disabled event. */
608
+ kind: "TriggerDisabled";
609
+ }
610
+ /** Configurations of a target resource. This varies with the kind of resource. */
611
+ export type TargetResourceConfigurations = TargetResourceConfigurationsParent | FunctionFlexConsumptionTargetResourceConfigurations;
612
+ /** Trigger model. */
613
+ export type Trigger = TriggerParent | ScheduleTestsTrigger;
614
+ /** Recurrence model. */
615
+ export type Recurrence = RecurrenceParent | DailyRecurrence | HourlyRecurrence | MonthlyRecurrenceByWeekDays | MonthlyRecurrenceByDates | RecurrenceWithCron | WeeklyRecurrence;
616
+ /** Notification rule model. */
617
+ export type NotificationRule = NotificationRuleParent | TestsNotificationRule;
618
+ /** The notification event filter for Tests scope. */
619
+ export type TestsNotificationEventFilter = TestsNotificationEventFilterParent | TestRunEndedNotificationEventFilter | TestRunStartedNotificationEventFilter | TriggerCompletedNotificationEventFilter | TriggerDisabledNotificationEventFilter;
620
+ /** Alias for PFMetrics */
621
+ export type PFMetrics = string;
622
+ /** Alias for PassFailAggregationFunction */
623
+ export type PassFailAggregationFunction = string;
624
+ /** Alias for PassFailAction */
625
+ export type PassFailAction = string;
626
+ /** Alias for PassFailResult */
627
+ export type PassFailResult = string;
628
+ /** Alias for SecretType */
629
+ export type SecretType = string;
630
+ /** Alias for CertificateType */
631
+ export type CertificateType = string;
632
+ /** Alias for FileType */
633
+ export type FileType = string;
634
+ /** Alias for FileValidationStatus */
635
+ export type FileValidationStatus = string;
636
+ /** Alias for TestKind */
637
+ export type TestKind = string;
638
+ /** Alias for ManagedIdentityType */
639
+ export type ManagedIdentityType = string;
640
+ /** Alias for ResourceKind */
641
+ 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
+ /** Alias for TriggerType */
657
+ export type TriggerType = string;
658
+ /** Alias for TriggerState */
659
+ export type TriggerState = string;
660
+ /** Alias for Frequency */
661
+ export type Frequency = string;
662
+ /** Alias for WeekDays */
663
+ export type WeekDays = string;
664
+ /** Alias for NotificationScopeType */
665
+ export type NotificationScopeType = string;
666
+ /** Alias for NotificationEventType */
667
+ export type NotificationEventType = string;
668
+ /** Added Poller Types **/
669
+ /**
670
+ * Poller for File Upload and Validation
671
+ */
672
+ export type FileUploadAndValidatePoller = SimplePollerLike<OperationState<LoadTestAdministrationGetTestFile200Response>, LoadTestAdministrationGetTestFile200Response>;
673
+ /**
674
+ * Poller for Test Run Completion
675
+ */
676
+ export type TestRunCompletionPoller = SimplePollerLike<OperationState<LoadTestRunGetTestRun200Response>, LoadTestRunGetTestRun200Response>;
352
677
  /**
353
- * Describes a poller for NotificationHubJob types.
678
+ * Poller for Test Profile Run Completion
354
679
  */
355
- export type FileUploadAndValidatePoller = SimplePollerLike<OperationState<TestGetFile200Response>, TestGetFile200Response>;
356
- export type TestRunCompletionPoller = SimplePollerLike<OperationState<TestRunGet200Response>, TestRunGet200Response>;
357
- export type TestRunCreateOrUpdateSuccessResponse = TestRunCreateOrUpdate200Response | TestRunCreateOrUpdate201Response;
358
- export type TestUploadFileSuccessResponse = TestUploadFile201Response;
680
+ export type TestProfileRunCompletionPoller = SimplePollerLike<OperationState<TestProfileRunAdministrationGetTestProfileRun200Response>, TestProfileRunAdministrationGetTestProfileRun200Response>;
681
+ export type TestRunCreateOrUpdateSuccessResponse = LoadTestRunCreateOrUpdateTestRun200Response | LoadTestRunCreateOrUpdateTestRun201Response;
682
+ export type TestProfileRunCreateOrUpdateSuccessResponse = TestProfileRunAdministrationCreateOrUpdateTestProfileRun200Response | TestProfileRunAdministrationCreateOrUpdateTestProfileRun201Response;
683
+ export type TestUploadFileSuccessResponse = LoadTestAdministrationUploadTestFile201Response;
359
684
  export interface PolledOperationOptions {
360
685
  /**
361
686
  * Time delay between poll requests, in milliseconds.