getServerMetricsConfigWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.getServerMetricsConfigWithResponse(testRunId, requestOptions);
+ LoadTestRunClient(LoadTestRunAsyncClient client) {
+ this.client = client;
}
/**
- * Create and start a new test run with the given name.
- *
- *
- * Query Parameters
- *
+ * Create and start a new test run with the given test run Id.
+ *
Query Parameters
*
* Query Parameters
- *
- * Name |
- * Type |
- * Required |
- * Description |
- *
- *
- * oldTestRunId |
- * String |
- * No |
- * Existing test run identifier that should be rerun, if this is provided, the test will run with the JMX file,
- * configuration and app components from the existing test run. You can override the configuration values for new
- * test run in the request body. |
- *
+ * Name | Type | Required | Description |
+ * oldTestRunId | String | No | Existing test run identifier that should be rerun, if this
+ * is provided, the
+ * test will run with the JMX file, configuration and app components from the
+ * existing test run. You can override the configuration values for new test run
+ * in the request body. |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- *
- * Request Body Schema
- *
+ *
Request Body Schema
+ *
* {@code
* {
+ * testRunId: String (Required)
* passFailCriteria (Optional): {
* passFailMetrics (Optional): {
- * String (Optional): {
+ * String (Required): {
* clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
- * aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
+ * aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/min/max) (Optional)
* condition: String (Optional)
* requestName: String (Optional)
* value: Double (Optional)
@@ -484,8 +79,13 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* }
* }
* }
+ * autoStopCriteria (Optional): {
+ * autoStopDisabled: Boolean (Optional)
+ * errorRate: Double (Optional)
+ * errorRateTimeWindowInSeconds: Integer (Optional)
+ * }
* secrets (Optional): {
- * String (Optional): {
+ * String (Required): {
* value: String (Optional)
* type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
* }
@@ -496,7 +96,7 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* name: String (Optional)
* }
* environmentVariables (Optional): {
- * String: String (Optional)
+ * String: String (Required)
* }
* errorDetails (Optional): [
* (Optional){
@@ -504,7 +104,7 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* }
* ]
* testRunStatistics (Optional): {
- * String (Optional): {
+ * String (Required): {
* transaction: String (Optional)
* sampleCount: Double (Optional)
* errorCount: Double (Optional)
@@ -516,28 +116,45 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* pct1ResTime: Double (Optional)
* pct2ResTime: Double (Optional)
* pct3ResTime: Double (Optional)
+ * pct75ResTime: Double (Optional)
+ * pct96ResTime: Double (Optional)
+ * pct97ResTime: Double (Optional)
+ * pct98ResTime: Double (Optional)
+ * pct999ResTime: Double (Optional)
+ * pct9999ResTime: Double (Optional)
* throughput: Double (Optional)
* receivedKBytesPerSec: Double (Optional)
* sentKBytesPerSec: Double (Optional)
* }
* }
+ * regionalStatistics (Optional): {
+ * String (Required): (recursive schema, see String above)
+ * }
* loadTestConfiguration (Optional): {
* engineInstances: Integer (Optional)
* splitAllCSVs: Boolean (Optional)
* quickStartTest: Boolean (Optional)
* optionalLoadTestConfig (Optional): {
* endpointUrl: String (Optional)
+ * requestsPerSecond: Integer (Optional)
+ * maxResponseTimeInMs: Integer (Optional)
* virtualUsers: Integer (Optional)
* rampUpTime: Integer (Optional)
* duration: Integer (Optional)
* }
+ * regionalLoadTestConfig (Optional): [
+ * (Optional){
+ * engineInstances: int (Optional, Required on create)
+ * region: String (Optional, Required on create)
+ * }
+ * ]
* }
* testArtifacts (Optional): {
* inputArtifacts (Optional): {
* configFileInfo (Optional): {
+ * fileName: String (Required)
* url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+ * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
* expireDateTime: OffsetDateTime (Optional)
* validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
* validationFailureDetails: String (Optional)
@@ -545,6 +162,7 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
* userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
* inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+ * urlTestConfigFileInfo (Optional): (recursive schema, see urlTestConfigFileInfo above)
* additionalFileInfo (Optional): [
* (recursive schema, see above)
* ]
@@ -552,11 +170,15 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* outputArtifacts (Optional): {
* resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
* logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
+ * artifactsContainerInfo (Optional): {
+ * url: String (Optional)
+ * expireDateTime: OffsetDateTime (Optional)
+ * }
+ * reportFileInfo (Optional): (recursive schema, see reportFileInfo above)
* }
* }
* testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
* virtualUsers: Integer (Optional)
- * testRunId: String (Optional)
* displayName: String (Optional)
* testId: String (Optional)
* description: String (Optional)
@@ -567,23 +189,27 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* portalUrl: String (Optional)
* duration: Long (Optional)
* subnetId: String (Optional)
+ * kind: String(URL/JMX/Locust) (Optional)
+ * requestDataLevel: String(NONE/ERRORS) (Optional)
+ * debugLogsEnabled: Boolean (Optional)
+ * publicIPDisabled: Boolean (Optional)
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
* lastModifiedDateTime: OffsetDateTime (Optional)
* lastModifiedBy: String (Optional)
* }
* }
- *
- *
- * Response Body Schema
- *
+ *
+ *
Response Body Schema
+ *
* {@code
* {
+ * testRunId: String (Required)
* passFailCriteria (Optional): {
* passFailMetrics (Optional): {
- * String (Optional): {
+ * String (Required): {
* clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
- * aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
+ * aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/min/max) (Optional)
* condition: String (Optional)
* requestName: String (Optional)
* value: Double (Optional)
@@ -593,8 +219,13 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* }
* }
* }
+ * autoStopCriteria (Optional): {
+ * autoStopDisabled: Boolean (Optional)
+ * errorRate: Double (Optional)
+ * errorRateTimeWindowInSeconds: Integer (Optional)
+ * }
* secrets (Optional): {
- * String (Optional): {
+ * String (Required): {
* value: String (Optional)
* type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
* }
@@ -605,7 +236,7 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* name: String (Optional)
* }
* environmentVariables (Optional): {
- * String: String (Optional)
+ * String: String (Required)
* }
* errorDetails (Optional): [
* (Optional){
@@ -613,7 +244,7 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* }
* ]
* testRunStatistics (Optional): {
- * String (Optional): {
+ * String (Required): {
* transaction: String (Optional)
* sampleCount: Double (Optional)
* errorCount: Double (Optional)
@@ -625,28 +256,45 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* pct1ResTime: Double (Optional)
* pct2ResTime: Double (Optional)
* pct3ResTime: Double (Optional)
+ * pct75ResTime: Double (Optional)
+ * pct96ResTime: Double (Optional)
+ * pct97ResTime: Double (Optional)
+ * pct98ResTime: Double (Optional)
+ * pct999ResTime: Double (Optional)
+ * pct9999ResTime: Double (Optional)
* throughput: Double (Optional)
* receivedKBytesPerSec: Double (Optional)
* sentKBytesPerSec: Double (Optional)
* }
* }
+ * regionalStatistics (Optional): {
+ * String (Required): (recursive schema, see String above)
+ * }
* loadTestConfiguration (Optional): {
* engineInstances: Integer (Optional)
* splitAllCSVs: Boolean (Optional)
* quickStartTest: Boolean (Optional)
* optionalLoadTestConfig (Optional): {
* endpointUrl: String (Optional)
+ * requestsPerSecond: Integer (Optional)
+ * maxResponseTimeInMs: Integer (Optional)
* virtualUsers: Integer (Optional)
* rampUpTime: Integer (Optional)
* duration: Integer (Optional)
* }
+ * regionalLoadTestConfig (Optional): [
+ * (Optional){
+ * engineInstances: int (Optional, Required on create)
+ * region: String (Optional, Required on create)
+ * }
+ * ]
* }
* testArtifacts (Optional): {
* inputArtifacts (Optional): {
* configFileInfo (Optional): {
+ * fileName: String (Required)
* url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+ * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
* expireDateTime: OffsetDateTime (Optional)
* validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
* validationFailureDetails: String (Optional)
@@ -654,6 +302,7 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
* userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
* inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+ * urlTestConfigFileInfo (Optional): (recursive schema, see urlTestConfigFileInfo above)
* additionalFileInfo (Optional): [
* (recursive schema, see above)
* ]
@@ -661,11 +310,15 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* outputArtifacts (Optional): {
* resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
* logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
- * }
+ * artifactsContainerInfo (Optional): {
+ * url: String (Optional)
+ * expireDateTime: OffsetDateTime (Optional)
+ * }
+ * reportFileInfo (Optional): (recursive schema, see reportFileInfo above)
+ * }
* }
* testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
* virtualUsers: Integer (Optional)
- * testRunId: String (Optional)
* displayName: String (Optional)
* testId: String (Optional)
* description: String (Optional)
@@ -676,16 +329,20 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* portalUrl: String (Optional)
* duration: Long (Optional)
* subnetId: String (Optional)
+ * kind: String(URL/JMX/Locust) (Optional)
+ * requestDataLevel: String(NONE/ERRORS) (Optional)
+ * debugLogsEnabled: Boolean (Optional)
+ * publicIPDisabled: Boolean (Optional)
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
* lastModifiedDateTime: OffsetDateTime (Optional)
* lastModifiedBy: String (Optional)
* }
* }
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param body Load test run model.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param body The resource instance.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -693,24 +350,262 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return load test run model along with {@link Response}.
*/
+ @Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateTestRunWithResponse(String testRunId, BinaryData body,
+ public Response createOrUpdateTestRunWithResponse(String testRunId, BinaryData body,
RequestOptions requestOptions) {
- return this.serviceClient.createOrUpdateTestRunWithResponse(testRunId, body, requestOptions);
+ return this.client.createOrUpdateTestRunWithResponse(testRunId, body, requestOptions).block();
+ }
+
+ /**
+ * Add an app component to a test run.
+ *
+ * Add an app component to a test run by providing the resource Id, name and type.
+ * Request Body Schema
+ *
+ * {@code
+ * {
+ * components (Optional, Required on create): {
+ * String (Required): {
+ * resourceId: String (Required)
+ * resourceName: String (Optional, Required on create)
+ * resourceType: String (Optional, Required on create)
+ * displayName: String (Optional)
+ * resourceGroup: String (Optional)
+ * subscriptionId: String (Optional)
+ * kind: String (Optional)
+ * }
+ * }
+ * testRunId: String (Optional)
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ * {@code
+ * {
+ * components (Optional, Required on create): {
+ * String (Required): {
+ * resourceId: String (Required)
+ * resourceName: String (Optional, Required on create)
+ * resourceType: String (Optional, Required on create)
+ * displayName: String (Optional)
+ * resourceGroup: String (Optional)
+ * subscriptionId: String (Optional)
+ * kind: String (Optional)
+ * }
+ * }
+ * testRunId: String (Optional)
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ * @param testRunId Unique Id for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param body App Component model.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return test run app component along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateAppComponentsWithResponse(String testRunId, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.client.createOrUpdateAppComponentsWithResponse(testRunId, body, requestOptions).block();
+ }
+
+ /**
+ * Configure server metrics for a test run.
+ * Request Body Schema
+ *
+ * {@code
+ * {
+ * testRunId: String (Optional)
+ * metrics (Optional): {
+ * String (Required): {
+ * id: String (Optional)
+ * resourceId: String (Optional, Required on create)
+ * metricNamespace: String (Optional, Required on create)
+ * displayDescription: String (Optional)
+ * name: String (Optional, Required on create)
+ * aggregation: String (Optional, Required on create)
+ * unit: String (Optional)
+ * resourceType: String (Optional, Required on create)
+ * }
+ * }
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ * {@code
+ * {
+ * testRunId: String (Optional)
+ * metrics (Optional): {
+ * String (Required): {
+ * id: String (Optional)
+ * resourceId: String (Optional, Required on create)
+ * metricNamespace: String (Optional, Required on create)
+ * displayDescription: String (Optional)
+ * name: String (Optional, Required on create)
+ * aggregation: String (Optional, Required on create)
+ * unit: String (Optional)
+ * resourceType: String (Optional, Required on create)
+ * }
+ * }
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ * @param testRunId Unique Id for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param body Server metric configuration model.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return test run server metrics configuration along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateServerMetricsConfigWithResponse(String testRunId, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.client.createOrUpdateServerMetricsConfigWithResponse(testRunId, body, requestOptions).block();
+ }
+
+ /**
+ * Delete an existing load test run.
+ *
+ * Delete an existing load test run by providing the testRunId.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteTestRunWithResponse(String testRunId, RequestOptions requestOptions) {
+ return this.client.deleteTestRunWithResponse(testRunId, requestOptions).block();
+ }
+
+ /**
+ * Get associated app component (collection of azure resources) for the given test
+ * run.
+ * Response Body Schema
+ *
+ * {@code
+ * {
+ * components (Optional, Required on create): {
+ * String (Required): {
+ * resourceId: String (Required)
+ * resourceName: String (Optional, Required on create)
+ * resourceType: String (Optional, Required on create)
+ * displayName: String (Optional)
+ * resourceGroup: String (Optional)
+ * subscriptionId: String (Optional)
+ * kind: String (Optional)
+ * }
+ * }
+ * testRunId: String (Optional)
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return associated app component (collection of azure resources) for the given test
+ * run along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getAppComponentsWithResponse(String testRunId, RequestOptions requestOptions) {
+ return this.client.getAppComponentsWithResponse(testRunId, requestOptions).block();
+ }
+
+ /**
+ * Get associated server metrics configuration for the given test run.
+ * Response Body Schema
+ *
+ * {@code
+ * {
+ * testRunId: String (Optional)
+ * metrics (Optional): {
+ * String (Required): {
+ * id: String (Optional)
+ * resourceId: String (Optional, Required on create)
+ * metricNamespace: String (Optional, Required on create)
+ * displayDescription: String (Optional)
+ * name: String (Optional, Required on create)
+ * aggregation: String (Optional, Required on create)
+ * unit: String (Optional)
+ * resourceType: String (Optional, Required on create)
+ * }
+ * }
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return associated server metrics configuration for the given test run along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getServerMetricsConfigWithResponse(String testRunId, RequestOptions requestOptions) {
+ return this.client.getServerMetricsConfigWithResponse(testRunId, requestOptions).block();
}
/**
- * Get test run details by name.
- *
- * Response Body Schema
- *
+ * Get test run details by test run Id.
+ * Response Body Schema
+ *
* {@code
* {
+ * testRunId: String (Required)
* passFailCriteria (Optional): {
* passFailMetrics (Optional): {
* String (Required): {
* clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
- * aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
+ * aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/min/max) (Optional)
* condition: String (Optional)
* requestName: String (Optional)
* value: Double (Optional)
@@ -720,6 +615,11 @@ Response createOrUpdateTestRunWithResponse(String testRunId, BinaryD
* }
* }
* }
+ * autoStopCriteria (Optional): {
+ * autoStopDisabled: Boolean (Optional)
+ * errorRate: Double (Optional)
+ * errorRateTimeWindowInSeconds: Integer (Optional)
+ * }
* secrets (Optional): {
* String (Required): {
* value: String (Optional)
@@ -752,28 +652,45 @@ Response createOrUpdateTestRunWithResponse(String testRunId, BinaryD
* pct1ResTime: Double (Optional)
* pct2ResTime: Double (Optional)
* pct3ResTime: Double (Optional)
+ * pct75ResTime: Double (Optional)
+ * pct96ResTime: Double (Optional)
+ * pct97ResTime: Double (Optional)
+ * pct98ResTime: Double (Optional)
+ * pct999ResTime: Double (Optional)
+ * pct9999ResTime: Double (Optional)
* throughput: Double (Optional)
* receivedKBytesPerSec: Double (Optional)
* sentKBytesPerSec: Double (Optional)
* }
* }
+ * regionalStatistics (Optional): {
+ * String (Required): (recursive schema, see String above)
+ * }
* loadTestConfiguration (Optional): {
* engineInstances: Integer (Optional)
* splitAllCSVs: Boolean (Optional)
* quickStartTest: Boolean (Optional)
* optionalLoadTestConfig (Optional): {
* endpointUrl: String (Optional)
+ * requestsPerSecond: Integer (Optional)
+ * maxResponseTimeInMs: Integer (Optional)
* virtualUsers: Integer (Optional)
* rampUpTime: Integer (Optional)
* duration: Integer (Optional)
* }
+ * regionalLoadTestConfig (Optional): [
+ * (Optional){
+ * engineInstances: int (Optional, Required on create)
+ * region: String (Optional, Required on create)
+ * }
+ * ]
* }
* testArtifacts (Optional): {
* inputArtifacts (Optional): {
* configFileInfo (Optional): {
+ * fileName: String (Required)
* url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+ * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
* expireDateTime: OffsetDateTime (Optional)
* validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
* validationFailureDetails: String (Optional)
@@ -781,6 +698,7 @@ Response createOrUpdateTestRunWithResponse(String testRunId, BinaryD
* testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
* userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
* inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+ * urlTestConfigFileInfo (Optional): (recursive schema, see urlTestConfigFileInfo above)
* additionalFileInfo (Optional): [
* (recursive schema, see above)
* ]
@@ -788,11 +706,15 @@ Response createOrUpdateTestRunWithResponse(String testRunId, BinaryD
* outputArtifacts (Optional): {
* resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
* logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
+ * artifactsContainerInfo (Optional): {
+ * url: String (Optional)
+ * expireDateTime: OffsetDateTime (Optional)
+ * }
+ * reportFileInfo (Optional): (recursive schema, see reportFileInfo above)
* }
* }
* testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
* virtualUsers: Integer (Optional)
- * testRunId: String (Optional)
* displayName: String (Optional)
* testId: String (Optional)
* description: String (Optional)
@@ -803,148 +725,295 @@ Response createOrUpdateTestRunWithResponse(String testRunId, BinaryD
* portalUrl: String (Optional)
* duration: Long (Optional)
* subnetId: String (Optional)
+ * kind: String(URL/JMX/Locust) (Optional)
+ * requestDataLevel: String(NONE/ERRORS) (Optional)
+ * debugLogsEnabled: Boolean (Optional)
+ * publicIPDisabled: Boolean (Optional)
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
* lastModifiedDateTime: OffsetDateTime (Optional)
* lastModifiedBy: String (Optional)
* }
* }
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return test run details by name along with {@link Response}.
+ * @return test run details by test run Id along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getTestRunWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.getTestRunWithResponse(testRunId, requestOptions);
+ return this.client.getTestRunWithResponse(testRunId, requestOptions).block();
}
/**
- * Delete a test run by its name.
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
+ * Get test run file by file name.
+ * Response Body Schema
+ *
+ * {@code
+ * {
+ * fileName: String (Required)
+ * url: String (Optional)
+ * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
+ * expireDateTime: OffsetDateTime (Optional)
+ * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+ * validationFailureDetails: String (Optional)
+ * }
+ * }
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param fileName Name of the file.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the {@link Response}.
+ * @return test run file by file name along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response deleteTestRunWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.deleteTestRunWithResponse(testRunId, requestOptions);
+ public Response getTestRunFileWithResponse(String testRunId, String fileName,
+ RequestOptions requestOptions) {
+ return this.client.getTestRunFileWithResponse(testRunId, fileName, requestOptions).block();
}
/**
- * Get test run file by file name.
- *
- * Response Body Schema
- *
+ * List the dimension values for the given metric dimension name.
+ * Query Parameters
+ *
+ * Query Parameters
+ * Name | Type | Required | Description |
+ * interval | String | No | The interval (i.e. timegrain) of the query. Allowed values:
+ * "PT5S", "PT10S", "PT1M", "PT5M", "PT1H". |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
* {@code
* {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
+ * name: String (Optional)
+ * value (Optional): [
+ * String (Optional)
+ * ]
+ * nextLink: String (Optional)
+ * }
+ * }
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param name Dimension name.
+ * @param metricname Metric name.
+ * @param metricNamespace Metric namespace to query metric definitions for.
+ * @param timespan The timespan of the query. It is a string with the following format
+ * 'startDateTime_ISO/endDateTime_ISO'.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return metrics dimension values along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listMetricDimensionValuesWithResponse(String testRunId, String name, String metricname,
+ String metricNamespace, String timespan, RequestOptions requestOptions) {
+ return this.client
+ .listMetricDimensionValuesWithResponse(testRunId, name, metricname, metricNamespace, timespan,
+ requestOptions)
+ .block();
+ }
+
+ /**
+ * List the metric definitions for a load test run.
+ * Response Body Schema
+ *
+ * {@code
+ * {
+ * value (Required): [
+ * (Required){
+ * dimensions (Optional): [
+ * (Optional){
+ * description: String (Optional)
+ * name: String (Optional)
+ * }
+ * ]
+ * description: String (Optional)
+ * name: String (Optional)
+ * namespace: String (Optional)
+ * primaryAggregationType: String(Average/Count/None/Total/Percentile75/Percentile90/Percentile95/Percentile96/Percentile97/Percentile98/Percentile99/Percentile999/Percentile9999) (Optional)
+ * supportedAggregationTypes (Optional): [
+ * String (Optional)
+ * ]
+ * unit: String(NotSpecified/Percent/Count/Seconds/Milliseconds/Bytes/BytesPerSecond/CountPerSecond) (Optional)
+ * metricAvailabilities (Optional): [
+ * (Optional){
+ * timeGrain: String(PT5S/PT10S/PT1M/PT5M/PT1H) (Optional)
+ * }
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param metricNamespace Metric namespace to query metric definitions for.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return represents collection of metric definitions along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getMetricDefinitionsWithResponse(String testRunId, String metricNamespace,
+ RequestOptions requestOptions) {
+ return this.client.getMetricDefinitionsWithResponse(testRunId, metricNamespace, requestOptions).block();
+ }
+
+ /**
+ * List the metric namespaces for a load test run.
+ * Response Body Schema
+ *
+ * {@code
+ * {
+ * value (Required): [
+ * (Required){
+ * description: String (Optional)
+ * name: String (Optional)
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return represents collection of metric namespaces along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getMetricNamespacesWithResponse(String testRunId, RequestOptions requestOptions) {
+ return this.client.getMetricNamespacesWithResponse(testRunId, requestOptions).block();
+ }
+
+ /**
+ * List the metric values for a load test run.
+ * Query Parameters
+ *
+ * Query Parameters
+ * Name | Type | Required | Description |
+ * aggregation | String | No | The aggregation |
+ * interval | String | No | The interval (i.e. timegrain) of the query. Allowed values:
+ * "PT5S", "PT10S", "PT1M", "PT5M", "PT1H". |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Header Parameters
+ *
+ * Header Parameters
+ * Name | Type | Required | Description |
+ * Content-Type | String | No | The content type. Allowed values:
+ * "application/json". |
+ *
+ * You can add these to a request with {@link RequestOptions#addHeader}
+ * Request Body Schema
+ *
+ * {@code
+ * {
+ * filters (Optional): [
+ * (Optional){
+ * name: String (Optional)
+ * values (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ * {@code
+ * {
+ * data (Optional): [
+ * (Optional){
+ * timestamp: OffsetDateTime (Optional)
+ * value: Double (Optional)
+ * }
+ * ]
+ * dimensionValues (Optional): [
+ * (Optional){
+ * name: String (Optional)
+ * value: String (Optional)
+ * }
+ * ]
* }
* }
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param fileName Test run file name with file extension.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param metricname Metric name.
+ * @param metricNamespace Metric namespace to query metric definitions for.
+ * @param timespan The timespan of the query. It is a string with the following format
+ * 'startDateTime_ISO/endDateTime_ISO'.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return test run file by file name along with {@link Response}.
+ * @return the response to a metrics query as paginated response with {@link PagedIterable}.
*/
@Generated
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getTestRunFileWithResponse(String testRunId, String fileName,
- RequestOptions requestOptions) {
- return this.serviceClient.getTestRunFileWithResponse(testRunId, fileName, requestOptions);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listMetrics(String testRunId, String metricname, String metricNamespace,
+ String timespan, RequestOptions requestOptions) {
+ return new PagedIterable<>(
+ this.client.listMetrics(testRunId, metricname, metricNamespace, timespan, requestOptions));
}
/**
- * Get all test runs with given filters.
- *
- * Query Parameters
- *
+ * Get all test runs for the given filters.
+ * Query Parameters
*
* Query Parameters
- *
- * Name |
- * Type |
- * Required |
- * Description |
- *
- *
- * orderby |
- * String |
- * No |
- * Sort on the supported fields in (field asc/desc) format. eg: executedDateTime asc. Supported fields -
- * executedDateTime |
- *
- *
- * search |
- * String |
- * No |
- * Prefix based, case sensitive search on searchable fields - description, executedUser. For example, to search
- * for a test run, with description 500 VUs, the search parameter can be 500. |
- *
- *
- * testId |
- * String |
- * No |
- * Unique name of an existing load test. |
- *
- *
- * executionFrom |
- * OffsetDateTime |
- * No |
- * Start DateTime(ISO 8601 literal format) of test-run execution time filter range. |
- *
- *
- * executionTo |
- * OffsetDateTime |
- * No |
- * End DateTime(ISO 8601 literal format) of test-run execution time filter range. |
- *
- *
- * status |
- * String |
- * No |
- * Comma separated list of test run status. |
- *
- *
- * maxpagesize |
- * Integer |
- * No |
- * Number of results in response. |
- *
+ * Name | Type | Required | Description |
+ * orderby | String | No | Sort on the supported fields in (field asc/desc) format. eg:
+ * executedDateTime
+ * asc. Supported fields - executedDateTime |
+ * search | String | No | Prefix based, case sensitive search on searchable fields -
+ * description,
+ * executedUser. For example, to search for a test run, with description 500 VUs,
+ * the search parameter can be 500. |
+ * testId | String | No | Unique name of an existing load test. |
+ * executionFrom | OffsetDateTime | No | Start DateTime(RFC 3339 literal format) of
+ * test-run execution time filter range. |
+ * executionTo | OffsetDateTime | No | End DateTime(RFC 3339 literal format) of test-run
+ * execution time filter range. |
+ * status | String | No | Comma separated list of test run status. |
+ * maxpagesize | Integer | No | Number of results in response. |
*
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- * Response Body Schema
- *
+ * Response Body Schema
+ *
* {@code
* {
+ * testRunId: String (Required)
* passFailCriteria (Optional): {
* passFailMetrics (Optional): {
* String (Required): {
* clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
- * aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
+ * aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/min/max) (Optional)
* condition: String (Optional)
* requestName: String (Optional)
* value: Double (Optional)
@@ -954,6 +1023,11 @@ public Response getTestRunFileWithResponse(String testRunId, String
* }
* }
* }
+ * autoStopCriteria (Optional): {
+ * autoStopDisabled: Boolean (Optional)
+ * errorRate: Double (Optional)
+ * errorRateTimeWindowInSeconds: Integer (Optional)
+ * }
* secrets (Optional): {
* String (Required): {
* value: String (Optional)
@@ -986,28 +1060,45 @@ public Response getTestRunFileWithResponse(String testRunId, String
* pct1ResTime: Double (Optional)
* pct2ResTime: Double (Optional)
* pct3ResTime: Double (Optional)
+ * pct75ResTime: Double (Optional)
+ * pct96ResTime: Double (Optional)
+ * pct97ResTime: Double (Optional)
+ * pct98ResTime: Double (Optional)
+ * pct999ResTime: Double (Optional)
+ * pct9999ResTime: Double (Optional)
* throughput: Double (Optional)
* receivedKBytesPerSec: Double (Optional)
* sentKBytesPerSec: Double (Optional)
* }
* }
+ * regionalStatistics (Optional): {
+ * String (Required): (recursive schema, see String above)
+ * }
* loadTestConfiguration (Optional): {
* engineInstances: Integer (Optional)
* splitAllCSVs: Boolean (Optional)
* quickStartTest: Boolean (Optional)
* optionalLoadTestConfig (Optional): {
* endpointUrl: String (Optional)
+ * requestsPerSecond: Integer (Optional)
+ * maxResponseTimeInMs: Integer (Optional)
* virtualUsers: Integer (Optional)
* rampUpTime: Integer (Optional)
* duration: Integer (Optional)
* }
+ * regionalLoadTestConfig (Optional): [
+ * (Optional){
+ * engineInstances: int (Optional, Required on create)
+ * region: String (Optional, Required on create)
+ * }
+ * ]
* }
* testArtifacts (Optional): {
* inputArtifacts (Optional): {
* configFileInfo (Optional): {
+ * fileName: String (Required)
* url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+ * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
* expireDateTime: OffsetDateTime (Optional)
* validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
* validationFailureDetails: String (Optional)
@@ -1015,6 +1106,7 @@ public Response getTestRunFileWithResponse(String testRunId, String
* testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
* userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
* inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+ * urlTestConfigFileInfo (Optional): (recursive schema, see urlTestConfigFileInfo above)
* additionalFileInfo (Optional): [
* (recursive schema, see above)
* ]
@@ -1022,11 +1114,15 @@ public Response getTestRunFileWithResponse(String testRunId, String
* outputArtifacts (Optional): {
* resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
* logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
+ * artifactsContainerInfo (Optional): {
+ * url: String (Optional)
+ * expireDateTime: OffsetDateTime (Optional)
+ * }
+ * reportFileInfo (Optional): (recursive schema, see reportFileInfo above)
* }
* }
* testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
* virtualUsers: Integer (Optional)
- * testRunId: String (Optional)
* displayName: String (Optional)
* testId: String (Optional)
* description: String (Optional)
@@ -1037,38 +1133,42 @@ public Response getTestRunFileWithResponse(String testRunId, String
* portalUrl: String (Optional)
* duration: Long (Optional)
* subnetId: String (Optional)
+ * kind: String(URL/JMX/Locust) (Optional)
+ * requestDataLevel: String(NONE/ERRORS) (Optional)
+ * debugLogsEnabled: Boolean (Optional)
+ * publicIPDisabled: Boolean (Optional)
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
* lastModifiedDateTime: OffsetDateTime (Optional)
* lastModifiedBy: String (Optional)
* }
* }
- *
+ *
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return all test runs with given filters as paginated response with {@link PagedIterable}.
+ * @return all test runs for the given filters as paginated response with {@link PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listTestRuns(RequestOptions requestOptions) {
- return this.serviceClient.listTestRuns(requestOptions);
+ return new PagedIterable<>(this.client.listTestRuns(requestOptions));
}
/**
- * Stop test run by name.
- *
- * Response Body Schema
- *
+ * Stop test run by test run Id.
+ * Response Body Schema
+ *
* {@code
* {
+ * testRunId: String (Required)
* passFailCriteria (Optional): {
* passFailMetrics (Optional): {
* String (Required): {
* clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
- * aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
+ * aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/min/max) (Optional)
* condition: String (Optional)
* requestName: String (Optional)
* value: Double (Optional)
@@ -1078,6 +1178,11 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) {
* }
* }
* }
+ * autoStopCriteria (Optional): {
+ * autoStopDisabled: Boolean (Optional)
+ * errorRate: Double (Optional)
+ * errorRateTimeWindowInSeconds: Integer (Optional)
+ * }
* secrets (Optional): {
* String (Required): {
* value: String (Optional)
@@ -1110,28 +1215,45 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) {
* pct1ResTime: Double (Optional)
* pct2ResTime: Double (Optional)
* pct3ResTime: Double (Optional)
+ * pct75ResTime: Double (Optional)
+ * pct96ResTime: Double (Optional)
+ * pct97ResTime: Double (Optional)
+ * pct98ResTime: Double (Optional)
+ * pct999ResTime: Double (Optional)
+ * pct9999ResTime: Double (Optional)
* throughput: Double (Optional)
* receivedKBytesPerSec: Double (Optional)
* sentKBytesPerSec: Double (Optional)
* }
* }
+ * regionalStatistics (Optional): {
+ * String (Required): (recursive schema, see String above)
+ * }
* loadTestConfiguration (Optional): {
* engineInstances: Integer (Optional)
* splitAllCSVs: Boolean (Optional)
* quickStartTest: Boolean (Optional)
* optionalLoadTestConfig (Optional): {
* endpointUrl: String (Optional)
+ * requestsPerSecond: Integer (Optional)
+ * maxResponseTimeInMs: Integer (Optional)
* virtualUsers: Integer (Optional)
* rampUpTime: Integer (Optional)
* duration: Integer (Optional)
* }
+ * regionalLoadTestConfig (Optional): [
+ * (Optional){
+ * engineInstances: int (Optional, Required on create)
+ * region: String (Optional, Required on create)
+ * }
+ * ]
* }
* testArtifacts (Optional): {
* inputArtifacts (Optional): {
* configFileInfo (Optional): {
+ * fileName: String (Required)
* url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+ * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
* expireDateTime: OffsetDateTime (Optional)
* validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
* validationFailureDetails: String (Optional)
@@ -1139,6 +1261,7 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) {
* testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
* userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
* inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+ * urlTestConfigFileInfo (Optional): (recursive schema, see urlTestConfigFileInfo above)
* additionalFileInfo (Optional): [
* (recursive schema, see above)
* ]
@@ -1146,11 +1269,15 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) {
* outputArtifacts (Optional): {
* resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
* logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
+ * artifactsContainerInfo (Optional): {
+ * url: String (Optional)
+ * expireDateTime: OffsetDateTime (Optional)
+ * }
+ * reportFileInfo (Optional): (recursive schema, see reportFileInfo above)
* }
* }
* testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
* virtualUsers: Integer (Optional)
- * testRunId: String (Optional)
* displayName: String (Optional)
* testId: String (Optional)
* description: String (Optional)
@@ -1161,15 +1288,19 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) {
* portalUrl: String (Optional)
* duration: Long (Optional)
* subnetId: String (Optional)
+ * kind: String(URL/JMX/Locust) (Optional)
+ * requestDataLevel: String(NONE/ERRORS) (Optional)
+ * debugLogsEnabled: Boolean (Optional)
+ * publicIPDisabled: Boolean (Optional)
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
* lastModifiedDateTime: OffsetDateTime (Optional)
* lastModifiedBy: String (Optional)
* }
* }
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -1180,87 +1311,464 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) {
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Response stopTestRunWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.stopTestRunWithResponse(testRunId, requestOptions);
+ return this.client.stopTestRunWithResponse(testRunId, requestOptions).block();
}
/**
- * List the metric namespaces for a load test run.
- *
- * Response Body Schema
- *
- * {@code
- * {
- * value (Required): [
- * (Required){
- * description: String (Optional)
- * name: String (Optional)
- * }
- * ]
- * }
- * }
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * Create and start a new test run with the given test run Id.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param body The resource instance.
+ * @param oldTestRunId Existing test run identifier that should be rerun, if this is provided, the
+ * test will run with the JMX file, configuration and app components from the
+ * existing test run. You can override the configuration values for new test run
+ * in the request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return represents collection of metric namespaces along with {@link Response}.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return load test run model.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getMetricNamespacesWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.getMetricNamespacesWithResponse(testRunId, requestOptions);
+ public TestRun createOrUpdateTestRun(String testRunId, TestRun body, String oldTestRunId) {
+ // Generated convenience method for createOrUpdateTestRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ if (oldTestRunId != null) {
+ requestOptions.addQueryParam("oldTestRunId", oldTestRunId, false);
+ }
+ JsonMergePatchHelper.getTestRunAccessor().prepareModelForJsonMergePatch(body, true);
+ BinaryData bodyInBinaryData = BinaryData.fromObject(body);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ bodyInBinaryData.getLength();
+ JsonMergePatchHelper.getTestRunAccessor().prepareModelForJsonMergePatch(body, false);
+ return createOrUpdateTestRunWithResponse(testRunId, bodyInBinaryData, requestOptions).getValue()
+ .toObject(TestRun.class);
+ }
+
+ /**
+ * Create and start a new test run with the given test run Id.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param body The resource instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return load test run model.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TestRun createOrUpdateTestRun(String testRunId, TestRun body) {
+ // Generated convenience method for createOrUpdateTestRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getTestRunAccessor().prepareModelForJsonMergePatch(body, true);
+ BinaryData bodyInBinaryData = BinaryData.fromObject(body);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ bodyInBinaryData.getLength();
+ JsonMergePatchHelper.getTestRunAccessor().prepareModelForJsonMergePatch(body, false);
+ return createOrUpdateTestRunWithResponse(testRunId, bodyInBinaryData, requestOptions).getValue()
+ .toObject(TestRun.class);
+ }
+
+ /**
+ * Add an app component to a test run.
+ *
+ * Add an app component to a test run by providing the resource Id, name and type.
+ *
+ * @param testRunId Unique Id for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param body App Component model.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return test run app component.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TestRunAppComponents createOrUpdateAppComponents(String testRunId, TestRunAppComponents body) {
+ // Generated convenience method for createOrUpdateAppComponentsWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getTestRunAppComponentsAccessor().prepareModelForJsonMergePatch(body, true);
+ BinaryData bodyInBinaryData = BinaryData.fromObject(body);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ bodyInBinaryData.getLength();
+ JsonMergePatchHelper.getTestRunAppComponentsAccessor().prepareModelForJsonMergePatch(body, false);
+ return createOrUpdateAppComponentsWithResponse(testRunId, bodyInBinaryData, requestOptions).getValue()
+ .toObject(TestRunAppComponents.class);
+ }
+
+ /**
+ * Configure server metrics for a test run.
+ *
+ * @param testRunId Unique Id for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param body Server metric configuration model.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return test run server metrics configuration.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TestRunServerMetricConfig createOrUpdateServerMetricsConfig(String testRunId,
+ TestRunServerMetricConfig body) {
+ // Generated convenience method for createOrUpdateServerMetricsConfigWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getTestRunServerMetricConfigAccessor().prepareModelForJsonMergePatch(body, true);
+ BinaryData bodyInBinaryData = BinaryData.fromObject(body);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ bodyInBinaryData.getLength();
+ JsonMergePatchHelper.getTestRunServerMetricConfigAccessor().prepareModelForJsonMergePatch(body, false);
+ return createOrUpdateServerMetricsConfigWithResponse(testRunId, bodyInBinaryData, requestOptions).getValue()
+ .toObject(TestRunServerMetricConfig.class);
+ }
+
+ /**
+ * Delete an existing load test run.
+ *
+ * Delete an existing load test run by providing the testRunId.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void deleteTestRun(String testRunId) {
+ // Generated convenience method for deleteTestRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ deleteTestRunWithResponse(testRunId, requestOptions).getValue();
+ }
+
+ /**
+ * Get associated app component (collection of azure resources) for the given test
+ * run.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return associated app component (collection of azure resources) for the given test
+ * run.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TestRunAppComponents getAppComponents(String testRunId) {
+ // Generated convenience method for getAppComponentsWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getAppComponentsWithResponse(testRunId, requestOptions).getValue().toObject(TestRunAppComponents.class);
+ }
+
+ /**
+ * Get associated server metrics configuration for the given test run.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return associated server metrics configuration for the given test run.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TestRunServerMetricConfig getServerMetricsConfig(String testRunId) {
+ // Generated convenience method for getServerMetricsConfigWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getServerMetricsConfigWithResponse(testRunId, requestOptions).getValue()
+ .toObject(TestRunServerMetricConfig.class);
+ }
+
+ /**
+ * Get test run details by test run Id.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return test run details by test run Id.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TestRun getTestRun(String testRunId) {
+ // Generated convenience method for getTestRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getTestRunWithResponse(testRunId, requestOptions).getValue().toObject(TestRun.class);
+ }
+
+ /**
+ * Get test run file by file name.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param fileName Name of the file.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return test run file by file name.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TestRunFileInfo getTestRunFile(String testRunId, String fileName) {
+ // Generated convenience method for getTestRunFileWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getTestRunFileWithResponse(testRunId, fileName, requestOptions).getValue()
+ .toObject(TestRunFileInfo.class);
+ }
+
+ /**
+ * List the dimension values for the given metric dimension name.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param name Dimension name.
+ * @param metricname Metric name.
+ * @param metricNamespace Metric namespace to query metric definitions for.
+ * @param timespan The timespan of the query. It is a string with the following format
+ * 'startDateTime_ISO/endDateTime_ISO'.
+ * @param interval The interval (i.e. timegrain) of the query.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return metrics dimension values.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DimensionValueList listMetricDimensionValues(String testRunId, String name, String metricname,
+ String metricNamespace, String timespan, TimeGrain interval) {
+ // Generated convenience method for listMetricDimensionValuesWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ if (interval != null) {
+ requestOptions.addQueryParam("interval", interval.toString(), false);
+ }
+ return listMetricDimensionValuesWithResponse(testRunId, name, metricname, metricNamespace, timespan,
+ requestOptions).getValue().toObject(DimensionValueList.class);
+ }
+
+ /**
+ * List the dimension values for the given metric dimension name.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param name Dimension name.
+ * @param metricname Metric name.
+ * @param metricNamespace Metric namespace to query metric definitions for.
+ * @param timespan The timespan of the query. It is a string with the following format
+ * 'startDateTime_ISO/endDateTime_ISO'.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return metrics dimension values.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DimensionValueList listMetricDimensionValues(String testRunId, String name, String metricname,
+ String metricNamespace, String timespan) {
+ // Generated convenience method for listMetricDimensionValuesWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return listMetricDimensionValuesWithResponse(testRunId, name, metricname, metricNamespace, timespan,
+ requestOptions).getValue().toObject(DimensionValueList.class);
}
/**
* List the metric definitions for a load test run.
- *
- * Response Body Schema
- *
- * {@code
- * {
- * value (Required): [
- * (Required){
- * dimensions (Optional): [
- * (Optional){
- * description: String (Optional)
- * name: String (Optional)
- * }
- * ]
- * description: String (Optional)
- * name: String (Optional)
- * namespace: String (Optional)
- * primaryAggregationType: String(Average/Count/None/Total/Percentile90/Percentile95/Percentile99) (Optional)
- * supportedAggregationTypes (Optional): [
- * String (Optional)
- * ]
- * unit: String(NotSpecified/Percent/Count/Seconds/Milliseconds/Bytes/BytesPerSecond/CountPerSecond) (Optional)
- * metricAvailabilities (Optional): [
- * (Optional){
- * timeGrain: String(PT5S/PT10S/PT1M/PT5M/PT1H) (Optional)
- * }
- * ]
- * }
- * ]
- * }
- * }
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
* @param metricNamespace Metric namespace to query metric definitions for.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return represents collection of metric definitions along with {@link Response}.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents collection of metric definitions.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getMetricDefinitionsWithResponse(String testRunId, String metricNamespace,
- RequestOptions requestOptions) {
- return this.serviceClient.getMetricDefinitionsWithResponse(testRunId, metricNamespace, requestOptions);
+ public MetricDefinitionCollection getMetricDefinitions(String testRunId, String metricNamespace) {
+ // Generated convenience method for getMetricDefinitionsWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getMetricDefinitionsWithResponse(testRunId, metricNamespace, requestOptions).getValue()
+ .toObject(MetricDefinitionCollection.class);
+ }
+
+ /**
+ * List the metric namespaces for a load test run.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents collection of metric namespaces.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public MetricNamespaceCollection getMetricNamespaces(String testRunId) {
+ // Generated convenience method for getMetricNamespacesWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getMetricNamespacesWithResponse(testRunId, requestOptions).getValue()
+ .toObject(MetricNamespaceCollection.class);
+ }
+
+ /**
+ * List the metric values for a load test run.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param metricname Metric name.
+ * @param metricNamespace Metric namespace to query metric definitions for.
+ * @param timespan The timespan of the query. It is a string with the following format
+ * 'startDateTime_ISO/endDateTime_ISO'.
+ * @param aggregation The aggregation.
+ * @param interval The interval (i.e. timegrain) of the query.
+ * @param body Metric dimension filter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response to a metrics query as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listMetrics(String testRunId, String metricname, String metricNamespace,
+ String timespan, String aggregation, TimeGrain interval, MetricRequestPayload body) {
+ // Generated convenience method for listMetrics
+ return new PagedIterable<>(
+ client.listMetrics(testRunId, metricname, metricNamespace, timespan, aggregation, interval, body));
+ }
+
+ /**
+ * List the metric values for a load test run.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param metricname Metric name.
+ * @param metricNamespace Metric namespace to query metric definitions for.
+ * @param timespan The timespan of the query. It is a string with the following format
+ * 'startDateTime_ISO/endDateTime_ISO'.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response to a metrics query as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listMetrics(String testRunId, String metricname, String metricNamespace,
+ String timespan) {
+ // Generated convenience method for listMetrics
+ return new PagedIterable<>(client.listMetrics(testRunId, metricname, metricNamespace, timespan));
+ }
+
+ /**
+ * Get all test runs for the given filters.
+ *
+ * @param orderBy Sort on the supported fields in (field asc/desc) format. eg: executedDateTime
+ * asc. Supported fields - executedDateTime.
+ * @param search Prefix based, case sensitive search on searchable fields - description,
+ * executedUser. For example, to search for a test run, with description 500 VUs,
+ * the search parameter can be 500.
+ * @param testId Unique name of an existing load test.
+ * @param executionFrom Start DateTime(RFC 3339 literal format) of test-run execution time filter range.
+ * @param executionTo End DateTime(RFC 3339 literal format) of test-run execution time filter range.
+ * @param status Comma separated list of test run status.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all test runs for the given filters as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listTestRuns(String orderBy, String search, String testId,
+ OffsetDateTime executionFrom, OffsetDateTime executionTo, String status) {
+ // Generated convenience method for listTestRuns
+ return new PagedIterable<>(client.listTestRuns(orderBy, search, testId, executionFrom, executionTo, status));
+ }
+
+ /**
+ * Get all test runs for the given filters.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all test runs for the given filters as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listTestRuns() {
+ // Generated convenience method for listTestRuns
+ return new PagedIterable<>(client.listTestRuns());
+ }
+
+ /**
+ * Stop test run by test run Id.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return load test run model.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TestRun stopTestRun(String testRunId) {
+ // Generated convenience method for stopTestRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return stopTestRunWithResponse(testRunId, requestOptions).getValue().toObject(TestRun.class);
}
}
diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClientBuilder.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClientBuilder.java
index 19b68e9cdf82c..f661c67e34fc1 100644
--- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClientBuilder.java
+++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClientBuilder.java
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
package com.azure.developer.loadtesting;
import com.azure.core.annotation.Generated;
@@ -11,7 +12,6 @@
import com.azure.core.client.traits.TokenCredentialTrait;
import com.azure.core.credential.TokenCredential;
import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaderName;
import com.azure.core.http.HttpHeaders;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
@@ -20,8 +20,8 @@
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.AddHeadersPolicy;
import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
-import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
+import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
@@ -34,7 +34,7 @@
import com.azure.core.util.builder.ClientBuilderUtil;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.serializer.JacksonAdapter;
-import com.azure.developer.loadtesting.implementation.LoadTestingClientImpl;
+import com.azure.developer.loadtesting.implementation.LoadTestRunClientImpl;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -47,7 +47,6 @@
public final class LoadTestRunClientBuilder
implements HttpTrait, ConfigurationTrait,
TokenCredentialTrait, EndpointTrait {
-
@Generated
private static final String SDK_NAME = "name";
@@ -57,6 +56,10 @@ public final class LoadTestRunClientBuilder
@Generated
private static final String[] DEFAULT_SCOPES = new String[] { "https://cnt-prod.loadtesting.azure.com/.default" };
+ @Generated
+ private static final Map PROPERTIES
+ = CoreUtils.getProperties("azure-developer-loadtesting.properties");
+
@Generated
private final List pipelinePolicies;
@@ -81,7 +84,7 @@ public LoadTestRunClientBuilder() {
@Override
public LoadTestRunClientBuilder pipeline(HttpPipeline pipeline) {
if (this.pipeline != null && pipeline == null) {
- LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured.");
+ LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured.");
}
this.pipeline = pipeline;
return this;
@@ -218,7 +221,7 @@ public LoadTestRunClientBuilder endpoint(String endpoint) {
/**
* Sets Service version.
- *
+ *
* @param serviceVersion the serviceVersion value.
* @return the LoadTestRunClientBuilder.
*/
@@ -236,7 +239,7 @@ public LoadTestRunClientBuilder serviceVersion(LoadTestingServiceVersion service
/**
* Sets The retry policy that will attempt to retry failed requests, if applicable.
- *
+ *
* @param retryPolicy the retryPolicy value.
* @return the LoadTestRunClientBuilder.
*/
@@ -247,20 +250,28 @@ public LoadTestRunClientBuilder retryPolicy(RetryPolicy retryPolicy) {
}
/**
- * Builds an instance of LoadTestingClientImpl with the provided parameters.
- *
- * @return an instance of LoadTestingClientImpl.
+ * Builds an instance of LoadTestRunClientImpl with the provided parameters.
+ *
+ * @return an instance of LoadTestRunClientImpl.
*/
@Generated
- private LoadTestingClientImpl buildInnerClient() {
+ private LoadTestRunClientImpl buildInnerClient() {
+ this.validateClient();
HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
LoadTestingServiceVersion localServiceVersion
= (serviceVersion != null) ? serviceVersion : LoadTestingServiceVersion.getLatest();
- LoadTestingClientImpl client = new LoadTestingClientImpl(localPipeline,
+ LoadTestRunClientImpl client = new LoadTestRunClientImpl(localPipeline,
JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion);
return client;
}
+ @Generated
+ private void validateClient() {
+ // This method is invoked from 'buildInnerClient'/'buildClient' method.
+ // Developer can customize this method, to validate that the necessary conditions are met for the new client.
+ Objects.requireNonNull(endpoint, "'endpoint' cannot be null.");
+ }
+
@Generated
private HttpPipeline createHttpPipeline() {
Configuration buildConfiguration
@@ -274,13 +285,12 @@ private HttpPipeline createHttpPipeline() {
policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration));
policies.add(new RequestIdPolicy());
policies.add(new AddHeadersFromContextPolicy());
- HttpHeaders headers = new HttpHeaders();
- localClientOptions.getHeaders()
- .forEach(header -> headers.set(HttpHeaderName.fromString(header.getName()), header.getValue()));
- if (headers.getSize() > 0) {
+ HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions);
+ if (headers != null) {
policies.add(new AddHeadersPolicy(headers));
}
- this.pipelinePolicies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ this.pipelinePolicies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
.forEach(p -> policies.add(p));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy()));
@@ -288,38 +298,37 @@ private HttpPipeline createHttpPipeline() {
if (tokenCredential != null) {
policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES));
}
- this.pipelinePolicies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ this.pipelinePolicies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.forEach(p -> policies.add(p));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(localHttpLogOptions));
HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0]))
- .httpClient(httpClient).clientOptions(localClientOptions).build();
+ .httpClient(httpClient)
+ .clientOptions(localClientOptions)
+ .build();
return httpPipeline;
}
/**
* Builds an instance of LoadTestRunAsyncClient class.
- *
+ *
* @return an instance of LoadTestRunAsyncClient.
*/
@Generated
public LoadTestRunAsyncClient buildAsyncClient() {
- return new LoadTestRunAsyncClient(buildInnerClient().getLoadTestRuns());
+ return new LoadTestRunAsyncClient(buildInnerClient());
}
/**
* Builds an instance of LoadTestRunClient class.
- *
+ *
* @return an instance of LoadTestRunClient.
*/
@Generated
public LoadTestRunClient buildClient() {
- return new LoadTestRunClient(buildInnerClient().getLoadTestRuns());
+ return new LoadTestRunClient(new LoadTestRunAsyncClient(buildInnerClient()));
}
- @Generated
- private static final Map PROPERTIES
- = CoreUtils.getProperties("azure-developer-loadtesting.properties");
-
private static final ClientLogger LOGGER = new ClientLogger(LoadTestRunClientBuilder.class);
}
diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestingServiceVersion.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestingServiceVersion.java
index 277cd8cc2f90d..4e81d338fee32 100644
--- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestingServiceVersion.java
+++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestingServiceVersion.java
@@ -1,19 +1,34 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.developer.loadtesting;
import com.azure.core.util.ServiceVersion;
/**
- * Service version of LoadTestingClient.
+ * Service version of Load TestingClient.
*/
public enum LoadTestingServiceVersion implements ServiceVersion {
/**
* Enum value 2022-11-01.
*/
- V2022_11_01("2022-11-01");
+ V2022_11_01("2022-11-01"),
+
+ /**
+ * Enum value 2023-04-01-preview.
+ */
+ V2023_04_01_PREVIEW("2023-04-01-preview"),
+
+ /**
+ * Enum value 2024-03-01-preview.
+ */
+ V2024_03_01_PREVIEW("2024-03-01-preview"),
+
+ /**
+ * Enum value 2024-05-01-preview.
+ */
+ V2024_05_01_PREVIEW("2024-05-01-preview");
private final String version;
@@ -35,6 +50,6 @@ public String getVersion() {
* @return The latest {@link LoadTestingServiceVersion}.
*/
public static LoadTestingServiceVersion getLatest() {
- return V2022_11_01;
+ return V2024_05_01_PREVIEW;
}
}
diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/PollingUtils.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/PollingUtils.java
deleted file mode 100644
index 32522f92163b6..0000000000000
--- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/PollingUtils.java
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-package com.azure.developer.loadtesting;
-
-import com.azure.core.util.BinaryData;
-import com.azure.core.util.polling.LongRunningOperationStatus;
-import com.azure.core.util.polling.PollResponse;
-import com.azure.json.JsonProviders;
-import com.azure.json.JsonReader;
-import reactor.core.publisher.Mono;
-
-import java.io.IOException;
-import java.util.Map;
-import java.util.concurrent.Callable;
-
-final class PollingUtils {
- static Mono> getPollResponseMono(Callable> pollOperation) {
- try {
- return Mono.just(pollOperation.call());
- } catch (Exception e) {
- return Mono.error(e);
- }
- }
-
- static PollResponse getValidationStatus(BinaryData fileBinary) throws RuntimeException {
- String validationStatus, fileType;
-
- try (JsonReader jsonReader = JsonProviders.createReader(fileBinary.toBytes())) {
- Map jsonTree = jsonReader.readMap(JsonReader::readUntyped);
-
- validationStatus = jsonTree.get("validationStatus").toString();
- fileType = jsonTree.get("fileType").toString();
- } catch (IOException e) {
- throw new RuntimeException("Encountered exception while retrieving validation status", e);
- }
-
- LongRunningOperationStatus lroStatus;
-
- switch (validationStatus) {
- case "VALIDATION_NOT_REQUIRED":
- case "VALIDATION_SUCCESS":
- lroStatus = LongRunningOperationStatus.SUCCESSFULLY_COMPLETED;
-
- break;
- case "VALIDATION_FAILURE":
- lroStatus = LongRunningOperationStatus.FAILED;
-
- break;
- case "VALIDATION_INITIATED":
- lroStatus = LongRunningOperationStatus.IN_PROGRESS;
-
- break;
- case "NOT_VALIDATED":
- if ("JMX_FILE".equalsIgnoreCase(fileType)) {
- lroStatus = LongRunningOperationStatus.NOT_STARTED;
- } else {
- lroStatus = LongRunningOperationStatus.SUCCESSFULLY_COMPLETED;
- }
-
- break;
- default:
- lroStatus = LongRunningOperationStatus.NOT_STARTED;
-
- break;
- }
-
- return new PollResponse<>(lroStatus, fileBinary);
- }
-
- static PollResponse getTestRunStatus(BinaryData testRunBinary) throws RuntimeException {
- String status;
-
- try (JsonReader jsonReader = JsonProviders.createReader(testRunBinary.toBytes())) {
- Map jsonTree = jsonReader.readMap(JsonReader::readUntyped);
-
- status = jsonTree.get("status").toString();
- } catch (IOException e) {
- throw new RuntimeException("Encountered exception while retrieving test run status", e);
- }
-
- LongRunningOperationStatus lroStatus;
-
- switch (status) {
- case "NOTSTARTED":
- lroStatus = LongRunningOperationStatus.NOT_STARTED;
-
- break;
- case "DONE":
- lroStatus = LongRunningOperationStatus.SUCCESSFULLY_COMPLETED;
-
- break;
- case "FAILED":
- lroStatus = LongRunningOperationStatus.FAILED;
-
- break;
- case "CANCELLED":
- lroStatus = LongRunningOperationStatus.USER_CANCELLED;
-
- break;
- default:
- lroStatus = LongRunningOperationStatus.IN_PROGRESS;
-
- break;
- }
-
- return new PollResponse<>(lroStatus, testRunBinary);
- }
-}
diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/TestProfileAdministrationAsyncClient.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/TestProfileAdministrationAsyncClient.java
new file mode 100644
index 0000000000000..a9c825839ae7e
--- /dev/null
+++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/TestProfileAdministrationAsyncClient.java
@@ -0,0 +1,383 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.developer.loadtesting;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.exception.ClientAuthenticationException;
+import com.azure.core.exception.HttpResponseException;
+import com.azure.core.exception.ResourceModifiedException;
+import com.azure.core.exception.ResourceNotFoundException;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.FluxUtil;
+import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper;
+import com.azure.developer.loadtesting.implementation.TestProfileAdministrationClientImpl;
+import com.azure.developer.loadtesting.models.TestProfile;
+import java.time.OffsetDateTime;
+import java.util.stream.Collectors;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * Initializes a new instance of the asynchronous TestProfileAdministrationClient type.
+ */
+@ServiceClient(builder = TestProfileAdministrationClientBuilder.class, isAsync = true)
+public final class TestProfileAdministrationAsyncClient {
+ @Generated
+ private final TestProfileAdministrationClientImpl serviceClient;
+
+ /**
+ * Initializes an instance of TestProfileAdministrationAsyncClient class.
+ *
+ * @param serviceClient the service client implementation.
+ */
+ @Generated
+ TestProfileAdministrationAsyncClient(TestProfileAdministrationClientImpl serviceClient) {
+ this.serviceClient = serviceClient;
+ }
+
+ /**
+ * Create a new test profile or update an existing test profile.
+ *
+ * Create a new test profile or update an existing test profile by providing the test profile Id.
+ * Request Body Schema
+ *
+ * {@code
+ * {
+ * testProfileId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
+ * testId: String (Optional)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ * {@code
+ * {
+ * testProfileId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
+ * testId: String (Optional)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric,
+ * underscore or hyphen characters.
+ * @param body The resource instance.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return test Profile Model along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> createOrUpdateTestProfileWithResponse(String testProfileId, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.createOrUpdateTestProfileWithResponseAsync(testProfileId, body, requestOptions);
+ }
+
+ /**
+ * Delete a test profile.
+ *
+ * Delete a test profile by its test profile Id.
+ *
+ * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric,
+ * underscore or hyphen characters.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> deleteTestProfileWithResponse(String testProfileId, RequestOptions requestOptions) {
+ return this.serviceClient.deleteTestProfileWithResponseAsync(testProfileId, requestOptions);
+ }
+
+ /**
+ * Get load test profile details.
+ *
+ * Get load test profile details by test profile Id.
+ * Response Body Schema
+ *
+ * {@code
+ * {
+ * testProfileId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
+ * testId: String (Optional)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric,
+ * underscore or hyphen characters.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return load test profile details.
+ *
+ * Get load test profile details by test profile Id along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getTestProfileWithResponse(String testProfileId, RequestOptions requestOptions) {
+ return this.serviceClient.getTestProfileWithResponseAsync(testProfileId, requestOptions);
+ }
+
+ /**
+ * List test profiles.
+ *
+ * Get all test profiles for the given filters.
+ * Query Parameters
+ *
+ * Query Parameters
+ * Name | Type | Required | Description |
+ * maxpagesize | Integer | No | Maximum number of results to include in a single
+ * response. |
+ * lastModifiedStartTime | OffsetDateTime | No | Start DateTime(RFC 3339 literal format)
+ * of the last updated time range to filter test profiles. |
+ * lastModifiedEndTime | OffsetDateTime | No | End DateTime(RFC 3339 literal format) of
+ * the last updated time range to filter test profiles. |
+ * testProfileIds | String | No | Comma separated list of IDs of the test profiles to
+ * filter. |
+ * testIds | String | No | Comma separated list IDs of the tests which should be
+ * associated with the test profiles to fetch. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ * {@code
+ * {
+ * testProfileId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
+ * testId: String (Optional)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TestProfile items as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTestProfiles(RequestOptions requestOptions) {
+ return this.serviceClient.listTestProfilesAsync(requestOptions);
+ }
+
+ /**
+ * Create a new test profile or update an existing test profile.
+ *
+ * Create a new test profile or update an existing test profile by providing the test profile Id.
+ *
+ * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric,
+ * underscore or hyphen characters.
+ * @param body The resource instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return test Profile Model on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createOrUpdateTestProfile(String testProfileId, TestProfile body) {
+ // Generated convenience method for createOrUpdateTestProfileWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getTestProfileAccessor().prepareModelForJsonMergePatch(body, true);
+ BinaryData bodyInBinaryData = BinaryData.fromObject(body);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ bodyInBinaryData.getLength();
+ JsonMergePatchHelper.getTestProfileAccessor().prepareModelForJsonMergePatch(body, false);
+ return createOrUpdateTestProfileWithResponse(testProfileId, bodyInBinaryData, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TestProfile.class));
+ }
+
+ /**
+ * Delete a test profile.
+ *
+ * Delete a test profile by its test profile Id.
+ *
+ * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric,
+ * underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono deleteTestProfile(String testProfileId) {
+ // Generated convenience method for deleteTestProfileWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return deleteTestProfileWithResponse(testProfileId, requestOptions).flatMap(FluxUtil::toMono);
+ }
+
+ /**
+ * Get load test profile details.
+ *
+ * Get load test profile details by test profile Id.
+ *
+ * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric,
+ * underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return load test profile details.
+ *
+ * Get load test profile details by test profile Id on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getTestProfile(String testProfileId) {
+ // Generated convenience method for getTestProfileWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getTestProfileWithResponse(testProfileId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TestProfile.class));
+ }
+
+ /**
+ * List test profiles.
+ *
+ * Get all test profiles for the given filters.
+ *
+ * @param lastModifiedStartTime Start DateTime(RFC 3339 literal format) of the last updated time range to filter
+ * test profiles.
+ * @param lastModifiedEndTime End DateTime(RFC 3339 literal format) of the last updated time range to filter test
+ * profiles.
+ * @param testProfileIds Comma separated list of IDs of the test profiles to filter.
+ * @param testIds Comma separated list IDs of the tests which should be associated with the test profiles to fetch.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TestProfile items as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTestProfiles(OffsetDateTime lastModifiedStartTime,
+ OffsetDateTime lastModifiedEndTime, String testProfileIds, String testIds) {
+ // Generated convenience method for listTestProfiles
+ RequestOptions requestOptions = new RequestOptions();
+ if (lastModifiedStartTime != null) {
+ requestOptions.addQueryParam("lastModifiedStartTime", String.valueOf(lastModifiedStartTime), false);
+ }
+ if (lastModifiedEndTime != null) {
+ requestOptions.addQueryParam("lastModifiedEndTime", String.valueOf(lastModifiedEndTime), false);
+ }
+ if (testProfileIds != null) {
+ requestOptions.addQueryParam("testProfileIds", testProfileIds, false);
+ }
+ if (testIds != null) {
+ requestOptions.addQueryParam("testIds", testIds, false);
+ }
+ PagedFlux pagedFluxResponse = listTestProfiles(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(TestProfile.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * List test profiles.
+ *
+ * Get all test profiles for the given filters.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TestProfile items as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTestProfiles() {
+ // Generated convenience method for listTestProfiles
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listTestProfiles(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(TestProfile.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+}
diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/TestProfileAdministrationClient.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/TestProfileAdministrationClient.java
new file mode 100644
index 0000000000000..b29b0b4b2b815
--- /dev/null
+++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/TestProfileAdministrationClient.java
@@ -0,0 +1,335 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.developer.loadtesting;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.exception.ClientAuthenticationException;
+import com.azure.core.exception.HttpResponseException;
+import com.azure.core.exception.ResourceModifiedException;
+import com.azure.core.exception.ResourceNotFoundException;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper;
+import com.azure.developer.loadtesting.models.TestProfile;
+import java.time.OffsetDateTime;
+
+/**
+ * Initializes a new instance of the synchronous TestProfileAdministrationClient type.
+ */
+@ServiceClient(builder = TestProfileAdministrationClientBuilder.class)
+public final class TestProfileAdministrationClient {
+ @Generated
+ private final TestProfileAdministrationAsyncClient client;
+
+ /**
+ * Initializes an instance of TestProfileAdministrationClient class.
+ *
+ * @param client the async client.
+ */
+ @Generated
+ TestProfileAdministrationClient(TestProfileAdministrationAsyncClient client) {
+ this.client = client;
+ }
+
+ /**
+ * Create a new test profile or update an existing test profile.
+ *
+ * Create a new test profile or update an existing test profile by providing the test profile Id.
+ * Request Body Schema
+ *
+ * {@code
+ * {
+ * testProfileId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
+ * testId: String (Optional)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ * {@code
+ * {
+ * testProfileId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
+ * testId: String (Optional)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric,
+ * underscore or hyphen characters.
+ * @param body The resource instance.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return test Profile Model along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateTestProfileWithResponse(String testProfileId, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.client.createOrUpdateTestProfileWithResponse(testProfileId, body, requestOptions).block();
+ }
+
+ /**
+ * Delete a test profile.
+ *
+ * Delete a test profile by its test profile Id.
+ *
+ * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric,
+ * underscore or hyphen characters.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteTestProfileWithResponse(String testProfileId, RequestOptions requestOptions) {
+ return this.client.deleteTestProfileWithResponse(testProfileId, requestOptions).block();
+ }
+
+ /**
+ * Get load test profile details.
+ *
+ * Get load test profile details by test profile Id.
+ * Response Body Schema
+ *
+ * {@code
+ * {
+ * testProfileId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
+ * testId: String (Optional)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric,
+ * underscore or hyphen characters.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return load test profile details.
+ *
+ * Get load test profile details by test profile Id along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getTestProfileWithResponse(String testProfileId, RequestOptions requestOptions) {
+ return this.client.getTestProfileWithResponse(testProfileId, requestOptions).block();
+ }
+
+ /**
+ * List test profiles.
+ *
+ * Get all test profiles for the given filters.
+ * Query Parameters
+ *
+ * Query Parameters
+ * Name | Type | Required | Description |
+ * maxpagesize | Integer | No | Maximum number of results to include in a single
+ * response. |
+ * lastModifiedStartTime | OffsetDateTime | No | Start DateTime(RFC 3339 literal format)
+ * of the last updated time range to filter test profiles. |
+ * lastModifiedEndTime | OffsetDateTime | No | End DateTime(RFC 3339 literal format) of
+ * the last updated time range to filter test profiles. |
+ * testProfileIds | String | No | Comma separated list of IDs of the test profiles to
+ * filter. |
+ * testIds | String | No | Comma separated list IDs of the tests which should be
+ * associated with the test profiles to fetch. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ * {@code
+ * {
+ * testProfileId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
+ * testId: String (Optional)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TestProfile items as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listTestProfiles(RequestOptions requestOptions) {
+ return new PagedIterable<>(this.client.listTestProfiles(requestOptions));
+ }
+
+ /**
+ * Create a new test profile or update an existing test profile.
+ *
+ * Create a new test profile or update an existing test profile by providing the test profile Id.
+ *
+ * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric,
+ * underscore or hyphen characters.
+ * @param body The resource instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return test Profile Model.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TestProfile createOrUpdateTestProfile(String testProfileId, TestProfile body) {
+ // Generated convenience method for createOrUpdateTestProfileWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getTestProfileAccessor().prepareModelForJsonMergePatch(body, true);
+ BinaryData bodyInBinaryData = BinaryData.fromObject(body);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ bodyInBinaryData.getLength();
+ JsonMergePatchHelper.getTestProfileAccessor().prepareModelForJsonMergePatch(body, false);
+ return createOrUpdateTestProfileWithResponse(testProfileId, bodyInBinaryData, requestOptions).getValue()
+ .toObject(TestProfile.class);
+ }
+
+ /**
+ * Delete a test profile.
+ *
+ * Delete a test profile by its test profile Id.
+ *
+ * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric,
+ * underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void deleteTestProfile(String testProfileId) {
+ // Generated convenience method for deleteTestProfileWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ deleteTestProfileWithResponse(testProfileId, requestOptions).getValue();
+ }
+
+ /**
+ * Get load test profile details.
+ *
+ * Get load test profile details by test profile Id.
+ *
+ * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric,
+ * underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return load test profile details.
+ *
+ * Get load test profile details by test profile Id.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TestProfile getTestProfile(String testProfileId) {
+ // Generated convenience method for getTestProfileWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getTestProfileWithResponse(testProfileId, requestOptions).getValue().toObject(TestProfile.class);
+ }
+
+ /**
+ * List test profiles.
+ *
+ * Get all test profiles for the given filters.
+ *
+ * @param lastModifiedStartTime Start DateTime(RFC 3339 literal format) of the last updated time range to filter
+ * test profiles.
+ * @param lastModifiedEndTime End DateTime(RFC 3339 literal format) of the last updated time range to filter test
+ * profiles.
+ * @param testProfileIds Comma separated list of IDs of the test profiles to filter.
+ * @param testIds Comma separated list IDs of the tests which should be associated with the test profiles to fetch.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TestProfile items as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listTestProfiles(OffsetDateTime lastModifiedStartTime,
+ OffsetDateTime lastModifiedEndTime, String testProfileIds, String testIds) {
+ // Generated convenience method for listTestProfiles
+ return new PagedIterable<>(
+ client.listTestProfiles(lastModifiedStartTime, lastModifiedEndTime, testProfileIds, testIds));
+ }
+
+ /**
+ * List test profiles.
+ *
+ * Get all test profiles for the given filters.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TestProfile items as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listTestProfiles() {
+ // Generated convenience method for listTestProfiles
+ return new PagedIterable<>(client.listTestProfiles());
+ }
+}
diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/TestProfileAdministrationClientBuilder.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/TestProfileAdministrationClientBuilder.java
new file mode 100644
index 0000000000000..39505f1c1d88a
--- /dev/null
+++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/TestProfileAdministrationClientBuilder.java
@@ -0,0 +1,336 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.developer.loadtesting;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.ServiceClientBuilder;
+import com.azure.core.client.traits.ConfigurationTrait;
+import com.azure.core.client.traits.EndpointTrait;
+import com.azure.core.client.traits.HttpTrait;
+import com.azure.core.client.traits.TokenCredentialTrait;
+import com.azure.core.credential.TokenCredential;
+import com.azure.core.http.HttpClient;
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
+import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.AddHeadersFromContextPolicy;
+import com.azure.core.http.policy.AddHeadersPolicy;
+import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
+import com.azure.core.http.policy.HttpLoggingPolicy;
+import com.azure.core.http.policy.HttpLogOptions;
+import com.azure.core.http.policy.HttpPipelinePolicy;
+import com.azure.core.http.policy.HttpPolicyProviders;
+import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryOptions;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.util.ClientOptions;
+import com.azure.core.util.Configuration;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.builder.ClientBuilderUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.serializer.JacksonAdapter;
+import com.azure.developer.loadtesting.implementation.TestProfileAdministrationClientImpl;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * A builder for creating a new instance of the TestProfileAdministrationClient type.
+ */
+@ServiceClientBuilder(
+ serviceClients = { TestProfileAdministrationClient.class, TestProfileAdministrationAsyncClient.class })
+public final class TestProfileAdministrationClientBuilder implements HttpTrait,
+ ConfigurationTrait,
+ TokenCredentialTrait,
+ EndpointTrait {
+ @Generated
+ private static final String SDK_NAME = "name";
+
+ @Generated
+ private static final String SDK_VERSION = "version";
+
+ @Generated
+ private static final String[] DEFAULT_SCOPES = new String[] { "https://cnt-prod.loadtesting.azure.com/.default" };
+
+ @Generated
+ private static final Map PROPERTIES
+ = CoreUtils.getProperties("azure-developer-loadtesting.properties");
+
+ @Generated
+ private final List pipelinePolicies;
+
+ /**
+ * Create an instance of the TestProfileAdministrationClientBuilder.
+ */
+ @Generated
+ public TestProfileAdministrationClientBuilder() {
+ this.pipelinePolicies = new ArrayList<>();
+ }
+
+ /*
+ * The HTTP pipeline to send requests through.
+ */
+ @Generated
+ private HttpPipeline pipeline;
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Generated
+ @Override
+ public TestProfileAdministrationClientBuilder pipeline(HttpPipeline pipeline) {
+ if (this.pipeline != null && pipeline == null) {
+ LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured.");
+ }
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /*
+ * The HTTP client used to send the request.
+ */
+ @Generated
+ private HttpClient httpClient;
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Generated
+ @Override
+ public TestProfileAdministrationClientBuilder httpClient(HttpClient httpClient) {
+ this.httpClient = httpClient;
+ return this;
+ }
+
+ /*
+ * The logging configuration for HTTP requests and responses.
+ */
+ @Generated
+ private HttpLogOptions httpLogOptions;
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Generated
+ @Override
+ public TestProfileAdministrationClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = httpLogOptions;
+ return this;
+ }
+
+ /*
+ * The client options such as application ID and custom headers to set on a request.
+ */
+ @Generated
+ private ClientOptions clientOptions;
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Generated
+ @Override
+ public TestProfileAdministrationClientBuilder clientOptions(ClientOptions clientOptions) {
+ this.clientOptions = clientOptions;
+ return this;
+ }
+
+ /*
+ * The retry options to configure retry policy for failed requests.
+ */
+ @Generated
+ private RetryOptions retryOptions;
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Generated
+ @Override
+ public TestProfileAdministrationClientBuilder retryOptions(RetryOptions retryOptions) {
+ this.retryOptions = retryOptions;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Generated
+ @Override
+ public TestProfileAdministrationClientBuilder addPolicy(HttpPipelinePolicy customPolicy) {
+ Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null.");
+ pipelinePolicies.add(customPolicy);
+ return this;
+ }
+
+ /*
+ * The configuration store that is used during construction of the service client.
+ */
+ @Generated
+ private Configuration configuration;
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Generated
+ @Override
+ public TestProfileAdministrationClientBuilder configuration(Configuration configuration) {
+ this.configuration = configuration;
+ return this;
+ }
+
+ /*
+ * The TokenCredential used for authentication.
+ */
+ @Generated
+ private TokenCredential tokenCredential;
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Generated
+ @Override
+ public TestProfileAdministrationClientBuilder credential(TokenCredential tokenCredential) {
+ this.tokenCredential = tokenCredential;
+ return this;
+ }
+
+ /*
+ * The service endpoint
+ */
+ @Generated
+ private String endpoint;
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Generated
+ @Override
+ public TestProfileAdministrationClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * Service version
+ */
+ @Generated
+ private LoadTestingServiceVersion serviceVersion;
+
+ /**
+ * Sets Service version.
+ *
+ * @param serviceVersion the serviceVersion value.
+ * @return the TestProfileAdministrationClientBuilder.
+ */
+ @Generated
+ public TestProfileAdministrationClientBuilder serviceVersion(LoadTestingServiceVersion serviceVersion) {
+ this.serviceVersion = serviceVersion;
+ return this;
+ }
+
+ /*
+ * The retry policy that will attempt to retry failed requests, if applicable.
+ */
+ @Generated
+ private RetryPolicy retryPolicy;
+
+ /**
+ * Sets The retry policy that will attempt to retry failed requests, if applicable.
+ *
+ * @param retryPolicy the retryPolicy value.
+ * @return the TestProfileAdministrationClientBuilder.
+ */
+ @Generated
+ public TestProfileAdministrationClientBuilder retryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = retryPolicy;
+ return this;
+ }
+
+ /**
+ * Builds an instance of TestProfileAdministrationClientImpl with the provided parameters.
+ *
+ * @return an instance of TestProfileAdministrationClientImpl.
+ */
+ @Generated
+ private TestProfileAdministrationClientImpl buildInnerClient() {
+ this.validateClient();
+ HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
+ LoadTestingServiceVersion localServiceVersion
+ = (serviceVersion != null) ? serviceVersion : LoadTestingServiceVersion.getLatest();
+ TestProfileAdministrationClientImpl client = new TestProfileAdministrationClientImpl(localPipeline,
+ JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion);
+ return client;
+ }
+
+ @Generated
+ private void validateClient() {
+ // This method is invoked from 'buildInnerClient'/'buildClient' method.
+ // Developer can customize this method, to validate that the necessary conditions are met for the new client.
+ Objects.requireNonNull(endpoint, "'endpoint' cannot be null.");
+ }
+
+ @Generated
+ private HttpPipeline createHttpPipeline() {
+ Configuration buildConfiguration
+ = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration;
+ HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions;
+ ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions;
+ List policies = new ArrayList<>();
+ String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName");
+ String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
+ String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions);
+ policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration));
+ policies.add(new RequestIdPolicy());
+ policies.add(new AddHeadersFromContextPolicy());
+ HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions);
+ if (headers != null) {
+ policies.add(new AddHeadersPolicy(headers));
+ }
+ this.pipelinePolicies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .forEach(p -> policies.add(p));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy()));
+ policies.add(new AddDatePolicy());
+ if (tokenCredential != null) {
+ policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES));
+ }
+ this.pipelinePolicies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .forEach(p -> policies.add(p));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(localHttpLogOptions));
+ HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .httpClient(httpClient)
+ .clientOptions(localClientOptions)
+ .build();
+ return httpPipeline;
+ }
+
+ /**
+ * Builds an instance of TestProfileAdministrationAsyncClient class.
+ *
+ * @return an instance of TestProfileAdministrationAsyncClient.
+ */
+ @Generated
+ public TestProfileAdministrationAsyncClient buildAsyncClient() {
+ return new TestProfileAdministrationAsyncClient(buildInnerClient());
+ }
+
+ /**
+ * Builds an instance of TestProfileAdministrationClient class.
+ *
+ * @return an instance of TestProfileAdministrationClient.
+ */
+ @Generated
+ public TestProfileAdministrationClient buildClient() {
+ return new TestProfileAdministrationClient(new TestProfileAdministrationAsyncClient(buildInnerClient()));
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(TestProfileAdministrationClientBuilder.class);
+}
diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/TestProfileRunAsyncClient.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/TestProfileRunAsyncClient.java
new file mode 100644
index 0000000000000..5c833a174ef5a
--- /dev/null
+++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/TestProfileRunAsyncClient.java
@@ -0,0 +1,611 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.developer.loadtesting;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.exception.ClientAuthenticationException;
+import com.azure.core.exception.HttpResponseException;
+import com.azure.core.exception.ResourceModifiedException;
+import com.azure.core.exception.ResourceNotFoundException;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.FluxUtil;
+import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper;
+import com.azure.developer.loadtesting.implementation.TestProfileRunClientImpl;
+import com.azure.developer.loadtesting.models.TestProfileRun;
+import java.time.OffsetDateTime;
+import java.util.stream.Collectors;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * Initializes a new instance of the asynchronous TestProfileRunClient type.
+ */
+@ServiceClient(builder = TestProfileRunClientBuilder.class, isAsync = true)
+public final class TestProfileRunAsyncClient {
+ @Generated
+ private final TestProfileRunClientImpl serviceClient;
+
+ /**
+ * Initializes an instance of TestProfileRunAsyncClient class.
+ *
+ * @param serviceClient the service client implementation.
+ */
+ @Generated
+ TestProfileRunAsyncClient(TestProfileRunClientImpl serviceClient) {
+ this.serviceClient = serviceClient;
+ }
+
+ /**
+ * Create and start a new test profile run.
+ *
+ * Create and start a new test profile run with the given test profile run Id.
+ * Request Body Schema
+ *
+ * {@code
+ * {
+ * testProfileRunId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
+ * testProfileId: String (Optional)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional)
+ * errorDetails (Optional): [
+ * (Optional){
+ * message: String (Optional)
+ * }
+ * ]
+ * startDateTime: OffsetDateTime (Optional)
+ * endDateTime: OffsetDateTime (Optional)
+ * durationInSeconds: Long (Optional)
+ * testRunDetails (Optional): {
+ * String (Required): {
+ * status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Required)
+ * configurationId: String (Required)
+ * properties (Required): {
+ * String: String (Required)
+ * }
+ * }
+ * }
+ * recommendations (Optional): [
+ * (Optional){
+ * category: String(ThroughputOptimized/CostOptimized) (Required)
+ * configurations (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * ]
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ * {@code
+ * {
+ * testProfileRunId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
+ * testProfileId: String (Optional)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional)
+ * errorDetails (Optional): [
+ * (Optional){
+ * message: String (Optional)
+ * }
+ * ]
+ * startDateTime: OffsetDateTime (Optional)
+ * endDateTime: OffsetDateTime (Optional)
+ * durationInSeconds: Long (Optional)
+ * testRunDetails (Optional): {
+ * String (Required): {
+ * status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Required)
+ * configurationId: String (Required)
+ * properties (Required): {
+ * String: String (Required)
+ * }
+ * }
+ * }
+ * recommendations (Optional): [
+ * (Optional){
+ * category: String(ThroughputOptimized/CostOptimized) (Required)
+ * configurations (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * ]
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param body The resource instance.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return test Profile Run model along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> createOrUpdateTestProfileRunWithResponse(String testProfileRunId, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.createOrUpdateTestProfileRunWithResponseAsync(testProfileRunId, body, requestOptions);
+ }
+
+ /**
+ * Delete an existing load test profile run.
+ *
+ * Delete an existing load test profile run by providing the test profile run Id.
+ *
+ * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> deleteTestProfileRunWithResponse(String testProfileRunId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.deleteTestProfileRunWithResponseAsync(testProfileRunId, requestOptions);
+ }
+
+ /**
+ * Get test profile run details.
+ *
+ * Get test profile run details by test profile run Id.
+ * Response Body Schema
+ *
+ * {@code
+ * {
+ * testProfileRunId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
+ * testProfileId: String (Optional)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional)
+ * errorDetails (Optional): [
+ * (Optional){
+ * message: String (Optional)
+ * }
+ * ]
+ * startDateTime: OffsetDateTime (Optional)
+ * endDateTime: OffsetDateTime (Optional)
+ * durationInSeconds: Long (Optional)
+ * testRunDetails (Optional): {
+ * String (Required): {
+ * status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Required)
+ * configurationId: String (Required)
+ * properties (Required): {
+ * String: String (Required)
+ * }
+ * }
+ * }
+ * recommendations (Optional): [
+ * (Optional){
+ * category: String(ThroughputOptimized/CostOptimized) (Required)
+ * configurations (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * ]
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return test profile run details.
+ *
+ * Get test profile run details by test profile run Id along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getTestProfileRunWithResponse(String testProfileRunId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getTestProfileRunWithResponseAsync(testProfileRunId, requestOptions);
+ }
+
+ /**
+ * List test profile runs.
+ *
+ * Get all test profile runs for the given filters.
+ * Query Parameters
+ *
+ * Query Parameters
+ * Name | Type | Required | Description |
+ * maxpagesize | Integer | No | Maximum number of results to include in a single
+ * response. |
+ * minStartDateTime | OffsetDateTime | No | Minimum Start DateTime(RFC 3339 literal
+ * format) of the test profile runs to filter on. |
+ * maxStartDateTime | OffsetDateTime | No | Maximum Start DateTime(RFC 3339 literal
+ * format) of the test profile runs to filter on. |
+ * minEndDateTime | OffsetDateTime | No | Minimum End DateTime(RFC 3339 literal format) of
+ * the test profile runs to filter on. |
+ * maxEndDateTime | OffsetDateTime | No | Maximum End DateTime(RFC 3339 literal format) of
+ * the test profile runs to filter on. |
+ * createdDateStartTime | OffsetDateTime | No | Start DateTime(RFC 3339 literal format) of
+ * the created time range to filter test profile runs. |
+ * createdDateEndTime | OffsetDateTime | No | End DateTime(RFC 3339 literal format) of the
+ * created time range to filter test profile runs. |
+ * testProfileRunIds | String | No | Comma separated list of IDs of the test profile runs
+ * to filter. |
+ * testProfileIds | String | No | Comma separated IDs of the test profiles which should be
+ * associated with the test profile runs to fetch. |
+ * statuses | String | No | Comma separated list of Statuses of the test profile runs to
+ * filter. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ * {@code
+ * {
+ * testProfileRunId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
+ * testProfileId: String (Optional)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional)
+ * errorDetails (Optional): [
+ * (Optional){
+ * message: String (Optional)
+ * }
+ * ]
+ * startDateTime: OffsetDateTime (Optional)
+ * endDateTime: OffsetDateTime (Optional)
+ * durationInSeconds: Long (Optional)
+ * testRunDetails (Optional): {
+ * String (Required): {
+ * status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Required)
+ * configurationId: String (Required)
+ * properties (Required): {
+ * String: String (Required)
+ * }
+ * }
+ * }
+ * recommendations (Optional): [
+ * (Optional){
+ * category: String(ThroughputOptimized/CostOptimized) (Required)
+ * configurations (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * ]
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TestProfileRun items as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTestProfileRuns(RequestOptions requestOptions) {
+ return this.serviceClient.listTestProfileRunsAsync(requestOptions);
+ }
+
+ /**
+ * Stop test profile run.
+ *
+ * Stop test profile run for the given test profile run Id.
+ * Response Body Schema
+ *
+ * {@code
+ * {
+ * testProfileRunId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
+ * testProfileId: String (Optional)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional)
+ * errorDetails (Optional): [
+ * (Optional){
+ * message: String (Optional)
+ * }
+ * ]
+ * startDateTime: OffsetDateTime (Optional)
+ * endDateTime: OffsetDateTime (Optional)
+ * durationInSeconds: Long (Optional)
+ * testRunDetails (Optional): {
+ * String (Required): {
+ * status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Required)
+ * configurationId: String (Required)
+ * properties (Required): {
+ * String: String (Required)
+ * }
+ * }
+ * }
+ * recommendations (Optional): [
+ * (Optional){
+ * category: String(ThroughputOptimized/CostOptimized) (Required)
+ * configurations (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * ]
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return test Profile Run model along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> stopTestProfileRunWithResponse(String testProfileRunId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.stopTestProfileRunWithResponseAsync(testProfileRunId, requestOptions);
+ }
+
+ /**
+ * Create and start a new test profile run.
+ *
+ * Create and start a new test profile run with the given test profile run Id.
+ *
+ * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param body The resource instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return test Profile Run model on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createOrUpdateTestProfileRun(String testProfileRunId, TestProfileRun body) {
+ // Generated convenience method for createOrUpdateTestProfileRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getTestProfileRunAccessor().prepareModelForJsonMergePatch(body, true);
+ BinaryData bodyInBinaryData = BinaryData.fromObject(body);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ bodyInBinaryData.getLength();
+ JsonMergePatchHelper.getTestProfileRunAccessor().prepareModelForJsonMergePatch(body, false);
+ return createOrUpdateTestProfileRunWithResponse(testProfileRunId, bodyInBinaryData, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TestProfileRun.class));
+ }
+
+ /**
+ * Delete an existing load test profile run.
+ *
+ * Delete an existing load test profile run by providing the test profile run Id.
+ *
+ * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono deleteTestProfileRun(String testProfileRunId) {
+ // Generated convenience method for deleteTestProfileRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return deleteTestProfileRunWithResponse(testProfileRunId, requestOptions).flatMap(FluxUtil::toMono);
+ }
+
+ /**
+ * Get test profile run details.
+ *
+ * Get test profile run details by test profile run Id.
+ *
+ * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return test profile run details.
+ *
+ * Get test profile run details by test profile run Id on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getTestProfileRun(String testProfileRunId) {
+ // Generated convenience method for getTestProfileRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getTestProfileRunWithResponse(testProfileRunId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TestProfileRun.class));
+ }
+
+ /**
+ * List test profile runs.
+ *
+ * Get all test profile runs for the given filters.
+ *
+ * @param minStartDateTime Minimum Start DateTime(RFC 3339 literal format) of the test profile runs to filter on.
+ * @param maxStartDateTime Maximum Start DateTime(RFC 3339 literal format) of the test profile runs to filter on.
+ * @param minEndDateTime Minimum End DateTime(RFC 3339 literal format) of the test profile runs to filter on.
+ * @param maxEndDateTime Maximum End DateTime(RFC 3339 literal format) of the test profile runs to filter on.
+ * @param createdDateStartTime Start DateTime(RFC 3339 literal format) of the created time range to filter test
+ * profile runs.
+ * @param createdDateEndTime End DateTime(RFC 3339 literal format) of the created time range to filter test profile
+ * runs.
+ * @param testProfileRunIds Comma separated list of IDs of the test profile runs to filter.
+ * @param testProfileIds Comma separated IDs of the test profiles which should be associated with the test profile
+ * runs to fetch.
+ * @param statuses Comma separated list of Statuses of the test profile runs to filter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TestProfileRun items as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTestProfileRuns(OffsetDateTime minStartDateTime,
+ OffsetDateTime maxStartDateTime, OffsetDateTime minEndDateTime, OffsetDateTime maxEndDateTime,
+ OffsetDateTime createdDateStartTime, OffsetDateTime createdDateEndTime, String testProfileRunIds,
+ String testProfileIds, String statuses) {
+ // Generated convenience method for listTestProfileRuns
+ RequestOptions requestOptions = new RequestOptions();
+ if (minStartDateTime != null) {
+ requestOptions.addQueryParam("minStartDateTime", String.valueOf(minStartDateTime), false);
+ }
+ if (maxStartDateTime != null) {
+ requestOptions.addQueryParam("maxStartDateTime", String.valueOf(maxStartDateTime), false);
+ }
+ if (minEndDateTime != null) {
+ requestOptions.addQueryParam("minEndDateTime", String.valueOf(minEndDateTime), false);
+ }
+ if (maxEndDateTime != null) {
+ requestOptions.addQueryParam("maxEndDateTime", String.valueOf(maxEndDateTime), false);
+ }
+ if (createdDateStartTime != null) {
+ requestOptions.addQueryParam("createdDateStartTime", String.valueOf(createdDateStartTime), false);
+ }
+ if (createdDateEndTime != null) {
+ requestOptions.addQueryParam("createdDateEndTime", String.valueOf(createdDateEndTime), false);
+ }
+ if (testProfileRunIds != null) {
+ requestOptions.addQueryParam("testProfileRunIds", testProfileRunIds, false);
+ }
+ if (testProfileIds != null) {
+ requestOptions.addQueryParam("testProfileIds", testProfileIds, false);
+ }
+ if (statuses != null) {
+ requestOptions.addQueryParam("statuses", statuses, false);
+ }
+ PagedFlux