@azure/arm-machinelearningcompute 3.0.0-beta.2 → 3.0.0-beta.3

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 (36) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/README.md +1 -1
  3. package/dist/index.js +183 -33
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/src/index.d.ts +1 -0
  8. package/dist-esm/src/index.d.ts.map +1 -1
  9. package/dist-esm/src/index.js +1 -0
  10. package/dist-esm/src/index.js.map +1 -1
  11. package/dist-esm/src/machineLearningComputeManagementClient.d.ts +2 -0
  12. package/dist-esm/src/machineLearningComputeManagementClient.d.ts.map +1 -1
  13. package/dist-esm/src/machineLearningComputeManagementClient.js +49 -18
  14. package/dist-esm/src/machineLearningComputeManagementClient.js.map +1 -1
  15. package/dist-esm/src/models/index.d.ts +67 -2
  16. package/dist-esm/src/models/index.d.ts.map +1 -1
  17. package/dist-esm/src/models/index.js +65 -0
  18. package/dist-esm/src/models/index.js.map +1 -1
  19. package/dist-esm/src/operations/operationalizationClusters.d.ts.map +1 -1
  20. package/dist-esm/src/operations/operationalizationClusters.js +37 -14
  21. package/dist-esm/src/operations/operationalizationClusters.js.map +1 -1
  22. package/dist-esm/src/pagingHelper.d.ts +13 -0
  23. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  24. package/dist-esm/src/pagingHelper.js +32 -0
  25. package/dist-esm/src/pagingHelper.js.map +1 -0
  26. package/dist-esm/test/sampleTest.js +11 -13
  27. package/dist-esm/test/sampleTest.js.map +1 -1
  28. package/package.json +15 -11
  29. package/review/arm-machinelearningcompute.api.md +12 -74
  30. package/src/index.ts +1 -0
  31. package/src/machineLearningComputeManagementClient.ts +60 -20
  32. package/src/models/index.ts +67 -2
  33. package/src/operations/operationalizationClusters.ts +46 -17
  34. package/src/pagingHelper.ts +39 -0
  35. package/types/arm-machinelearningcompute.d.ts +78 -2
  36. package/types/tsdoc-metadata.json +1 -1
@@ -6,7 +6,8 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- import { PagedAsyncIterableIterator } from "@azure/core-paging";
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
+ import { setContinuationToken } from "../pagingHelper";
10
11
  import { OperationalizationClusters } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -18,8 +19,10 @@ import {
18
19
  OperationalizationCluster,
19
20
  OperationalizationClustersListByResourceGroupNextOptionalParams,
20
21
  OperationalizationClustersListByResourceGroupOptionalParams,
22
+ OperationalizationClustersListByResourceGroupResponse,
21
23
  OperationalizationClustersListBySubscriptionIdNextOptionalParams,
22
24
  OperationalizationClustersListBySubscriptionIdOptionalParams,
25
+ OperationalizationClustersListBySubscriptionIdResponse,
23
26
  OperationalizationClustersCreateOrUpdateOptionalParams,
24
27
  OperationalizationClustersCreateOrUpdateResponse,
25
28
  OperationalizationClustersGetOptionalParams,
@@ -35,8 +38,6 @@ import {
35
38
  OperationalizationClustersCheckSystemServicesUpdatesAvailableResponse,
36
39
  OperationalizationClustersUpdateSystemServicesOptionalParams,
37
40
  OperationalizationClustersUpdateSystemServicesResponse,
38
- OperationalizationClustersListByResourceGroupResponse,
39
- OperationalizationClustersListBySubscriptionIdResponse,
40
41
  OperationalizationClustersListByResourceGroupNextResponse,
41
42
  OperationalizationClustersListBySubscriptionIdNextResponse
42
43
  } from "../models";
@@ -72,19 +73,33 @@ export class OperationalizationClustersImpl
72
73
  [Symbol.asyncIterator]() {
73
74
  return this;
74
75
  },
75
- byPage: () => {
76
- return this.listByResourceGroupPagingPage(resourceGroupName, options);
76
+ byPage: (settings?: PageSettings) => {
77
+ if (settings?.maxPageSize) {
78
+ throw new Error("maxPageSize is not supported by this operation.");
79
+ }
80
+ return this.listByResourceGroupPagingPage(
81
+ resourceGroupName,
82
+ options,
83
+ settings
84
+ );
77
85
  }
78
86
  };
79
87
  }
80
88
 
81
89
  private async *listByResourceGroupPagingPage(
82
90
  resourceGroupName: string,
83
- options?: OperationalizationClustersListByResourceGroupOptionalParams
91
+ options?: OperationalizationClustersListByResourceGroupOptionalParams,
92
+ settings?: PageSettings
84
93
  ): AsyncIterableIterator<OperationalizationCluster[]> {
85
- let result = await this._listByResourceGroup(resourceGroupName, options);
86
- yield result.value || [];
87
- let continuationToken = result.nextLink;
94
+ let result: OperationalizationClustersListByResourceGroupResponse;
95
+ let continuationToken = settings?.continuationToken;
96
+ if (!continuationToken) {
97
+ result = await this._listByResourceGroup(resourceGroupName, options);
98
+ let page = result.value || [];
99
+ continuationToken = result.nextLink;
100
+ setContinuationToken(page, continuationToken);
101
+ yield page;
102
+ }
88
103
  while (continuationToken) {
89
104
  result = await this._listByResourceGroupNext(
90
105
  resourceGroupName,
@@ -92,7 +107,9 @@ export class OperationalizationClustersImpl
92
107
  options
93
108
  );
94
109
  continuationToken = result.nextLink;
95
- yield result.value || [];
110
+ let page = result.value || [];
111
+ setContinuationToken(page, continuationToken);
112
+ yield page;
96
113
  }
97
114
  }
98
115
 
@@ -123,22 +140,34 @@ export class OperationalizationClustersImpl
123
140
  [Symbol.asyncIterator]() {
124
141
  return this;
125
142
  },
126
- byPage: () => {
127
- return this.listBySubscriptionIdPagingPage(options);
143
+ byPage: (settings?: PageSettings) => {
144
+ if (settings?.maxPageSize) {
145
+ throw new Error("maxPageSize is not supported by this operation.");
146
+ }
147
+ return this.listBySubscriptionIdPagingPage(options, settings);
128
148
  }
129
149
  };
130
150
  }
131
151
 
132
152
  private async *listBySubscriptionIdPagingPage(
133
- options?: OperationalizationClustersListBySubscriptionIdOptionalParams
153
+ options?: OperationalizationClustersListBySubscriptionIdOptionalParams,
154
+ settings?: PageSettings
134
155
  ): AsyncIterableIterator<OperationalizationCluster[]> {
135
- let result = await this._listBySubscriptionId(options);
136
- yield result.value || [];
137
- let continuationToken = result.nextLink;
156
+ let result: OperationalizationClustersListBySubscriptionIdResponse;
157
+ let continuationToken = settings?.continuationToken;
158
+ if (!continuationToken) {
159
+ result = await this._listBySubscriptionId(options);
160
+ let page = result.value || [];
161
+ continuationToken = result.nextLink;
162
+ setContinuationToken(page, continuationToken);
163
+ yield page;
164
+ }
138
165
  while (continuationToken) {
139
166
  result = await this._listBySubscriptionIdNext(continuationToken, options);
140
167
  continuationToken = result.nextLink;
141
- yield result.value || [];
168
+ let page = result.value || [];
169
+ setContinuationToken(page, continuationToken);
170
+ yield page;
142
171
  }
143
172
  }
144
173
 
@@ -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
+ }
@@ -206,6 +206,15 @@ export declare interface ErrorResponseWrapper {
206
206
  error?: ErrorResponse;
207
207
  }
208
208
 
209
+ /**
210
+ * Given a result page from a pageable operation, returns a
211
+ * continuation token that can be used to begin paging from
212
+ * that point later.
213
+ * @param page A result object from calling .byPage() on a paged operation.
214
+ * @returns The continuation token that can be passed into byPage().
215
+ */
216
+ export declare function getContinuationToken(page: unknown): string | undefined;
217
+
209
218
  /** Global configuration for services in the cluster. */
210
219
  export declare interface GlobalServiceConfiguration {
211
220
  /** Describes unknown properties. The value of an unknown property can be of "any" type. */
@@ -222,94 +231,159 @@ export declare interface GlobalServiceConfiguration {
222
231
 
223
232
  /** Known values of {@link AgentVMSizeTypes} that the service accepts. */
224
233
  export declare enum KnownAgentVMSizeTypes {
234
+ /** StandardA0 */
225
235
  StandardA0 = "Standard_A0",
236
+ /** StandardA1 */
226
237
  StandardA1 = "Standard_A1",
238
+ /** StandardA2 */
227
239
  StandardA2 = "Standard_A2",
240
+ /** StandardA3 */
228
241
  StandardA3 = "Standard_A3",
242
+ /** StandardA4 */
229
243
  StandardA4 = "Standard_A4",
244
+ /** StandardA5 */
230
245
  StandardA5 = "Standard_A5",
246
+ /** StandardA6 */
231
247
  StandardA6 = "Standard_A6",
248
+ /** StandardA7 */
232
249
  StandardA7 = "Standard_A7",
250
+ /** StandardA8 */
233
251
  StandardA8 = "Standard_A8",
252
+ /** StandardA9 */
234
253
  StandardA9 = "Standard_A9",
254
+ /** StandardA10 */
235
255
  StandardA10 = "Standard_A10",
256
+ /** StandardA11 */
236
257
  StandardA11 = "Standard_A11",
258
+ /** StandardD1 */
237
259
  StandardD1 = "Standard_D1",
260
+ /** StandardD2 */
238
261
  StandardD2 = "Standard_D2",
262
+ /** StandardD3 */
239
263
  StandardD3 = "Standard_D3",
264
+ /** StandardD4 */
240
265
  StandardD4 = "Standard_D4",
266
+ /** StandardD11 */
241
267
  StandardD11 = "Standard_D11",
268
+ /** StandardD12 */
242
269
  StandardD12 = "Standard_D12",
270
+ /** StandardD13 */
243
271
  StandardD13 = "Standard_D13",
272
+ /** StandardD14 */
244
273
  StandardD14 = "Standard_D14",
274
+ /** StandardD1V2 */
245
275
  StandardD1V2 = "Standard_D1_v2",
276
+ /** StandardD2V2 */
246
277
  StandardD2V2 = "Standard_D2_v2",
278
+ /** StandardD3V2 */
247
279
  StandardD3V2 = "Standard_D3_v2",
280
+ /** StandardD4V2 */
248
281
  StandardD4V2 = "Standard_D4_v2",
282
+ /** StandardD5V2 */
249
283
  StandardD5V2 = "Standard_D5_v2",
284
+ /** StandardD11V2 */
250
285
  StandardD11V2 = "Standard_D11_v2",
286
+ /** StandardD12V2 */
251
287
  StandardD12V2 = "Standard_D12_v2",
288
+ /** StandardD13V2 */
252
289
  StandardD13V2 = "Standard_D13_v2",
290
+ /** StandardD14V2 */
253
291
  StandardD14V2 = "Standard_D14_v2",
292
+ /** StandardG1 */
254
293
  StandardG1 = "Standard_G1",
294
+ /** StandardG2 */
255
295
  StandardG2 = "Standard_G2",
296
+ /** StandardG3 */
256
297
  StandardG3 = "Standard_G3",
298
+ /** StandardG4 */
257
299
  StandardG4 = "Standard_G4",
300
+ /** StandardG5 */
258
301
  StandardG5 = "Standard_G5",
302
+ /** StandardDS1 */
259
303
  StandardDS1 = "Standard_DS1",
304
+ /** StandardDS2 */
260
305
  StandardDS2 = "Standard_DS2",
306
+ /** StandardDS3 */
261
307
  StandardDS3 = "Standard_DS3",
308
+ /** StandardDS4 */
262
309
  StandardDS4 = "Standard_DS4",
310
+ /** StandardDS11 */
263
311
  StandardDS11 = "Standard_DS11",
312
+ /** StandardDS12 */
264
313
  StandardDS12 = "Standard_DS12",
314
+ /** StandardDS13 */
265
315
  StandardDS13 = "Standard_DS13",
316
+ /** StandardDS14 */
266
317
  StandardDS14 = "Standard_DS14",
318
+ /** StandardGS1 */
267
319
  StandardGS1 = "Standard_GS1",
320
+ /** StandardGS2 */
268
321
  StandardGS2 = "Standard_GS2",
322
+ /** StandardGS3 */
269
323
  StandardGS3 = "Standard_GS3",
324
+ /** StandardGS4 */
270
325
  StandardGS4 = "Standard_GS4",
326
+ /** StandardGS5 */
271
327
  StandardGS5 = "Standard_GS5"
272
328
  }
273
329
 
274
330
  /** Known values of {@link ClusterType} that the service accepts. */
275
331
  export declare enum KnownClusterType {
332
+ /** ACS */
276
333
  ACS = "ACS",
334
+ /** Local */
277
335
  Local = "Local"
278
336
  }
279
337
 
280
338
  /** Known values of {@link OperationStatus} that the service accepts. */
281
339
  export declare enum KnownOperationStatus {
340
+ /** Unknown */
282
341
  Unknown = "Unknown",
342
+ /** Updating */
283
343
  Updating = "Updating",
344
+ /** Creating */
284
345
  Creating = "Creating",
346
+ /** Deleting */
285
347
  Deleting = "Deleting",
348
+ /** Succeeded */
286
349
  Succeeded = "Succeeded",
350
+ /** Failed */
287
351
  Failed = "Failed",
352
+ /** Canceled */
288
353
  Canceled = "Canceled"
289
354
  }
290
355
 
291
356
  /** Known values of {@link OrchestratorType} that the service accepts. */
292
357
  export declare enum KnownOrchestratorType {
358
+ /** Kubernetes */
293
359
  Kubernetes = "Kubernetes",
360
+ /** None */
294
361
  None = "None"
295
362
  }
296
363
 
297
364
  /** Known values of {@link Status} that the service accepts. */
298
365
  export declare enum KnownStatus {
366
+ /** Enabled */
299
367
  Enabled = "Enabled",
368
+ /** Disabled */
300
369
  Disabled = "Disabled"
301
370
  }
302
371
 
303
372
  /** Known values of {@link SystemServiceType} that the service accepts. */
304
373
  export declare enum KnownSystemServiceType {
374
+ /** None */
305
375
  None = "None",
376
+ /** ScoringFrontEnd */
306
377
  ScoringFrontEnd = "ScoringFrontEnd",
378
+ /** BatchFrontEnd */
307
379
  BatchFrontEnd = "BatchFrontEnd"
308
380
  }
309
381
 
310
382
  /** Known values of {@link UpdatesAvailable} that the service accepts. */
311
383
  export declare enum KnownUpdatesAvailable {
384
+ /** Yes */
312
385
  Yes = "Yes",
386
+ /** No */
313
387
  No = "No"
314
388
  }
315
389
 
@@ -346,6 +420,8 @@ export declare class MachineLearningComputeManagementClient extends coreClient.S
346
420
  * @param options The parameter options
347
421
  */
348
422
  constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: MachineLearningComputeManagementClientOptionalParams);
423
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
424
+ private addCustomApiVersionPolicy;
349
425
  operationalizationClusters: OperationalizationClusters;
350
426
  machineLearningCompute: MachineLearningCompute;
351
427
  }
@@ -361,7 +437,7 @@ export declare interface MachineLearningComputeManagementClientOptionalParams ex
361
437
  }
362
438
 
363
439
  /** Instance of an Azure ML Operationalization Cluster resource. */
364
- export declare type OperationalizationCluster = Resource & {
440
+ export declare interface OperationalizationCluster extends Resource {
365
441
  /** The description of the cluster. */
366
442
  description?: string;
367
443
  /**
@@ -396,7 +472,7 @@ export declare type OperationalizationCluster = Resource & {
396
472
  appInsights?: AppInsightsProperties;
397
473
  /** Contains global configuration for the web services in the cluster. */
398
474
  globalServiceConfiguration?: GlobalServiceConfiguration;
399
- };
475
+ }
400
476
 
401
477
  /** Credentials to resources in the cluster. */
402
478
  export declare interface OperationalizationClusterCredentials {
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.18.11"
8
+ "packageVersion": "7.33.6"
9
9
  }
10
10
  ]
11
11
  }