@azure/arm-loadtesting 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +21 -0
  3. package/README.md +109 -0
  4. package/dist/index.js +2209 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/samples-dev/loadTestsCreateOrUpdateSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/loadTestsCreateOrUpdateSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/loadTestsCreateOrUpdateSample.js +49 -0
  11. package/dist-esm/samples-dev/loadTestsCreateOrUpdateSample.js.map +1 -0
  12. package/dist-esm/samples-dev/loadTestsDeleteSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/loadTestsDeleteSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/loadTestsDeleteSample.js +31 -0
  15. package/dist-esm/samples-dev/loadTestsDeleteSample.js.map +1 -0
  16. package/dist-esm/samples-dev/loadTestsGetSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/loadTestsGetSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/loadTestsGetSample.js +31 -0
  19. package/dist-esm/samples-dev/loadTestsGetSample.js.map +1 -0
  20. package/dist-esm/samples-dev/loadTestsListByResourceGroupSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/loadTestsListByResourceGroupSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/loadTestsListByResourceGroupSample.js +44 -0
  23. package/dist-esm/samples-dev/loadTestsListByResourceGroupSample.js.map +1 -0
  24. package/dist-esm/samples-dev/loadTestsListBySubscriptionSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/loadTestsListBySubscriptionSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/loadTestsListBySubscriptionSample.js +43 -0
  27. package/dist-esm/samples-dev/loadTestsListBySubscriptionSample.js.map +1 -0
  28. package/dist-esm/samples-dev/loadTestsListOutboundNetworkDependenciesEndpointsSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/loadTestsListOutboundNetworkDependenciesEndpointsSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/loadTestsListOutboundNetworkDependenciesEndpointsSample.js +45 -0
  31. package/dist-esm/samples-dev/loadTestsListOutboundNetworkDependenciesEndpointsSample.js.map +1 -0
  32. package/dist-esm/samples-dev/loadTestsUpdateSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/loadTestsUpdateSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/loadTestsUpdateSample.js +45 -0
  35. package/dist-esm/samples-dev/loadTestsUpdateSample.js.map +1 -0
  36. package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
  37. package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/operationsListSample.js +43 -0
  39. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  40. package/dist-esm/samples-dev/quotasCheckAvailabilitySample.d.ts +2 -0
  41. package/dist-esm/samples-dev/quotasCheckAvailabilitySample.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/quotasCheckAvailabilitySample.js +37 -0
  43. package/dist-esm/samples-dev/quotasCheckAvailabilitySample.js.map +1 -0
  44. package/dist-esm/samples-dev/quotasGetSample.d.ts +2 -0
  45. package/dist-esm/samples-dev/quotasGetSample.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/quotasGetSample.js +31 -0
  47. package/dist-esm/samples-dev/quotasGetSample.js.map +1 -0
  48. package/dist-esm/samples-dev/quotasListSample.d.ts +2 -0
  49. package/dist-esm/samples-dev/quotasListSample.d.ts.map +1 -0
  50. package/dist-esm/samples-dev/quotasListSample.js +44 -0
  51. package/dist-esm/samples-dev/quotasListSample.js.map +1 -0
  52. package/dist-esm/src/index.d.ts +6 -0
  53. package/dist-esm/src/index.d.ts.map +1 -0
  54. package/dist-esm/src/index.js +13 -0
  55. package/dist-esm/src/index.js.map +1 -0
  56. package/dist-esm/src/loadTestClient.d.ts +22 -0
  57. package/dist-esm/src/loadTestClient.d.ts.map +1 -0
  58. package/dist-esm/src/loadTestClient.js +102 -0
  59. package/dist-esm/src/loadTestClient.js.map +1 -0
  60. package/dist-esm/src/lroImpl.d.ts +16 -0
  61. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  62. package/dist-esm/src/lroImpl.js +29 -0
  63. package/dist-esm/src/lroImpl.js.map +1 -0
  64. package/dist-esm/src/models/index.d.ts +568 -0
  65. package/dist-esm/src/models/index.d.ts.map +1 -0
  66. package/dist-esm/src/models/index.js +68 -0
  67. package/dist-esm/src/models/index.js.map +1 -0
  68. package/dist-esm/src/models/mappers.d.ts +30 -0
  69. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  70. package/dist-esm/src/models/mappers.js +800 -0
  71. package/dist-esm/src/models/mappers.js.map +1 -0
  72. package/dist-esm/src/models/parameters.d.ts +15 -0
  73. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  74. package/dist-esm/src/models/parameters.js +136 -0
  75. package/dist-esm/src/models/parameters.js.map +1 -0
  76. package/dist-esm/src/operations/index.d.ts +4 -0
  77. package/dist-esm/src/operations/index.d.ts.map +1 -0
  78. package/dist-esm/src/operations/index.js +11 -0
  79. package/dist-esm/src/operations/index.js.map +1 -0
  80. package/dist-esm/src/operations/loadTests.d.ts +132 -0
  81. package/dist-esm/src/operations/loadTests.d.ts.map +1 -0
  82. package/dist-esm/src/operations/loadTests.js +661 -0
  83. package/dist-esm/src/operations/loadTests.js.map +1 -0
  84. package/dist-esm/src/operations/operations.d.ts +32 -0
  85. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  86. package/dist-esm/src/operations/operations.js +132 -0
  87. package/dist-esm/src/operations/operations.js.map +1 -0
  88. package/dist-esm/src/operations/quotas.d.ts +50 -0
  89. package/dist-esm/src/operations/quotas.d.ts.map +1 -0
  90. package/dist-esm/src/operations/quotas.js +207 -0
  91. package/dist-esm/src/operations/quotas.js.map +1 -0
  92. package/dist-esm/src/operationsInterfaces/index.d.ts +4 -0
  93. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  94. package/dist-esm/src/operationsInterfaces/index.js +11 -0
  95. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  96. package/dist-esm/src/operationsInterfaces/loadTests.d.ts +78 -0
  97. package/dist-esm/src/operationsInterfaces/loadTests.d.ts.map +1 -0
  98. package/dist-esm/src/operationsInterfaces/loadTests.js +9 -0
  99. package/dist-esm/src/operationsInterfaces/loadTests.js.map +1 -0
  100. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  101. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  102. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  103. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  104. package/dist-esm/src/operationsInterfaces/quotas.d.ts +27 -0
  105. package/dist-esm/src/operationsInterfaces/quotas.d.ts.map +1 -0
  106. package/dist-esm/src/operationsInterfaces/quotas.js +9 -0
  107. package/dist-esm/src/operationsInterfaces/quotas.js.map +1 -0
  108. package/dist-esm/src/pagingHelper.d.ts +13 -0
  109. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  110. package/dist-esm/src/pagingHelper.js +32 -0
  111. package/dist-esm/src/pagingHelper.js.map +1 -0
  112. package/dist-esm/test/loadtesting_example.spec.d.ts +4 -0
  113. package/dist-esm/test/loadtesting_example.spec.d.ts.map +1 -0
  114. package/dist-esm/test/loadtesting_example.spec.js +108 -0
  115. package/dist-esm/test/loadtesting_example.spec.js.map +1 -0
  116. package/package.json +122 -0
  117. package/review/arm-loadtesting.api.md +437 -0
  118. package/rollup.config.js +122 -0
  119. package/src/index.ts +13 -0
  120. package/src/loadTestClient.ts +144 -0
  121. package/src/lroImpl.ts +34 -0
  122. package/src/models/index.ts +645 -0
  123. package/src/models/mappers.ts +855 -0
  124. package/src/models/parameters.ts +158 -0
  125. package/src/operations/index.ts +11 -0
  126. package/src/operations/loadTests.ts +887 -0
  127. package/src/operations/operations.ts +150 -0
  128. package/src/operations/quotas.ts +258 -0
  129. package/src/operationsInterfaces/index.ts +11 -0
  130. package/src/operationsInterfaces/loadTests.ts +152 -0
  131. package/src/operationsInterfaces/operations.ts +22 -0
  132. package/src/operationsInterfaces/quotas.ts +56 -0
  133. package/src/pagingHelper.ts +39 -0
  134. package/tsconfig.json +33 -0
  135. package/types/arm-loadtesting.d.ts +781 -0
  136. package/types/tsdoc-metadata.json +11 -0
@@ -0,0 +1,437 @@
1
+ ## API Report File for "@azure/arm-loadtesting"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import * as coreAuth from '@azure/core-auth';
8
+ import * as coreClient from '@azure/core-client';
9
+ import { PagedAsyncIterableIterator } from '@azure/core-paging';
10
+ import { PollerLike } from '@azure/core-lro';
11
+ import { PollOperationState } from '@azure/core-lro';
12
+
13
+ // @public
14
+ export type ActionType = string;
15
+
16
+ // @public
17
+ export interface CheckQuotaAvailabilityResponse extends Resource {
18
+ availabilityStatus?: string;
19
+ isAvailable?: boolean;
20
+ }
21
+
22
+ // @public
23
+ export type CreatedByType = string;
24
+
25
+ // @public
26
+ export interface EncryptionProperties {
27
+ identity?: EncryptionPropertiesIdentity;
28
+ keyUrl?: string;
29
+ }
30
+
31
+ // @public
32
+ export interface EncryptionPropertiesIdentity {
33
+ resourceId?: string;
34
+ type?: Type;
35
+ }
36
+
37
+ // @public
38
+ export interface EndpointDependency {
39
+ readonly description?: string;
40
+ readonly domainName?: string;
41
+ readonly endpointDetails?: EndpointDetail[];
42
+ }
43
+
44
+ // @public
45
+ export interface EndpointDetail {
46
+ readonly port?: number;
47
+ }
48
+
49
+ // @public
50
+ export interface ErrorAdditionalInfo {
51
+ readonly info?: Record<string, unknown>;
52
+ readonly type?: string;
53
+ }
54
+
55
+ // @public
56
+ export interface ErrorDetail {
57
+ readonly additionalInfo?: ErrorAdditionalInfo[];
58
+ readonly code?: string;
59
+ readonly details?: ErrorDetail[];
60
+ readonly message?: string;
61
+ readonly target?: string;
62
+ }
63
+
64
+ // @public
65
+ export interface ErrorResponse {
66
+ error?: ErrorDetail;
67
+ }
68
+
69
+ // @public
70
+ export function getContinuationToken(page: unknown): string | undefined;
71
+
72
+ // @public
73
+ export enum KnownActionType {
74
+ Internal = "Internal"
75
+ }
76
+
77
+ // @public
78
+ export enum KnownCreatedByType {
79
+ Application = "Application",
80
+ Key = "Key",
81
+ ManagedIdentity = "ManagedIdentity",
82
+ User = "User"
83
+ }
84
+
85
+ // @public
86
+ export enum KnownManagedServiceIdentityType {
87
+ None = "None",
88
+ SystemAssigned = "SystemAssigned",
89
+ SystemAssignedUserAssigned = "SystemAssigned,UserAssigned",
90
+ UserAssigned = "UserAssigned"
91
+ }
92
+
93
+ // @public
94
+ export enum KnownOrigin {
95
+ System = "system",
96
+ User = "user",
97
+ UserSystem = "user,system"
98
+ }
99
+
100
+ // @public
101
+ export enum KnownResourceState {
102
+ Canceled = "Canceled",
103
+ Deleted = "Deleted",
104
+ Failed = "Failed",
105
+ Succeeded = "Succeeded"
106
+ }
107
+
108
+ // @public
109
+ export enum KnownType {
110
+ SystemAssigned = "SystemAssigned",
111
+ UserAssigned = "UserAssigned"
112
+ }
113
+
114
+ // @public (undocumented)
115
+ export class LoadTestClient extends coreClient.ServiceClient {
116
+ // (undocumented)
117
+ $host: string;
118
+ constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: LoadTestClientOptionalParams);
119
+ // (undocumented)
120
+ apiVersion: string;
121
+ // (undocumented)
122
+ loadTests: LoadTests;
123
+ // (undocumented)
124
+ operations: Operations;
125
+ // (undocumented)
126
+ quotas: Quotas;
127
+ // (undocumented)
128
+ subscriptionId: string;
129
+ }
130
+
131
+ // @public
132
+ export interface LoadTestClientOptionalParams extends coreClient.ServiceClientOptions {
133
+ $host?: string;
134
+ apiVersion?: string;
135
+ endpoint?: string;
136
+ }
137
+
138
+ // @public
139
+ export interface LoadTestResource extends TrackedResource {
140
+ readonly dataPlaneURI?: string;
141
+ description?: string;
142
+ encryption?: EncryptionProperties;
143
+ identity?: ManagedServiceIdentity;
144
+ readonly provisioningState?: ResourceState;
145
+ }
146
+
147
+ // @public
148
+ export interface LoadTestResourcePageList {
149
+ nextLink?: string;
150
+ value?: LoadTestResource[];
151
+ }
152
+
153
+ // @public
154
+ export interface LoadTestResourcePatchRequestBody {
155
+ description?: string;
156
+ encryption?: EncryptionProperties;
157
+ identity?: ManagedServiceIdentity;
158
+ tags?: {
159
+ [propertyName: string]: string;
160
+ };
161
+ }
162
+
163
+ // @public
164
+ export interface LoadTests {
165
+ beginCreateOrUpdate(resourceGroupName: string, loadTestName: string, loadTestResource: LoadTestResource, options?: LoadTestsCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<LoadTestsCreateOrUpdateResponse>, LoadTestsCreateOrUpdateResponse>>;
166
+ beginCreateOrUpdateAndWait(resourceGroupName: string, loadTestName: string, loadTestResource: LoadTestResource, options?: LoadTestsCreateOrUpdateOptionalParams): Promise<LoadTestsCreateOrUpdateResponse>;
167
+ beginDelete(resourceGroupName: string, loadTestName: string, options?: LoadTestsDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
168
+ beginDeleteAndWait(resourceGroupName: string, loadTestName: string, options?: LoadTestsDeleteOptionalParams): Promise<void>;
169
+ beginUpdate(resourceGroupName: string, loadTestName: string, loadTestResourcePatchRequestBody: LoadTestResourcePatchRequestBody, options?: LoadTestsUpdateOptionalParams): Promise<PollerLike<PollOperationState<LoadTestsUpdateResponse>, LoadTestsUpdateResponse>>;
170
+ beginUpdateAndWait(resourceGroupName: string, loadTestName: string, loadTestResourcePatchRequestBody: LoadTestResourcePatchRequestBody, options?: LoadTestsUpdateOptionalParams): Promise<LoadTestsUpdateResponse>;
171
+ get(resourceGroupName: string, loadTestName: string, options?: LoadTestsGetOptionalParams): Promise<LoadTestsGetResponse>;
172
+ listByResourceGroup(resourceGroupName: string, options?: LoadTestsListByResourceGroupOptionalParams): PagedAsyncIterableIterator<LoadTestResource>;
173
+ listBySubscription(options?: LoadTestsListBySubscriptionOptionalParams): PagedAsyncIterableIterator<LoadTestResource>;
174
+ listOutboundNetworkDependenciesEndpoints(resourceGroupName: string, loadTestName: string, options?: LoadTestsListOutboundNetworkDependenciesEndpointsOptionalParams): PagedAsyncIterableIterator<OutboundEnvironmentEndpoint>;
175
+ }
176
+
177
+ // @public
178
+ export interface LoadTestsCreateOrUpdateHeaders {
179
+ azureAsyncOperation?: string;
180
+ }
181
+
182
+ // @public
183
+ export interface LoadTestsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
184
+ resumeFrom?: string;
185
+ updateIntervalInMs?: number;
186
+ }
187
+
188
+ // @public
189
+ export type LoadTestsCreateOrUpdateResponse = LoadTestResource;
190
+
191
+ // @public
192
+ export interface LoadTestsDeleteHeaders {
193
+ location?: string;
194
+ }
195
+
196
+ // @public
197
+ export interface LoadTestsDeleteOptionalParams extends coreClient.OperationOptions {
198
+ resumeFrom?: string;
199
+ updateIntervalInMs?: number;
200
+ }
201
+
202
+ // @public
203
+ export interface LoadTestsGetOptionalParams extends coreClient.OperationOptions {
204
+ }
205
+
206
+ // @public
207
+ export type LoadTestsGetResponse = LoadTestResource;
208
+
209
+ // @public
210
+ export interface LoadTestsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {
211
+ }
212
+
213
+ // @public
214
+ export type LoadTestsListByResourceGroupNextResponse = LoadTestResourcePageList;
215
+
216
+ // @public
217
+ export interface LoadTestsListByResourceGroupOptionalParams extends coreClient.OperationOptions {
218
+ }
219
+
220
+ // @public
221
+ export type LoadTestsListByResourceGroupResponse = LoadTestResourcePageList;
222
+
223
+ // @public
224
+ export interface LoadTestsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {
225
+ }
226
+
227
+ // @public
228
+ export type LoadTestsListBySubscriptionNextResponse = LoadTestResourcePageList;
229
+
230
+ // @public
231
+ export interface LoadTestsListBySubscriptionOptionalParams extends coreClient.OperationOptions {
232
+ }
233
+
234
+ // @public
235
+ export type LoadTestsListBySubscriptionResponse = LoadTestResourcePageList;
236
+
237
+ // @public
238
+ export interface LoadTestsListOutboundNetworkDependenciesEndpointsNextOptionalParams extends coreClient.OperationOptions {
239
+ }
240
+
241
+ // @public
242
+ export type LoadTestsListOutboundNetworkDependenciesEndpointsNextResponse = OutboundEnvironmentEndpointCollection;
243
+
244
+ // @public
245
+ export interface LoadTestsListOutboundNetworkDependenciesEndpointsOptionalParams extends coreClient.OperationOptions {
246
+ }
247
+
248
+ // @public
249
+ export type LoadTestsListOutboundNetworkDependenciesEndpointsResponse = OutboundEnvironmentEndpointCollection;
250
+
251
+ // @public
252
+ export interface LoadTestsUpdateHeaders {
253
+ azureAsyncOperation?: string;
254
+ }
255
+
256
+ // @public
257
+ export interface LoadTestsUpdateOptionalParams extends coreClient.OperationOptions {
258
+ resumeFrom?: string;
259
+ updateIntervalInMs?: number;
260
+ }
261
+
262
+ // @public
263
+ export type LoadTestsUpdateResponse = LoadTestResource;
264
+
265
+ // @public
266
+ export interface ManagedServiceIdentity {
267
+ readonly principalId?: string;
268
+ readonly tenantId?: string;
269
+ type: ManagedServiceIdentityType;
270
+ userAssignedIdentities?: {
271
+ [propertyName: string]: UserAssignedIdentity | null;
272
+ };
273
+ }
274
+
275
+ // @public
276
+ export type ManagedServiceIdentityType = string;
277
+
278
+ // @public
279
+ export interface Operation {
280
+ readonly actionType?: ActionType;
281
+ display?: OperationDisplay;
282
+ readonly isDataAction?: boolean;
283
+ readonly name?: string;
284
+ readonly origin?: Origin;
285
+ }
286
+
287
+ // @public
288
+ export interface OperationDisplay {
289
+ readonly description?: string;
290
+ readonly operation?: string;
291
+ readonly provider?: string;
292
+ readonly resource?: string;
293
+ }
294
+
295
+ // @public
296
+ export interface OperationListResult {
297
+ readonly nextLink?: string;
298
+ readonly value?: Operation[];
299
+ }
300
+
301
+ // @public
302
+ export interface Operations {
303
+ list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator<Operation>;
304
+ }
305
+
306
+ // @public
307
+ export interface OperationsListNextOptionalParams extends coreClient.OperationOptions {
308
+ }
309
+
310
+ // @public
311
+ export type OperationsListNextResponse = OperationListResult;
312
+
313
+ // @public
314
+ export interface OperationsListOptionalParams extends coreClient.OperationOptions {
315
+ }
316
+
317
+ // @public
318
+ export type OperationsListResponse = OperationListResult;
319
+
320
+ // @public
321
+ export type Origin = string;
322
+
323
+ // @public
324
+ export interface OutboundEnvironmentEndpoint {
325
+ readonly category?: string;
326
+ readonly endpoints?: EndpointDependency[];
327
+ }
328
+
329
+ // @public
330
+ export interface OutboundEnvironmentEndpointCollection {
331
+ nextLink?: string;
332
+ readonly value?: OutboundEnvironmentEndpoint[];
333
+ }
334
+
335
+ // @public
336
+ export interface QuotaBucketRequest extends Resource {
337
+ currentQuota?: number;
338
+ currentUsage?: number;
339
+ dimensions?: QuotaBucketRequestPropertiesDimensions;
340
+ newQuota?: number;
341
+ }
342
+
343
+ // @public
344
+ export interface QuotaBucketRequestPropertiesDimensions {
345
+ location?: string;
346
+ subscriptionId?: string;
347
+ }
348
+
349
+ // @public
350
+ export interface QuotaResource extends Resource {
351
+ limit?: number;
352
+ readonly provisioningState?: ResourceState;
353
+ usage?: number;
354
+ }
355
+
356
+ // @public
357
+ export interface QuotaResourceList {
358
+ readonly nextLink?: string;
359
+ readonly value?: QuotaResource[];
360
+ }
361
+
362
+ // @public
363
+ export interface Quotas {
364
+ checkAvailability(location: string, quotaBucketName: string, quotaBucketRequest: QuotaBucketRequest, options?: QuotasCheckAvailabilityOptionalParams): Promise<QuotasCheckAvailabilityResponse>;
365
+ get(location: string, quotaBucketName: string, options?: QuotasGetOptionalParams): Promise<QuotasGetResponse>;
366
+ list(location: string, options?: QuotasListOptionalParams): PagedAsyncIterableIterator<QuotaResource>;
367
+ }
368
+
369
+ // @public
370
+ export interface QuotasCheckAvailabilityOptionalParams extends coreClient.OperationOptions {
371
+ }
372
+
373
+ // @public
374
+ export type QuotasCheckAvailabilityResponse = CheckQuotaAvailabilityResponse;
375
+
376
+ // @public
377
+ export interface QuotasGetOptionalParams extends coreClient.OperationOptions {
378
+ }
379
+
380
+ // @public
381
+ export type QuotasGetResponse = QuotaResource;
382
+
383
+ // @public
384
+ export interface QuotasListNextOptionalParams extends coreClient.OperationOptions {
385
+ }
386
+
387
+ // @public
388
+ export type QuotasListNextResponse = QuotaResourceList;
389
+
390
+ // @public
391
+ export interface QuotasListOptionalParams extends coreClient.OperationOptions {
392
+ }
393
+
394
+ // @public
395
+ export type QuotasListResponse = QuotaResourceList;
396
+
397
+ // @public
398
+ export interface Resource {
399
+ readonly id?: string;
400
+ readonly name?: string;
401
+ readonly systemData?: SystemData;
402
+ readonly type?: string;
403
+ }
404
+
405
+ // @public
406
+ export type ResourceState = string;
407
+
408
+ // @public
409
+ export interface SystemData {
410
+ createdAt?: Date;
411
+ createdBy?: string;
412
+ createdByType?: CreatedByType;
413
+ lastModifiedAt?: Date;
414
+ lastModifiedBy?: string;
415
+ lastModifiedByType?: CreatedByType;
416
+ }
417
+
418
+ // @public
419
+ export interface TrackedResource extends Resource {
420
+ location: string;
421
+ tags?: {
422
+ [propertyName: string]: string;
423
+ };
424
+ }
425
+
426
+ // @public
427
+ export type Type = string;
428
+
429
+ // @public
430
+ export interface UserAssignedIdentity {
431
+ readonly clientId?: string;
432
+ readonly principalId?: string;
433
+ }
434
+
435
+ // (No @packageDocumentation comment for this package)
436
+
437
+ ```
@@ -0,0 +1,122 @@
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 nodeResolve from "@rollup/plugin-node-resolve";
10
+ import cjs from "@rollup/plugin-commonjs";
11
+ import sourcemaps from "rollup-plugin-sourcemaps";
12
+ import multiEntry from "@rollup/plugin-multi-entry";
13
+ import json from "@rollup/plugin-json";
14
+
15
+ import nodeBuiltins from "builtin-modules";
16
+
17
+ // #region Warning Handler
18
+
19
+ /**
20
+ * A function that can determine whether a rollup warning should be ignored. If
21
+ * the function returns `true`, then the warning will not be displayed.
22
+ */
23
+
24
+ function ignoreNiseSinonEval(warning) {
25
+ return (
26
+ warning.code === "EVAL" &&
27
+ warning.id &&
28
+ (warning.id.includes("node_modules/nise") ||
29
+ warning.id.includes("node_modules/sinon")) === true
30
+ );
31
+ }
32
+
33
+ function ignoreChaiCircularDependency(warning) {
34
+ return (
35
+ warning.code === "CIRCULAR_DEPENDENCY" &&
36
+ warning.importer && warning.importer.includes("node_modules/chai") === true
37
+ );
38
+ }
39
+
40
+ const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
41
+
42
+ /**
43
+ * Construct a warning handler for the shared rollup configuration
44
+ * that ignores certain warnings that are not relevant to testing.
45
+ */
46
+ function makeOnWarnForTesting() {
47
+ return (warning, warn) => {
48
+ // If every inhibitor returns false (i.e. no inhibitors), then show the warning
49
+ if (warningInhibitors.every((inhib) => !inhib(warning))) {
50
+ warn(warning);
51
+ }
52
+ };
53
+ }
54
+
55
+ // #endregion
56
+
57
+ function makeBrowserTestConfig() {
58
+ const config = {
59
+ input: {
60
+ include: ["dist-esm/test/**/*.spec.js"],
61
+ exclude: ["dist-esm/test/**/node/**"]
62
+ },
63
+ output: {
64
+ file: `dist-test/index.browser.js`,
65
+ format: "umd",
66
+ sourcemap: true
67
+ },
68
+ preserveSymlinks: false,
69
+ plugins: [
70
+ multiEntry({ exports: false }),
71
+ nodeResolve({
72
+ mainFields: ["module", "browser"]
73
+ }),
74
+ cjs(),
75
+ json(),
76
+ sourcemaps()
77
+ //viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
78
+ ],
79
+ onwarn: makeOnWarnForTesting(),
80
+ // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0,
81
+ // rollup started respecting the "sideEffects" field in package.json. Since
82
+ // our package.json sets "sideEffects=false", this also applies to test
83
+ // code, which causes all tests to be removed by tree-shaking.
84
+ treeshake: false
85
+ };
86
+
87
+ return config;
88
+ }
89
+
90
+ const defaultConfigurationOptions = {
91
+ disableBrowserBundle: false
92
+ };
93
+
94
+ export function makeConfig(pkg, options) {
95
+ options = {
96
+ ...defaultConfigurationOptions,
97
+ ...(options || {})
98
+ };
99
+
100
+ const baseConfig = {
101
+ // Use the package's module field if it has one
102
+ input: pkg["module"] || "dist-esm/src/index.js",
103
+ external: [
104
+ ...nodeBuiltins,
105
+ ...Object.keys(pkg.dependencies),
106
+ ...Object.keys(pkg.devDependencies)
107
+ ],
108
+ output: { file: "dist/index.js", format: "cjs", sourcemap: true },
109
+ preserveSymlinks: false,
110
+ plugins: [sourcemaps(), nodeResolve()]
111
+ };
112
+
113
+ const config = [baseConfig];
114
+
115
+ if (!options.disableBrowserBundle) {
116
+ config.push(makeBrowserTestConfig());
117
+ }
118
+
119
+ return config;
120
+ }
121
+
122
+ export default makeConfig(require("./package.json"));
package/src/index.ts ADDED
@@ -0,0 +1,13 @@
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
+ /// <reference lib="esnext.asynciterable" />
10
+ export { getContinuationToken } from "./pagingHelper";
11
+ export * from "./models";
12
+ export { LoadTestClient } from "./loadTestClient";
13
+ export * from "./operationsInterfaces";
@@ -0,0 +1,144 @@
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 * as coreClient from "@azure/core-client";
10
+ import * as coreRestPipeline from "@azure/core-rest-pipeline";
11
+ import {
12
+ PipelineRequest,
13
+ PipelineResponse,
14
+ SendRequest
15
+ } from "@azure/core-rest-pipeline";
16
+ import * as coreAuth from "@azure/core-auth";
17
+ import { OperationsImpl, QuotasImpl, LoadTestsImpl } from "./operations";
18
+ import { Operations, Quotas, LoadTests } from "./operationsInterfaces";
19
+ import { LoadTestClientOptionalParams } from "./models";
20
+
21
+ export class LoadTestClient extends coreClient.ServiceClient {
22
+ $host: string;
23
+ apiVersion: string;
24
+ subscriptionId: string;
25
+
26
+ /**
27
+ * Initializes a new instance of the LoadTestClient class.
28
+ * @param credentials Subscription credentials which uniquely identify client subscription.
29
+ * @param subscriptionId The ID of the target subscription.
30
+ * @param options The parameter options
31
+ */
32
+ constructor(
33
+ credentials: coreAuth.TokenCredential,
34
+ subscriptionId: string,
35
+ options?: LoadTestClientOptionalParams
36
+ ) {
37
+ if (credentials === undefined) {
38
+ throw new Error("'credentials' cannot be null");
39
+ }
40
+ if (subscriptionId === undefined) {
41
+ throw new Error("'subscriptionId' cannot be null");
42
+ }
43
+
44
+ // Initializing default values for options
45
+ if (!options) {
46
+ options = {};
47
+ }
48
+ const defaults: LoadTestClientOptionalParams = {
49
+ requestContentType: "application/json; charset=utf-8",
50
+ credential: credentials
51
+ };
52
+
53
+ const packageDetails = `azsdk-js-arm-loadtesting/1.0.0-beta.1`;
54
+ const userAgentPrefix =
55
+ options.userAgentOptions && options.userAgentOptions.userAgentPrefix
56
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
57
+ : `${packageDetails}`;
58
+
59
+ const optionsWithDefaults = {
60
+ ...defaults,
61
+ ...options,
62
+ userAgentOptions: {
63
+ userAgentPrefix
64
+ },
65
+ endpoint:
66
+ options.endpoint ?? options.baseUri ?? "https://management.azure.com"
67
+ };
68
+ super(optionsWithDefaults);
69
+
70
+ let bearerTokenAuthenticationPolicyFound: boolean = false;
71
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
72
+ const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
73
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
74
+ (pipelinePolicy) =>
75
+ pipelinePolicy.name ===
76
+ coreRestPipeline.bearerTokenAuthenticationPolicyName
77
+ );
78
+ }
79
+ if (
80
+ !options ||
81
+ !options.pipeline ||
82
+ options.pipeline.getOrderedPolicies().length == 0 ||
83
+ !bearerTokenAuthenticationPolicyFound
84
+ ) {
85
+ this.pipeline.removePolicy({
86
+ name: coreRestPipeline.bearerTokenAuthenticationPolicyName
87
+ });
88
+ this.pipeline.addPolicy(
89
+ coreRestPipeline.bearerTokenAuthenticationPolicy({
90
+ credential: credentials,
91
+ scopes:
92
+ optionsWithDefaults.credentialScopes ??
93
+ `${optionsWithDefaults.endpoint}/.default`,
94
+ challengeCallbacks: {
95
+ authorizeRequestOnChallenge:
96
+ coreClient.authorizeRequestOnClaimChallenge
97
+ }
98
+ })
99
+ );
100
+ }
101
+ // Parameter assignments
102
+ this.subscriptionId = subscriptionId;
103
+
104
+ // Assigning values to Constant parameters
105
+ this.$host = options.$host || "https://management.azure.com";
106
+ this.apiVersion = options.apiVersion || "2022-12-01";
107
+ this.operations = new OperationsImpl(this);
108
+ this.quotas = new QuotasImpl(this);
109
+ this.loadTests = new LoadTestsImpl(this);
110
+ this.addCustomApiVersionPolicy(options.apiVersion);
111
+ }
112
+
113
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
114
+ private addCustomApiVersionPolicy(apiVersion?: string) {
115
+ if (!apiVersion) {
116
+ return;
117
+ }
118
+ const apiVersionPolicy = {
119
+ name: "CustomApiVersionPolicy",
120
+ async sendRequest(
121
+ request: PipelineRequest,
122
+ next: SendRequest
123
+ ): Promise<PipelineResponse> {
124
+ const param = request.url.split("?");
125
+ if (param.length > 1) {
126
+ const newParams = param[1].split("&").map((item) => {
127
+ if (item.indexOf("api-version") > -1) {
128
+ return "api-version=" + apiVersion;
129
+ } else {
130
+ return item;
131
+ }
132
+ });
133
+ request.url = param[0] + "?" + newParams.join("&");
134
+ }
135
+ return next(request);
136
+ }
137
+ };
138
+ this.pipeline.addPolicy(apiVersionPolicy);
139
+ }
140
+
141
+ operations: Operations;
142
+ quotas: Quotas;
143
+ loadTests: LoadTests;
144
+ }