Skip to content

Commit 6d67109

Browse files
author
SDKAuto
committed
CodeGen from PR 29440 in Azure/azure-rest-api-specs
Merge 495ee87e131eed7c14f3033a79d38449b223307a into 7bf13ef1c776f6d973b9645906281d0ec4660fc8
1 parent e798d47 commit 6d67109

20 files changed

Lines changed: 2730 additions & 2680 deletions

sdk/loadtesting/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
2-
2+
33
trigger:
44
branches:
55
include:
@@ -19,6 +19,8 @@ pr:
1919
- feature/*
2020
- release/*
2121
- hotfix/*
22+
exclude:
23+
- feature/v4
2224
paths:
2325
include:
2426
- sdk/loadtesting/
Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,31 @@
11
{
22
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
33
"mainEntryPointFilePath": "./types/src/index.d.ts",
4-
"docModel": { "enabled": true },
5-
"apiReport": { "enabled": true, "reportFolder": "./review" },
4+
"docModel": {
5+
"enabled": true
6+
},
7+
"apiReport": {
8+
"enabled": true,
9+
"reportFolder": "./review"
10+
},
611
"dtsRollup": {
712
"enabled": true,
813
"untrimmedFilePath": "",
914
"publicTrimmedFilePath": "./types/load-testing.d.ts"
1015
},
1116
"messages": {
12-
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
17+
"tsdocMessageReporting": {
18+
"default": {
19+
"logLevel": "none"
20+
}
21+
},
1322
"extractorMessageReporting": {
14-
"ae-missing-release-tag": { "logLevel": "none" },
15-
"ae-unresolved-link": { "logLevel": "none" }
23+
"ae-missing-release-tag": {
24+
"logLevel": "none"
25+
},
26+
"ae-unresolved-link": {
27+
"logLevel": "none"
28+
}
1629
}
1730
}
18-
}
31+
}

sdk/loadtesting/load-testing-rest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,4 @@
131131
"browser": {
132132
"./dist-esm/test/public/utils/env.js": "./dist-esm/test/public/utils/env.browser.js"
133133
}
134-
}
134+
}

sdk/loadtesting/load-testing-rest/review/load-testing.api.md

Lines changed: 992 additions & 943 deletions
Large diffs are not rendered by default.

sdk/loadtesting/load-testing-rest/src/azureLoadTesting.ts

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,24 @@
22
// Licensed under the MIT license.
33

44
import { getClient, ClientOptions } from "@azure-rest/core-client";
5+
import { logger } from "./logger.js";
56
import { TokenCredential } from "@azure/core-auth";
6-
import { AzureLoadTestingClient } from "./clientDefinitions";
7+
import { AzureLoadTestingClient } from "./clientDefinitions.js";
78

89
/**
9-
* Initialize a new instance of the class AzureLoadTestingClient class.
10-
* @param Endpoint type: string URL to perform data plane API operations on the resource.
11-
* @param credentials type: TokenCredential
10+
* Initialize a new instance of `AzureLoadTestingClient`
11+
* @param endpointParam - A sequence of textual characters.
12+
* @param credentials - uniquely identify client credential
13+
* @param options - the parameter for all optional parameters
1214
*/
1315
export default function createClient(
14-
Endpoint: string,
16+
endpointParam: string,
1517
credentials: TokenCredential,
1618
options: ClientOptions = {},
1719
): AzureLoadTestingClient {
18-
const baseUrl = options.baseUrl ?? `https://${Endpoint}`;
19-
options.apiVersion = options.apiVersion ?? "2022-11-01";
20-
options = {
21-
...options,
22-
credentials: {
23-
scopes: ["https://cnt-prod.loadtesting.azure.com/.default"],
24-
},
25-
};
26-
20+
const endpointUrl =
21+
options.endpoint ?? options.baseUrl ?? `https://${endpointParam}`;
22+
options.apiVersion = options.apiVersion ?? "2024-03-01-preview";
2723
const userAgentInfo = `azsdk-js-load-testing-rest/1.0.1`;
2824
const userAgentPrefix =
2925
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
@@ -34,9 +30,21 @@ export default function createClient(
3430
userAgentOptions: {
3531
userAgentPrefix,
3632
},
33+
loggingOptions: {
34+
logger: options.loggingOptions?.logger ?? logger.info,
35+
},
36+
credentials: {
37+
scopes: options.credentials?.scopes ?? [
38+
"https://cnt-prod.loadtesting.azure.com/.default",
39+
],
40+
},
3741
};
3842

39-
const client = getClient(baseUrl, credentials, options) as AzureLoadTestingClient;
43+
const client = getClient(
44+
endpointUrl,
45+
credentials,
46+
options,
47+
) as AzureLoadTestingClient;
4048

4149
return client;
4250
}

0 commit comments

Comments
 (0)