@azure/arm-loadtesting 1.0.0-alpha.20221124.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/index.js +2209 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/samples-dev/loadTestsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/loadTestsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/loadTestsCreateOrUpdateSample.js +49 -0
- package/dist-esm/samples-dev/loadTestsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/loadTestsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/loadTestsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/loadTestsDeleteSample.js +31 -0
- package/dist-esm/samples-dev/loadTestsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/loadTestsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/loadTestsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/loadTestsGetSample.js +31 -0
- package/dist-esm/samples-dev/loadTestsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/loadTestsListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/loadTestsListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/loadTestsListByResourceGroupSample.js +44 -0
- package/dist-esm/samples-dev/loadTestsListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/loadTestsListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/loadTestsListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/loadTestsListBySubscriptionSample.js +43 -0
- package/dist-esm/samples-dev/loadTestsListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/loadTestsListOutboundNetworkDependenciesEndpointsSample.d.ts +2 -0
- package/dist-esm/samples-dev/loadTestsListOutboundNetworkDependenciesEndpointsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/loadTestsListOutboundNetworkDependenciesEndpointsSample.js +45 -0
- package/dist-esm/samples-dev/loadTestsListOutboundNetworkDependenciesEndpointsSample.js.map +1 -0
- package/dist-esm/samples-dev/loadTestsUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/loadTestsUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/loadTestsUpdateSample.js +45 -0
- package/dist-esm/samples-dev/loadTestsUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +43 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/quotasCheckAvailabilitySample.d.ts +2 -0
- package/dist-esm/samples-dev/quotasCheckAvailabilitySample.d.ts.map +1 -0
- package/dist-esm/samples-dev/quotasCheckAvailabilitySample.js +37 -0
- package/dist-esm/samples-dev/quotasCheckAvailabilitySample.js.map +1 -0
- package/dist-esm/samples-dev/quotasGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/quotasGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/quotasGetSample.js +31 -0
- package/dist-esm/samples-dev/quotasGetSample.js.map +1 -0
- package/dist-esm/samples-dev/quotasListSample.d.ts +2 -0
- package/dist-esm/samples-dev/quotasListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/quotasListSample.js +44 -0
- package/dist-esm/samples-dev/quotasListSample.js.map +1 -0
- package/dist-esm/src/index.d.ts +6 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +13 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/loadTestClient.d.ts +22 -0
- package/dist-esm/src/loadTestClient.d.ts.map +1 -0
- package/dist-esm/src/loadTestClient.js +102 -0
- package/dist-esm/src/loadTestClient.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +568 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +68 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +30 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +800 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +15 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +136 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +4 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +11 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/loadTests.d.ts +132 -0
- package/dist-esm/src/operations/loadTests.d.ts.map +1 -0
- package/dist-esm/src/operations/loadTests.js +661 -0
- package/dist-esm/src/operations/loadTests.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +132 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/quotas.d.ts +50 -0
- package/dist-esm/src/operations/quotas.d.ts.map +1 -0
- package/dist-esm/src/operations/quotas.js +207 -0
- package/dist-esm/src/operations/quotas.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +4 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +11 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/loadTests.d.ts +78 -0
- package/dist-esm/src/operationsInterfaces/loadTests.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/loadTests.js +9 -0
- package/dist-esm/src/operationsInterfaces/loadTests.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/quotas.d.ts +27 -0
- package/dist-esm/src/operationsInterfaces/quotas.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/quotas.js +9 -0
- package/dist-esm/src/operationsInterfaces/quotas.js.map +1 -0
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/test/loadtesting_example.spec.d.ts +4 -0
- package/dist-esm/test/loadtesting_example.spec.d.ts.map +1 -0
- package/dist-esm/test/loadtesting_example.spec.js +108 -0
- package/dist-esm/test/loadtesting_example.spec.js.map +1 -0
- package/package.json +122 -0
- package/review/arm-loadtesting.api.md +437 -0
- package/rollup.config.js +122 -0
- package/src/index.ts +13 -0
- package/src/loadTestClient.ts +144 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +645 -0
- package/src/models/mappers.ts +855 -0
- package/src/models/parameters.ts +158 -0
- package/src/operations/index.ts +11 -0
- package/src/operations/loadTests.ts +887 -0
- package/src/operations/operations.ts +150 -0
- package/src/operations/quotas.ts +258 -0
- package/src/operationsInterfaces/index.ts +11 -0
- package/src/operationsInterfaces/loadTests.ts +152 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/quotas.ts +56 -0
- package/src/pagingHelper.ts +39 -0
- package/tsconfig.json +33 -0
- package/types/arm-loadtesting.d.ts +781 -0
- package/types/tsdoc-metadata.json +11 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
11
|
+
import { Operations } from "../operationsInterfaces";
|
|
12
|
+
import * as coreClient from "@azure/core-client";
|
|
13
|
+
import * as Mappers from "../models/mappers";
|
|
14
|
+
import * as Parameters from "../models/parameters";
|
|
15
|
+
import { LoadTestClient } from "../loadTestClient";
|
|
16
|
+
import {
|
|
17
|
+
Operation,
|
|
18
|
+
OperationsListNextOptionalParams,
|
|
19
|
+
OperationsListOptionalParams,
|
|
20
|
+
OperationsListResponse,
|
|
21
|
+
OperationsListNextResponse
|
|
22
|
+
} from "../models";
|
|
23
|
+
|
|
24
|
+
/// <reference lib="esnext.asynciterable" />
|
|
25
|
+
/** Class containing Operations operations. */
|
|
26
|
+
export class OperationsImpl implements Operations {
|
|
27
|
+
private readonly client: LoadTestClient;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Initialize a new instance of the class Operations class.
|
|
31
|
+
* @param client Reference to the service client
|
|
32
|
+
*/
|
|
33
|
+
constructor(client: LoadTestClient) {
|
|
34
|
+
this.client = client;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Lists all the available API operations for Load Test Resource.
|
|
39
|
+
* @param options The options parameters.
|
|
40
|
+
*/
|
|
41
|
+
public list(
|
|
42
|
+
options?: OperationsListOptionalParams
|
|
43
|
+
): PagedAsyncIterableIterator<Operation> {
|
|
44
|
+
const iter = this.listPagingAll(options);
|
|
45
|
+
return {
|
|
46
|
+
next() {
|
|
47
|
+
return iter.next();
|
|
48
|
+
},
|
|
49
|
+
[Symbol.asyncIterator]() {
|
|
50
|
+
return this;
|
|
51
|
+
},
|
|
52
|
+
byPage: (settings?: PageSettings) => {
|
|
53
|
+
if (settings?.maxPageSize) {
|
|
54
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
55
|
+
}
|
|
56
|
+
return this.listPagingPage(options, settings);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
private async *listPagingPage(
|
|
62
|
+
options?: OperationsListOptionalParams,
|
|
63
|
+
settings?: PageSettings
|
|
64
|
+
): AsyncIterableIterator<Operation[]> {
|
|
65
|
+
let result: OperationsListResponse;
|
|
66
|
+
let continuationToken = settings?.continuationToken;
|
|
67
|
+
if (!continuationToken) {
|
|
68
|
+
result = await this._list(options);
|
|
69
|
+
let page = result.value || [];
|
|
70
|
+
continuationToken = result.nextLink;
|
|
71
|
+
setContinuationToken(page, continuationToken);
|
|
72
|
+
yield page;
|
|
73
|
+
}
|
|
74
|
+
while (continuationToken) {
|
|
75
|
+
result = await this._listNext(continuationToken, options);
|
|
76
|
+
continuationToken = result.nextLink;
|
|
77
|
+
let page = result.value || [];
|
|
78
|
+
setContinuationToken(page, continuationToken);
|
|
79
|
+
yield page;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
private async *listPagingAll(
|
|
84
|
+
options?: OperationsListOptionalParams
|
|
85
|
+
): AsyncIterableIterator<Operation> {
|
|
86
|
+
for await (const page of this.listPagingPage(options)) {
|
|
87
|
+
yield* page;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Lists all the available API operations for Load Test Resource.
|
|
93
|
+
* @param options The options parameters.
|
|
94
|
+
*/
|
|
95
|
+
private _list(
|
|
96
|
+
options?: OperationsListOptionalParams
|
|
97
|
+
): Promise<OperationsListResponse> {
|
|
98
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* ListNext
|
|
103
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
104
|
+
* @param options The options parameters.
|
|
105
|
+
*/
|
|
106
|
+
private _listNext(
|
|
107
|
+
nextLink: string,
|
|
108
|
+
options?: OperationsListNextOptionalParams
|
|
109
|
+
): Promise<OperationsListNextResponse> {
|
|
110
|
+
return this.client.sendOperationRequest(
|
|
111
|
+
{ nextLink, options },
|
|
112
|
+
listNextOperationSpec
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
// Operation Specifications
|
|
117
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
118
|
+
|
|
119
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
120
|
+
path: "/providers/Microsoft.LoadTestService/operations",
|
|
121
|
+
httpMethod: "GET",
|
|
122
|
+
responses: {
|
|
123
|
+
200: {
|
|
124
|
+
bodyMapper: Mappers.OperationListResult
|
|
125
|
+
},
|
|
126
|
+
default: {
|
|
127
|
+
bodyMapper: Mappers.ErrorResponse
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
queryParameters: [Parameters.apiVersion],
|
|
131
|
+
urlParameters: [Parameters.$host],
|
|
132
|
+
headerParameters: [Parameters.accept],
|
|
133
|
+
serializer
|
|
134
|
+
};
|
|
135
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
136
|
+
path: "{nextLink}",
|
|
137
|
+
httpMethod: "GET",
|
|
138
|
+
responses: {
|
|
139
|
+
200: {
|
|
140
|
+
bodyMapper: Mappers.OperationListResult
|
|
141
|
+
},
|
|
142
|
+
default: {
|
|
143
|
+
bodyMapper: Mappers.ErrorResponse
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
queryParameters: [Parameters.apiVersion],
|
|
147
|
+
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
148
|
+
headerParameters: [Parameters.accept],
|
|
149
|
+
serializer
|
|
150
|
+
};
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
11
|
+
import { Quotas } from "../operationsInterfaces";
|
|
12
|
+
import * as coreClient from "@azure/core-client";
|
|
13
|
+
import * as Mappers from "../models/mappers";
|
|
14
|
+
import * as Parameters from "../models/parameters";
|
|
15
|
+
import { LoadTestClient } from "../loadTestClient";
|
|
16
|
+
import {
|
|
17
|
+
QuotaResource,
|
|
18
|
+
QuotasListNextOptionalParams,
|
|
19
|
+
QuotasListOptionalParams,
|
|
20
|
+
QuotasListResponse,
|
|
21
|
+
QuotasGetOptionalParams,
|
|
22
|
+
QuotasGetResponse,
|
|
23
|
+
QuotaBucketRequest,
|
|
24
|
+
QuotasCheckAvailabilityOptionalParams,
|
|
25
|
+
QuotasCheckAvailabilityResponse,
|
|
26
|
+
QuotasListNextResponse
|
|
27
|
+
} from "../models";
|
|
28
|
+
|
|
29
|
+
/// <reference lib="esnext.asynciterable" />
|
|
30
|
+
/** Class containing Quotas operations. */
|
|
31
|
+
export class QuotasImpl implements Quotas {
|
|
32
|
+
private readonly client: LoadTestClient;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Initialize a new instance of the class Quotas class.
|
|
36
|
+
* @param client Reference to the service client
|
|
37
|
+
*/
|
|
38
|
+
constructor(client: LoadTestClient) {
|
|
39
|
+
this.client = client;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Lists all the available quota per region per subscription.
|
|
44
|
+
* @param location The name of Azure region.
|
|
45
|
+
* @param options The options parameters.
|
|
46
|
+
*/
|
|
47
|
+
public list(
|
|
48
|
+
location: string,
|
|
49
|
+
options?: QuotasListOptionalParams
|
|
50
|
+
): PagedAsyncIterableIterator<QuotaResource> {
|
|
51
|
+
const iter = this.listPagingAll(location, options);
|
|
52
|
+
return {
|
|
53
|
+
next() {
|
|
54
|
+
return iter.next();
|
|
55
|
+
},
|
|
56
|
+
[Symbol.asyncIterator]() {
|
|
57
|
+
return this;
|
|
58
|
+
},
|
|
59
|
+
byPage: (settings?: PageSettings) => {
|
|
60
|
+
if (settings?.maxPageSize) {
|
|
61
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
62
|
+
}
|
|
63
|
+
return this.listPagingPage(location, options, settings);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
private async *listPagingPage(
|
|
69
|
+
location: string,
|
|
70
|
+
options?: QuotasListOptionalParams,
|
|
71
|
+
settings?: PageSettings
|
|
72
|
+
): AsyncIterableIterator<QuotaResource[]> {
|
|
73
|
+
let result: QuotasListResponse;
|
|
74
|
+
let continuationToken = settings?.continuationToken;
|
|
75
|
+
if (!continuationToken) {
|
|
76
|
+
result = await this._list(location, options);
|
|
77
|
+
let page = result.value || [];
|
|
78
|
+
continuationToken = result.nextLink;
|
|
79
|
+
setContinuationToken(page, continuationToken);
|
|
80
|
+
yield page;
|
|
81
|
+
}
|
|
82
|
+
while (continuationToken) {
|
|
83
|
+
result = await this._listNext(location, continuationToken, options);
|
|
84
|
+
continuationToken = result.nextLink;
|
|
85
|
+
let page = result.value || [];
|
|
86
|
+
setContinuationToken(page, continuationToken);
|
|
87
|
+
yield page;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
private async *listPagingAll(
|
|
92
|
+
location: string,
|
|
93
|
+
options?: QuotasListOptionalParams
|
|
94
|
+
): AsyncIterableIterator<QuotaResource> {
|
|
95
|
+
for await (const page of this.listPagingPage(location, options)) {
|
|
96
|
+
yield* page;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Lists all the available quota per region per subscription.
|
|
102
|
+
* @param location The name of Azure region.
|
|
103
|
+
* @param options The options parameters.
|
|
104
|
+
*/
|
|
105
|
+
private _list(
|
|
106
|
+
location: string,
|
|
107
|
+
options?: QuotasListOptionalParams
|
|
108
|
+
): Promise<QuotasListResponse> {
|
|
109
|
+
return this.client.sendOperationRequest(
|
|
110
|
+
{ location, options },
|
|
111
|
+
listOperationSpec
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Get the available quota for a quota bucket per region per subscription.
|
|
117
|
+
* @param location The name of Azure region.
|
|
118
|
+
* @param quotaBucketName Quota Bucket name.
|
|
119
|
+
* @param options The options parameters.
|
|
120
|
+
*/
|
|
121
|
+
get(
|
|
122
|
+
location: string,
|
|
123
|
+
quotaBucketName: string,
|
|
124
|
+
options?: QuotasGetOptionalParams
|
|
125
|
+
): Promise<QuotasGetResponse> {
|
|
126
|
+
return this.client.sendOperationRequest(
|
|
127
|
+
{ location, quotaBucketName, options },
|
|
128
|
+
getOperationSpec
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Check Quota Availability on quota bucket per region per subscription.
|
|
134
|
+
* @param location The name of Azure region.
|
|
135
|
+
* @param quotaBucketName Quota Bucket name.
|
|
136
|
+
* @param quotaBucketRequest Quota Bucket Request data
|
|
137
|
+
* @param options The options parameters.
|
|
138
|
+
*/
|
|
139
|
+
checkAvailability(
|
|
140
|
+
location: string,
|
|
141
|
+
quotaBucketName: string,
|
|
142
|
+
quotaBucketRequest: QuotaBucketRequest,
|
|
143
|
+
options?: QuotasCheckAvailabilityOptionalParams
|
|
144
|
+
): Promise<QuotasCheckAvailabilityResponse> {
|
|
145
|
+
return this.client.sendOperationRequest(
|
|
146
|
+
{ location, quotaBucketName, quotaBucketRequest, options },
|
|
147
|
+
checkAvailabilityOperationSpec
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* ListNext
|
|
153
|
+
* @param location The name of Azure region.
|
|
154
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
155
|
+
* @param options The options parameters.
|
|
156
|
+
*/
|
|
157
|
+
private _listNext(
|
|
158
|
+
location: string,
|
|
159
|
+
nextLink: string,
|
|
160
|
+
options?: QuotasListNextOptionalParams
|
|
161
|
+
): Promise<QuotasListNextResponse> {
|
|
162
|
+
return this.client.sendOperationRequest(
|
|
163
|
+
{ location, nextLink, options },
|
|
164
|
+
listNextOperationSpec
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
// Operation Specifications
|
|
169
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
170
|
+
|
|
171
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
172
|
+
path:
|
|
173
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.LoadTestService/locations/{location}/quotas",
|
|
174
|
+
httpMethod: "GET",
|
|
175
|
+
responses: {
|
|
176
|
+
200: {
|
|
177
|
+
bodyMapper: Mappers.QuotaResourceList
|
|
178
|
+
},
|
|
179
|
+
default: {
|
|
180
|
+
bodyMapper: Mappers.ErrorResponse
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
queryParameters: [Parameters.apiVersion],
|
|
184
|
+
urlParameters: [
|
|
185
|
+
Parameters.$host,
|
|
186
|
+
Parameters.subscriptionId,
|
|
187
|
+
Parameters.location
|
|
188
|
+
],
|
|
189
|
+
headerParameters: [Parameters.accept],
|
|
190
|
+
serializer
|
|
191
|
+
};
|
|
192
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
193
|
+
path:
|
|
194
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.LoadTestService/locations/{location}/quotas/{quotaBucketName}",
|
|
195
|
+
httpMethod: "GET",
|
|
196
|
+
responses: {
|
|
197
|
+
200: {
|
|
198
|
+
bodyMapper: Mappers.QuotaResource
|
|
199
|
+
},
|
|
200
|
+
default: {
|
|
201
|
+
bodyMapper: Mappers.ErrorResponse
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
queryParameters: [Parameters.apiVersion],
|
|
205
|
+
urlParameters: [
|
|
206
|
+
Parameters.$host,
|
|
207
|
+
Parameters.subscriptionId,
|
|
208
|
+
Parameters.location,
|
|
209
|
+
Parameters.quotaBucketName
|
|
210
|
+
],
|
|
211
|
+
headerParameters: [Parameters.accept],
|
|
212
|
+
serializer
|
|
213
|
+
};
|
|
214
|
+
const checkAvailabilityOperationSpec: coreClient.OperationSpec = {
|
|
215
|
+
path:
|
|
216
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.LoadTestService/locations/{location}/quotas/{quotaBucketName}/checkAvailability",
|
|
217
|
+
httpMethod: "POST",
|
|
218
|
+
responses: {
|
|
219
|
+
200: {
|
|
220
|
+
bodyMapper: Mappers.CheckQuotaAvailabilityResponse
|
|
221
|
+
},
|
|
222
|
+
default: {
|
|
223
|
+
bodyMapper: Mappers.ErrorResponse
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
requestBody: Parameters.quotaBucketRequest,
|
|
227
|
+
queryParameters: [Parameters.apiVersion],
|
|
228
|
+
urlParameters: [
|
|
229
|
+
Parameters.$host,
|
|
230
|
+
Parameters.subscriptionId,
|
|
231
|
+
Parameters.location,
|
|
232
|
+
Parameters.quotaBucketName
|
|
233
|
+
],
|
|
234
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
235
|
+
mediaType: "json",
|
|
236
|
+
serializer
|
|
237
|
+
};
|
|
238
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
239
|
+
path: "{nextLink}",
|
|
240
|
+
httpMethod: "GET",
|
|
241
|
+
responses: {
|
|
242
|
+
200: {
|
|
243
|
+
bodyMapper: Mappers.QuotaResourceList
|
|
244
|
+
},
|
|
245
|
+
default: {
|
|
246
|
+
bodyMapper: Mappers.ErrorResponse
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
queryParameters: [Parameters.apiVersion],
|
|
250
|
+
urlParameters: [
|
|
251
|
+
Parameters.$host,
|
|
252
|
+
Parameters.nextLink,
|
|
253
|
+
Parameters.subscriptionId,
|
|
254
|
+
Parameters.location
|
|
255
|
+
],
|
|
256
|
+
headerParameters: [Parameters.accept],
|
|
257
|
+
serializer
|
|
258
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export * from "./operations";
|
|
10
|
+
export * from "./quotas";
|
|
11
|
+
export * from "./loadTests";
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { PollerLike, PollOperationState } from "@azure/core-lro";
|
|
11
|
+
import {
|
|
12
|
+
LoadTestResource,
|
|
13
|
+
LoadTestsListBySubscriptionOptionalParams,
|
|
14
|
+
LoadTestsListByResourceGroupOptionalParams,
|
|
15
|
+
OutboundEnvironmentEndpoint,
|
|
16
|
+
LoadTestsListOutboundNetworkDependenciesEndpointsOptionalParams,
|
|
17
|
+
LoadTestsGetOptionalParams,
|
|
18
|
+
LoadTestsGetResponse,
|
|
19
|
+
LoadTestsCreateOrUpdateOptionalParams,
|
|
20
|
+
LoadTestsCreateOrUpdateResponse,
|
|
21
|
+
LoadTestResourcePatchRequestBody,
|
|
22
|
+
LoadTestsUpdateOptionalParams,
|
|
23
|
+
LoadTestsUpdateResponse,
|
|
24
|
+
LoadTestsDeleteOptionalParams
|
|
25
|
+
} from "../models";
|
|
26
|
+
|
|
27
|
+
/// <reference lib="esnext.asynciterable" />
|
|
28
|
+
/** Interface representing a LoadTests. */
|
|
29
|
+
export interface LoadTests {
|
|
30
|
+
/**
|
|
31
|
+
* Lists loadtests resources in a subscription.
|
|
32
|
+
* @param options The options parameters.
|
|
33
|
+
*/
|
|
34
|
+
listBySubscription(
|
|
35
|
+
options?: LoadTestsListBySubscriptionOptionalParams
|
|
36
|
+
): PagedAsyncIterableIterator<LoadTestResource>;
|
|
37
|
+
/**
|
|
38
|
+
* Lists loadtest resources in a resource group.
|
|
39
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
40
|
+
* @param options The options parameters.
|
|
41
|
+
*/
|
|
42
|
+
listByResourceGroup(
|
|
43
|
+
resourceGroupName: string,
|
|
44
|
+
options?: LoadTestsListByResourceGroupOptionalParams
|
|
45
|
+
): PagedAsyncIterableIterator<LoadTestResource>;
|
|
46
|
+
/**
|
|
47
|
+
* Lists the endpoints that agents may call as part of load testing.
|
|
48
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
49
|
+
* @param loadTestName Load Test name.
|
|
50
|
+
* @param options The options parameters.
|
|
51
|
+
*/
|
|
52
|
+
listOutboundNetworkDependenciesEndpoints(
|
|
53
|
+
resourceGroupName: string,
|
|
54
|
+
loadTestName: string,
|
|
55
|
+
options?: LoadTestsListOutboundNetworkDependenciesEndpointsOptionalParams
|
|
56
|
+
): PagedAsyncIterableIterator<OutboundEnvironmentEndpoint>;
|
|
57
|
+
/**
|
|
58
|
+
* Get a LoadTest resource.
|
|
59
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
60
|
+
* @param loadTestName Load Test name.
|
|
61
|
+
* @param options The options parameters.
|
|
62
|
+
*/
|
|
63
|
+
get(
|
|
64
|
+
resourceGroupName: string,
|
|
65
|
+
loadTestName: string,
|
|
66
|
+
options?: LoadTestsGetOptionalParams
|
|
67
|
+
): Promise<LoadTestsGetResponse>;
|
|
68
|
+
/**
|
|
69
|
+
* Create or update LoadTest resource.
|
|
70
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
71
|
+
* @param loadTestName Load Test name.
|
|
72
|
+
* @param loadTestResource LoadTest resource data
|
|
73
|
+
* @param options The options parameters.
|
|
74
|
+
*/
|
|
75
|
+
beginCreateOrUpdate(
|
|
76
|
+
resourceGroupName: string,
|
|
77
|
+
loadTestName: string,
|
|
78
|
+
loadTestResource: LoadTestResource,
|
|
79
|
+
options?: LoadTestsCreateOrUpdateOptionalParams
|
|
80
|
+
): Promise<
|
|
81
|
+
PollerLike<
|
|
82
|
+
PollOperationState<LoadTestsCreateOrUpdateResponse>,
|
|
83
|
+
LoadTestsCreateOrUpdateResponse
|
|
84
|
+
>
|
|
85
|
+
>;
|
|
86
|
+
/**
|
|
87
|
+
* Create or update LoadTest resource.
|
|
88
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
89
|
+
* @param loadTestName Load Test name.
|
|
90
|
+
* @param loadTestResource LoadTest resource data
|
|
91
|
+
* @param options The options parameters.
|
|
92
|
+
*/
|
|
93
|
+
beginCreateOrUpdateAndWait(
|
|
94
|
+
resourceGroupName: string,
|
|
95
|
+
loadTestName: string,
|
|
96
|
+
loadTestResource: LoadTestResource,
|
|
97
|
+
options?: LoadTestsCreateOrUpdateOptionalParams
|
|
98
|
+
): Promise<LoadTestsCreateOrUpdateResponse>;
|
|
99
|
+
/**
|
|
100
|
+
* Update a loadtest resource.
|
|
101
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
102
|
+
* @param loadTestName Load Test name.
|
|
103
|
+
* @param loadTestResourcePatchRequestBody LoadTest resource update data
|
|
104
|
+
* @param options The options parameters.
|
|
105
|
+
*/
|
|
106
|
+
beginUpdate(
|
|
107
|
+
resourceGroupName: string,
|
|
108
|
+
loadTestName: string,
|
|
109
|
+
loadTestResourcePatchRequestBody: LoadTestResourcePatchRequestBody,
|
|
110
|
+
options?: LoadTestsUpdateOptionalParams
|
|
111
|
+
): Promise<
|
|
112
|
+
PollerLike<
|
|
113
|
+
PollOperationState<LoadTestsUpdateResponse>,
|
|
114
|
+
LoadTestsUpdateResponse
|
|
115
|
+
>
|
|
116
|
+
>;
|
|
117
|
+
/**
|
|
118
|
+
* Update a loadtest resource.
|
|
119
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
120
|
+
* @param loadTestName Load Test name.
|
|
121
|
+
* @param loadTestResourcePatchRequestBody LoadTest resource update data
|
|
122
|
+
* @param options The options parameters.
|
|
123
|
+
*/
|
|
124
|
+
beginUpdateAndWait(
|
|
125
|
+
resourceGroupName: string,
|
|
126
|
+
loadTestName: string,
|
|
127
|
+
loadTestResourcePatchRequestBody: LoadTestResourcePatchRequestBody,
|
|
128
|
+
options?: LoadTestsUpdateOptionalParams
|
|
129
|
+
): Promise<LoadTestsUpdateResponse>;
|
|
130
|
+
/**
|
|
131
|
+
* Delete a LoadTest resource.
|
|
132
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
133
|
+
* @param loadTestName Load Test name.
|
|
134
|
+
* @param options The options parameters.
|
|
135
|
+
*/
|
|
136
|
+
beginDelete(
|
|
137
|
+
resourceGroupName: string,
|
|
138
|
+
loadTestName: string,
|
|
139
|
+
options?: LoadTestsDeleteOptionalParams
|
|
140
|
+
): Promise<PollerLike<PollOperationState<void>, void>>;
|
|
141
|
+
/**
|
|
142
|
+
* Delete a LoadTest resource.
|
|
143
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
144
|
+
* @param loadTestName Load Test name.
|
|
145
|
+
* @param options The options parameters.
|
|
146
|
+
*/
|
|
147
|
+
beginDeleteAndWait(
|
|
148
|
+
resourceGroupName: string,
|
|
149
|
+
loadTestName: string,
|
|
150
|
+
options?: LoadTestsDeleteOptionalParams
|
|
151
|
+
): Promise<void>;
|
|
152
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { Operation, OperationsListOptionalParams } from "../models";
|
|
11
|
+
|
|
12
|
+
/// <reference lib="esnext.asynciterable" />
|
|
13
|
+
/** Interface representing a Operations. */
|
|
14
|
+
export interface Operations {
|
|
15
|
+
/**
|
|
16
|
+
* Lists all the available API operations for Load Test Resource.
|
|
17
|
+
* @param options The options parameters.
|
|
18
|
+
*/
|
|
19
|
+
list(
|
|
20
|
+
options?: OperationsListOptionalParams
|
|
21
|
+
): PagedAsyncIterableIterator<Operation>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import {
|
|
11
|
+
QuotaResource,
|
|
12
|
+
QuotasListOptionalParams,
|
|
13
|
+
QuotasGetOptionalParams,
|
|
14
|
+
QuotasGetResponse,
|
|
15
|
+
QuotaBucketRequest,
|
|
16
|
+
QuotasCheckAvailabilityOptionalParams,
|
|
17
|
+
QuotasCheckAvailabilityResponse
|
|
18
|
+
} from "../models";
|
|
19
|
+
|
|
20
|
+
/// <reference lib="esnext.asynciterable" />
|
|
21
|
+
/** Interface representing a Quotas. */
|
|
22
|
+
export interface Quotas {
|
|
23
|
+
/**
|
|
24
|
+
* Lists all the available quota per region per subscription.
|
|
25
|
+
* @param location The name of Azure region.
|
|
26
|
+
* @param options The options parameters.
|
|
27
|
+
*/
|
|
28
|
+
list(
|
|
29
|
+
location: string,
|
|
30
|
+
options?: QuotasListOptionalParams
|
|
31
|
+
): PagedAsyncIterableIterator<QuotaResource>;
|
|
32
|
+
/**
|
|
33
|
+
* Get the available quota for a quota bucket per region per subscription.
|
|
34
|
+
* @param location The name of Azure region.
|
|
35
|
+
* @param quotaBucketName Quota Bucket name.
|
|
36
|
+
* @param options The options parameters.
|
|
37
|
+
*/
|
|
38
|
+
get(
|
|
39
|
+
location: string,
|
|
40
|
+
quotaBucketName: string,
|
|
41
|
+
options?: QuotasGetOptionalParams
|
|
42
|
+
): Promise<QuotasGetResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Check Quota Availability on quota bucket per region per subscription.
|
|
45
|
+
* @param location The name of Azure region.
|
|
46
|
+
* @param quotaBucketName Quota Bucket name.
|
|
47
|
+
* @param quotaBucketRequest Quota Bucket Request data
|
|
48
|
+
* @param options The options parameters.
|
|
49
|
+
*/
|
|
50
|
+
checkAvailability(
|
|
51
|
+
location: string,
|
|
52
|
+
quotaBucketName: string,
|
|
53
|
+
quotaBucketRequest: QuotaBucketRequest,
|
|
54
|
+
options?: QuotasCheckAvailabilityOptionalParams
|
|
55
|
+
): Promise<QuotasCheckAvailabilityResponse>;
|
|
56
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export interface PageInfo {
|
|
10
|
+
continuationToken?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const pageMap = new WeakMap<object, PageInfo>();
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Given a result page from a pageable operation, returns a
|
|
17
|
+
* continuation token that can be used to begin paging from
|
|
18
|
+
* that point later.
|
|
19
|
+
* @param page A result object from calling .byPage() on a paged operation.
|
|
20
|
+
* @returns The continuation token that can be passed into byPage().
|
|
21
|
+
*/
|
|
22
|
+
export function getContinuationToken(page: unknown): string | undefined {
|
|
23
|
+
if (typeof page !== "object" || page === null) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
return pageMap.get(page)?.continuationToken;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function setContinuationToken(
|
|
30
|
+
page: unknown,
|
|
31
|
+
continuationToken: string | undefined
|
|
32
|
+
): void {
|
|
33
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const pageInfo = pageMap.get(page) ?? {};
|
|
37
|
+
pageInfo.continuationToken = continuationToken;
|
|
38
|
+
pageMap.set(page, pageInfo);
|
|
39
|
+
}
|