@azure/arm-batch 7.2.1-alpha.20221026.1 → 8.0.0-alpha.20221111.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 (125) hide show
  1. package/CHANGELOG.md +16 -8
  2. package/dist/index.js +337 -126
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/samples-dev/applicationCreateSample.js +1 -1
  7. package/dist-esm/samples-dev/applicationDeleteSample.js +1 -1
  8. package/dist-esm/samples-dev/applicationGetSample.js +1 -1
  9. package/dist-esm/samples-dev/applicationListSample.js +1 -1
  10. package/dist-esm/samples-dev/applicationPackageActivateSample.js +1 -1
  11. package/dist-esm/samples-dev/applicationPackageCreateSample.js +1 -1
  12. package/dist-esm/samples-dev/applicationPackageDeleteSample.js +1 -1
  13. package/dist-esm/samples-dev/applicationPackageGetSample.js +1 -1
  14. package/dist-esm/samples-dev/applicationPackageListSample.js +1 -1
  15. package/dist-esm/samples-dev/applicationUpdateSample.js +1 -1
  16. package/dist-esm/samples-dev/batchAccountCreateSample.js +5 -5
  17. package/dist-esm/samples-dev/batchAccountDeleteSample.js +1 -1
  18. package/dist-esm/samples-dev/batchAccountGetDetectorSample.js +1 -1
  19. package/dist-esm/samples-dev/batchAccountGetKeysSample.js +1 -1
  20. package/dist-esm/samples-dev/batchAccountGetSample.js +2 -2
  21. package/dist-esm/samples-dev/batchAccountListByResourceGroupSample.js +1 -1
  22. package/dist-esm/samples-dev/batchAccountListDetectorsSample.js +1 -1
  23. package/dist-esm/samples-dev/batchAccountListOutboundNetworkDependenciesEndpointsSample.js +3 -3
  24. package/dist-esm/samples-dev/batchAccountListSample.js +1 -1
  25. package/dist-esm/samples-dev/batchAccountRegenerateKeySample.js +1 -1
  26. package/dist-esm/samples-dev/batchAccountSynchronizeAutoStorageKeysSample.js +1 -1
  27. package/dist-esm/samples-dev/batchAccountUpdateSample.js +1 -1
  28. package/dist-esm/samples-dev/certificateCancelDeletionSample.js +5 -1
  29. package/dist-esm/samples-dev/certificateCancelDeletionSample.js.map +1 -1
  30. package/dist-esm/samples-dev/certificateCreateSample.js +9 -9
  31. package/dist-esm/samples-dev/certificateDeleteSample.js +3 -3
  32. package/dist-esm/samples-dev/certificateGetSample.js +6 -6
  33. package/dist-esm/samples-dev/certificateListByBatchAccountSample.js +6 -6
  34. package/dist-esm/samples-dev/certificateUpdateSample.js +3 -3
  35. package/dist-esm/samples-dev/locationCheckNameAvailabilitySample.js +2 -2
  36. package/dist-esm/samples-dev/locationGetQuotasSample.js +1 -1
  37. package/dist-esm/samples-dev/locationListSupportedCloudServiceSkusSample.js +1 -1
  38. package/dist-esm/samples-dev/locationListSupportedVirtualMachineSkusSample.js +1 -1
  39. package/dist-esm/samples-dev/operationsListSample.js +1 -1
  40. package/dist-esm/samples-dev/poolCreateSample.js +11 -10
  41. package/dist-esm/samples-dev/poolCreateSample.js.map +1 -1
  42. package/dist-esm/samples-dev/poolDeleteSample.js +1 -1
  43. package/dist-esm/samples-dev/poolDisableAutoScaleSample.js +1 -1
  44. package/dist-esm/samples-dev/poolGetSample.js +2 -2
  45. package/dist-esm/samples-dev/poolListByBatchAccountSample.js +2 -2
  46. package/dist-esm/samples-dev/poolStopResizeSample.js +1 -1
  47. package/dist-esm/samples-dev/poolUpdateSample.js +6 -5
  48. package/dist-esm/samples-dev/poolUpdateSample.js.map +1 -1
  49. package/dist-esm/samples-dev/privateEndpointConnectionDeleteSample.js +1 -1
  50. package/dist-esm/samples-dev/privateEndpointConnectionGetSample.js +1 -1
  51. package/dist-esm/samples-dev/privateEndpointConnectionListByBatchAccountSample.js +1 -1
  52. package/dist-esm/samples-dev/privateEndpointConnectionUpdateSample.js +1 -1
  53. package/dist-esm/samples-dev/privateLinkResourceGetSample.js +1 -1
  54. package/dist-esm/samples-dev/privateLinkResourceListByBatchAccountSample.js +1 -1
  55. package/dist-esm/src/batchManagementClient.d.ts.map +1 -1
  56. package/dist-esm/src/batchManagementClient.js +21 -19
  57. package/dist-esm/src/batchManagementClient.js.map +1 -1
  58. package/dist-esm/src/index.d.ts +1 -0
  59. package/dist-esm/src/index.d.ts.map +1 -1
  60. package/dist-esm/src/index.js +1 -0
  61. package/dist-esm/src/index.js.map +1 -1
  62. package/dist-esm/src/models/index.d.ts +20 -7
  63. package/dist-esm/src/models/index.d.ts.map +1 -1
  64. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  65. package/dist-esm/src/models/mappers.js +21 -6
  66. package/dist-esm/src/models/mappers.js.map +1 -1
  67. package/dist-esm/src/models/parameters.js +1 -1
  68. package/dist-esm/src/operations/applicationOperations.d.ts.map +1 -1
  69. package/dist-esm/src/operations/applicationOperations.js +19 -7
  70. package/dist-esm/src/operations/applicationOperations.js.map +1 -1
  71. package/dist-esm/src/operations/applicationPackageOperations.d.ts.map +1 -1
  72. package/dist-esm/src/operations/applicationPackageOperations.js +19 -7
  73. package/dist-esm/src/operations/applicationPackageOperations.js.map +1 -1
  74. package/dist-esm/src/operations/batchAccountOperations.d.ts +2 -2
  75. package/dist-esm/src/operations/batchAccountOperations.d.ts.map +1 -1
  76. package/dist-esm/src/operations/batchAccountOperations.js +75 -30
  77. package/dist-esm/src/operations/batchAccountOperations.js.map +1 -1
  78. package/dist-esm/src/operations/certificateOperations.d.ts +25 -7
  79. package/dist-esm/src/operations/certificateOperations.d.ts.map +1 -1
  80. package/dist-esm/src/operations/certificateOperations.js +44 -14
  81. package/dist-esm/src/operations/certificateOperations.js.map +1 -1
  82. package/dist-esm/src/operations/location.d.ts.map +1 -1
  83. package/dist-esm/src/operations/location.js +37 -14
  84. package/dist-esm/src/operations/location.js.map +1 -1
  85. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  86. package/dist-esm/src/operations/operations.js +19 -7
  87. package/dist-esm/src/operations/operations.js.map +1 -1
  88. package/dist-esm/src/operations/poolOperations.d.ts.map +1 -1
  89. package/dist-esm/src/operations/poolOperations.js +19 -7
  90. package/dist-esm/src/operations/poolOperations.js.map +1 -1
  91. package/dist-esm/src/operations/privateEndpointConnectionOperations.d.ts.map +1 -1
  92. package/dist-esm/src/operations/privateEndpointConnectionOperations.js +19 -7
  93. package/dist-esm/src/operations/privateEndpointConnectionOperations.js.map +1 -1
  94. package/dist-esm/src/operations/privateLinkResourceOperations.d.ts.map +1 -1
  95. package/dist-esm/src/operations/privateLinkResourceOperations.js +19 -7
  96. package/dist-esm/src/operations/privateLinkResourceOperations.js.map +1 -1
  97. package/dist-esm/src/operationsInterfaces/batchAccountOperations.d.ts +1 -1
  98. package/dist-esm/src/operationsInterfaces/certificateOperations.d.ts +22 -6
  99. package/dist-esm/src/operationsInterfaces/certificateOperations.d.ts.map +1 -1
  100. package/dist-esm/src/pagingHelper.d.ts +13 -0
  101. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  102. package/dist-esm/src/pagingHelper.js +32 -0
  103. package/dist-esm/src/pagingHelper.js.map +1 -0
  104. package/dist-esm/test/batch_examples.js +1 -1
  105. package/package.json +4 -3
  106. package/review/arm-batch.api.md +11 -3
  107. package/src/batchManagementClient.ts +27 -21
  108. package/src/index.ts +1 -0
  109. package/src/models/index.ts +20 -7
  110. package/src/models/mappers.ts +23 -6
  111. package/src/models/parameters.ts +1 -1
  112. package/src/operations/applicationOperations.ts +27 -9
  113. package/src/operations/applicationPackageOperations.ts +28 -14
  114. package/src/operations/batchAccountOperations.ts +98 -43
  115. package/src/operations/certificateOperations.ts +51 -19
  116. package/src/operations/location.ts +47 -23
  117. package/src/operations/operations.ts +21 -8
  118. package/src/operations/poolOperations.ts +26 -12
  119. package/src/operations/privateEndpointConnectionOperations.ts +26 -12
  120. package/src/operations/privateLinkResourceOperations.ts +26 -12
  121. package/src/operationsInterfaces/batchAccountOperations.ts +1 -1
  122. package/src/operationsInterfaces/certificateOperations.ts +22 -6
  123. package/src/pagingHelper.ts +39 -0
  124. package/types/arm-batch.d.ts +53 -14
  125. 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 { BatchAccountOperations } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -18,14 +19,18 @@ import {
18
19
  BatchAccount,
19
20
  BatchAccountListNextOptionalParams,
20
21
  BatchAccountListOptionalParams,
22
+ BatchAccountListResponse,
21
23
  BatchAccountListByResourceGroupNextOptionalParams,
22
24
  BatchAccountListByResourceGroupOptionalParams,
25
+ BatchAccountListByResourceGroupResponse,
23
26
  DetectorResponse,
24
27
  BatchAccountListDetectorsNextOptionalParams,
25
28
  BatchAccountListDetectorsOptionalParams,
29
+ BatchAccountListDetectorsResponse,
26
30
  OutboundEnvironmentEndpoint,
27
31
  BatchAccountListOutboundNetworkDependenciesEndpointsNextOptionalParams,
28
32
  BatchAccountListOutboundNetworkDependenciesEndpointsOptionalParams,
33
+ BatchAccountListOutboundNetworkDependenciesEndpointsResponse,
29
34
  BatchAccountCreateParameters,
30
35
  BatchAccountCreateOptionalParams,
31
36
  BatchAccountCreateResponse,
@@ -35,18 +40,14 @@ import {
35
40
  BatchAccountDeleteOptionalParams,
36
41
  BatchAccountGetOptionalParams,
37
42
  BatchAccountGetResponse,
38
- BatchAccountListResponse,
39
- BatchAccountListByResourceGroupResponse,
40
43
  BatchAccountSynchronizeAutoStorageKeysOptionalParams,
41
44
  BatchAccountRegenerateKeyParameters,
42
45
  BatchAccountRegenerateKeyOptionalParams,
43
46
  BatchAccountRegenerateKeyResponse,
44
47
  BatchAccountGetKeysOptionalParams,
45
48
  BatchAccountGetKeysResponse,
46
- BatchAccountListDetectorsResponse,
47
49
  BatchAccountGetDetectorOptionalParams,
48
50
  BatchAccountGetDetectorResponse,
49
- BatchAccountListOutboundNetworkDependenciesEndpointsResponse,
50
51
  BatchAccountListNextResponse,
51
52
  BatchAccountListByResourceGroupNextResponse,
52
53
  BatchAccountListDetectorsNextResponse,
@@ -81,22 +82,34 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations {
81
82
  [Symbol.asyncIterator]() {
82
83
  return this;
83
84
  },
84
- byPage: () => {
85
- return this.listPagingPage(options);
85
+ byPage: (settings?: PageSettings) => {
86
+ if (settings?.maxPageSize) {
87
+ throw new Error("maxPageSize is not supported by this operation.");
88
+ }
89
+ return this.listPagingPage(options, settings);
86
90
  }
87
91
  };
88
92
  }
89
93
 
90
94
  private async *listPagingPage(
91
- options?: BatchAccountListOptionalParams
95
+ options?: BatchAccountListOptionalParams,
96
+ settings?: PageSettings
92
97
  ): AsyncIterableIterator<BatchAccount[]> {
93
- let result = await this._list(options);
94
- yield result.value || [];
95
- let continuationToken = result.nextLink;
98
+ let result: BatchAccountListResponse;
99
+ let continuationToken = settings?.continuationToken;
100
+ if (!continuationToken) {
101
+ result = await this._list(options);
102
+ let page = result.value || [];
103
+ continuationToken = result.nextLink;
104
+ setContinuationToken(page, continuationToken);
105
+ yield page;
106
+ }
96
107
  while (continuationToken) {
97
108
  result = await this._listNext(continuationToken, options);
98
109
  continuationToken = result.nextLink;
99
- yield result.value || [];
110
+ let page = result.value || [];
111
+ setContinuationToken(page, continuationToken);
112
+ yield page;
100
113
  }
101
114
  }
102
115
 
@@ -125,19 +138,33 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations {
125
138
  [Symbol.asyncIterator]() {
126
139
  return this;
127
140
  },
128
- byPage: () => {
129
- return this.listByResourceGroupPagingPage(resourceGroupName, options);
141
+ byPage: (settings?: PageSettings) => {
142
+ if (settings?.maxPageSize) {
143
+ throw new Error("maxPageSize is not supported by this operation.");
144
+ }
145
+ return this.listByResourceGroupPagingPage(
146
+ resourceGroupName,
147
+ options,
148
+ settings
149
+ );
130
150
  }
131
151
  };
132
152
  }
133
153
 
134
154
  private async *listByResourceGroupPagingPage(
135
155
  resourceGroupName: string,
136
- options?: BatchAccountListByResourceGroupOptionalParams
156
+ options?: BatchAccountListByResourceGroupOptionalParams,
157
+ settings?: PageSettings
137
158
  ): AsyncIterableIterator<BatchAccount[]> {
138
- let result = await this._listByResourceGroup(resourceGroupName, options);
139
- yield result.value || [];
140
- let continuationToken = result.nextLink;
159
+ let result: BatchAccountListByResourceGroupResponse;
160
+ let continuationToken = settings?.continuationToken;
161
+ if (!continuationToken) {
162
+ result = await this._listByResourceGroup(resourceGroupName, options);
163
+ let page = result.value || [];
164
+ continuationToken = result.nextLink;
165
+ setContinuationToken(page, continuationToken);
166
+ yield page;
167
+ }
141
168
  while (continuationToken) {
142
169
  result = await this._listByResourceGroupNext(
143
170
  resourceGroupName,
@@ -145,7 +172,9 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations {
145
172
  options
146
173
  );
147
174
  continuationToken = result.nextLink;
148
- yield result.value || [];
175
+ let page = result.value || [];
176
+ setContinuationToken(page, continuationToken);
177
+ yield page;
149
178
  }
150
179
  }
151
180
 
@@ -184,11 +213,15 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations {
184
213
  [Symbol.asyncIterator]() {
185
214
  return this;
186
215
  },
187
- byPage: () => {
216
+ byPage: (settings?: PageSettings) => {
217
+ if (settings?.maxPageSize) {
218
+ throw new Error("maxPageSize is not supported by this operation.");
219
+ }
188
220
  return this.listDetectorsPagingPage(
189
221
  resourceGroupName,
190
222
  accountName,
191
- options
223
+ options,
224
+ settings
192
225
  );
193
226
  }
194
227
  };
@@ -197,15 +230,22 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations {
197
230
  private async *listDetectorsPagingPage(
198
231
  resourceGroupName: string,
199
232
  accountName: string,
200
- options?: BatchAccountListDetectorsOptionalParams
233
+ options?: BatchAccountListDetectorsOptionalParams,
234
+ settings?: PageSettings
201
235
  ): AsyncIterableIterator<DetectorResponse[]> {
202
- let result = await this._listDetectors(
203
- resourceGroupName,
204
- accountName,
205
- options
206
- );
207
- yield result.value || [];
208
- let continuationToken = result.nextLink;
236
+ let result: BatchAccountListDetectorsResponse;
237
+ let continuationToken = settings?.continuationToken;
238
+ if (!continuationToken) {
239
+ result = await this._listDetectors(
240
+ resourceGroupName,
241
+ accountName,
242
+ options
243
+ );
244
+ let page = result.value || [];
245
+ continuationToken = result.nextLink;
246
+ setContinuationToken(page, continuationToken);
247
+ yield page;
248
+ }
209
249
  while (continuationToken) {
210
250
  result = await this._listDetectorsNext(
211
251
  resourceGroupName,
@@ -214,7 +254,9 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations {
214
254
  options
215
255
  );
216
256
  continuationToken = result.nextLink;
217
- yield result.value || [];
257
+ let page = result.value || [];
258
+ setContinuationToken(page, continuationToken);
259
+ yield page;
218
260
  }
219
261
  }
220
262
 
@@ -238,7 +280,7 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations {
238
280
  * you must make sure your network allows outbound access to these endpoints. Failure to allow access
239
281
  * to these endpoints may cause Batch to mark the affected nodes as unusable. For more information
240
282
  * about creating a pool inside of a virtual network, see
241
- * https://docs.microsoft.com/azure/batch/batch-virtual-network
283
+ * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network.
242
284
  * @param resourceGroupName The name of the resource group that contains the Batch account.
243
285
  * @param accountName The name of the Batch account.
244
286
  * @param options The options parameters.
@@ -260,11 +302,15 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations {
260
302
  [Symbol.asyncIterator]() {
261
303
  return this;
262
304
  },
263
- byPage: () => {
305
+ byPage: (settings?: PageSettings) => {
306
+ if (settings?.maxPageSize) {
307
+ throw new Error("maxPageSize is not supported by this operation.");
308
+ }
264
309
  return this.listOutboundNetworkDependenciesEndpointsPagingPage(
265
310
  resourceGroupName,
266
311
  accountName,
267
- options
312
+ options,
313
+ settings
268
314
  );
269
315
  }
270
316
  };
@@ -273,15 +319,22 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations {
273
319
  private async *listOutboundNetworkDependenciesEndpointsPagingPage(
274
320
  resourceGroupName: string,
275
321
  accountName: string,
276
- options?: BatchAccountListOutboundNetworkDependenciesEndpointsOptionalParams
322
+ options?: BatchAccountListOutboundNetworkDependenciesEndpointsOptionalParams,
323
+ settings?: PageSettings
277
324
  ): AsyncIterableIterator<OutboundEnvironmentEndpoint[]> {
278
- let result = await this._listOutboundNetworkDependenciesEndpoints(
279
- resourceGroupName,
280
- accountName,
281
- options
282
- );
283
- yield result.value || [];
284
- let continuationToken = result.nextLink;
325
+ let result: BatchAccountListOutboundNetworkDependenciesEndpointsResponse;
326
+ let continuationToken = settings?.continuationToken;
327
+ if (!continuationToken) {
328
+ result = await this._listOutboundNetworkDependenciesEndpoints(
329
+ resourceGroupName,
330
+ accountName,
331
+ options
332
+ );
333
+ let page = result.value || [];
334
+ continuationToken = result.nextLink;
335
+ setContinuationToken(page, continuationToken);
336
+ yield page;
337
+ }
285
338
  while (continuationToken) {
286
339
  result = await this._listOutboundNetworkDependenciesEndpointsNext(
287
340
  resourceGroupName,
@@ -290,7 +343,9 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations {
290
343
  options
291
344
  );
292
345
  continuationToken = result.nextLink;
293
- yield result.value || [];
346
+ let page = result.value || [];
347
+ setContinuationToken(page, continuationToken);
348
+ yield page;
294
349
  }
295
350
  }
296
351
 
@@ -655,7 +710,7 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations {
655
710
  * you must make sure your network allows outbound access to these endpoints. Failure to allow access
656
711
  * to these endpoints may cause Batch to mark the affected nodes as unusable. For more information
657
712
  * about creating a pool inside of a virtual network, see
658
- * https://docs.microsoft.com/azure/batch/batch-virtual-network
713
+ * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network.
659
714
  * @param resourceGroupName The name of the resource group that contains the Batch account.
660
715
  * @param accountName The name of the Batch account.
661
716
  * @param options The options parameters.
@@ -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 { CertificateOperations } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -46,7 +47,9 @@ export class CertificateOperationsImpl implements CertificateOperations {
46
47
  }
47
48
 
48
49
  /**
49
- * Lists all of the certificates in the specified account.
50
+ * Warning: This operation is deprecated and will be removed after February, 2024. Please use the
51
+ * [Azure KeyVault
52
+ * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.
50
53
  * @param resourceGroupName The name of the resource group that contains the Batch account.
51
54
  * @param accountName The name of the Batch account.
52
55
  * @param options The options parameters.
@@ -68,11 +71,15 @@ export class CertificateOperationsImpl implements CertificateOperations {
68
71
  [Symbol.asyncIterator]() {
69
72
  return this;
70
73
  },
71
- byPage: () => {
74
+ byPage: (settings?: PageSettings) => {
75
+ if (settings?.maxPageSize) {
76
+ throw new Error("maxPageSize is not supported by this operation.");
77
+ }
72
78
  return this.listByBatchAccountPagingPage(
73
79
  resourceGroupName,
74
80
  accountName,
75
- options
81
+ options,
82
+ settings
76
83
  );
77
84
  }
78
85
  };
@@ -81,15 +88,22 @@ export class CertificateOperationsImpl implements CertificateOperations {
81
88
  private async *listByBatchAccountPagingPage(
82
89
  resourceGroupName: string,
83
90
  accountName: string,
84
- options?: CertificateListByBatchAccountOptionalParams
91
+ options?: CertificateListByBatchAccountOptionalParams,
92
+ settings?: PageSettings
85
93
  ): AsyncIterableIterator<Certificate[]> {
86
- let result = await this._listByBatchAccount(
87
- resourceGroupName,
88
- accountName,
89
- options
90
- );
91
- yield result.value || [];
92
- let continuationToken = result.nextLink;
94
+ let result: CertificateListByBatchAccountResponse;
95
+ let continuationToken = settings?.continuationToken;
96
+ if (!continuationToken) {
97
+ result = await this._listByBatchAccount(
98
+ resourceGroupName,
99
+ accountName,
100
+ options
101
+ );
102
+ let page = result.value || [];
103
+ continuationToken = result.nextLink;
104
+ setContinuationToken(page, continuationToken);
105
+ yield page;
106
+ }
93
107
  while (continuationToken) {
94
108
  result = await this._listByBatchAccountNext(
95
109
  resourceGroupName,
@@ -98,7 +112,9 @@ export class CertificateOperationsImpl implements CertificateOperations {
98
112
  options
99
113
  );
100
114
  continuationToken = result.nextLink;
101
- yield result.value || [];
115
+ let page = result.value || [];
116
+ setContinuationToken(page, continuationToken);
117
+ yield page;
102
118
  }
103
119
  }
104
120
 
@@ -117,7 +133,9 @@ export class CertificateOperationsImpl implements CertificateOperations {
117
133
  }
118
134
 
119
135
  /**
120
- * Lists all of the certificates in the specified account.
136
+ * Warning: This operation is deprecated and will be removed after February, 2024. Please use the
137
+ * [Azure KeyVault
138
+ * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.
121
139
  * @param resourceGroupName The name of the resource group that contains the Batch account.
122
140
  * @param accountName The name of the Batch account.
123
141
  * @param options The options parameters.
@@ -134,7 +152,9 @@ export class CertificateOperationsImpl implements CertificateOperations {
134
152
  }
135
153
 
136
154
  /**
137
- * Creates a new certificate inside the specified account.
155
+ * Warning: This operation is deprecated and will be removed after February, 2024. Please use the
156
+ * [Azure KeyVault
157
+ * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.
138
158
  * @param resourceGroupName The name of the resource group that contains the Batch account.
139
159
  * @param accountName The name of the Batch account.
140
160
  * @param certificateName The identifier for the certificate. This must be made up of algorithm and
@@ -157,7 +177,9 @@ export class CertificateOperationsImpl implements CertificateOperations {
157
177
  }
158
178
 
159
179
  /**
160
- * Updates the properties of an existing certificate.
180
+ * Warning: This operation is deprecated and will be removed after February, 2024. Please use the
181
+ * [Azure KeyVault
182
+ * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.
161
183
  * @param resourceGroupName The name of the resource group that contains the Batch account.
162
184
  * @param accountName The name of the Batch account.
163
185
  * @param certificateName The identifier for the certificate. This must be made up of algorithm and
@@ -180,7 +202,9 @@ export class CertificateOperationsImpl implements CertificateOperations {
180
202
  }
181
203
 
182
204
  /**
183
- * Deletes the specified certificate.
205
+ * Warning: This operation is deprecated and will be removed after February, 2024. Please use the
206
+ * [Azure KeyVault
207
+ * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.
184
208
  * @param resourceGroupName The name of the resource group that contains the Batch account.
185
209
  * @param accountName The name of the Batch account.
186
210
  * @param certificateName The identifier for the certificate. This must be made up of algorithm and
@@ -248,7 +272,9 @@ export class CertificateOperationsImpl implements CertificateOperations {
248
272
  }
249
273
 
250
274
  /**
251
- * Deletes the specified certificate.
275
+ * Warning: This operation is deprecated and will be removed after February, 2024. Please use the
276
+ * [Azure KeyVault
277
+ * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.
252
278
  * @param resourceGroupName The name of the resource group that contains the Batch account.
253
279
  * @param accountName The name of the Batch account.
254
280
  * @param certificateName The identifier for the certificate. This must be made up of algorithm and
@@ -272,7 +298,9 @@ export class CertificateOperationsImpl implements CertificateOperations {
272
298
  }
273
299
 
274
300
  /**
275
- * Gets information about the specified certificate.
301
+ * Warning: This operation is deprecated and will be removed after February, 2024. Please use the
302
+ * [Azure KeyVault
303
+ * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.
276
304
  * @param resourceGroupName The name of the resource group that contains the Batch account.
277
305
  * @param accountName The name of the Batch account.
278
306
  * @param certificateName The identifier for the certificate. This must be made up of algorithm and
@@ -299,6 +327,10 @@ export class CertificateOperationsImpl implements CertificateOperations {
299
327
  * delete the certificate, you do not need to run this operation after the deletion failed. You must
300
328
  * make sure that the certificate is not being used by any resources, and then you can try again to
301
329
  * delete the certificate.
330
+ *
331
+ * Warning: This operation is deprecated and will be removed after February, 2024. Please use the
332
+ * [Azure KeyVault
333
+ * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.
302
334
  * @param resourceGroupName The name of the resource group that contains the Batch account.
303
335
  * @param accountName The name of the Batch account.
304
336
  * @param certificateName The identifier for the certificate. This must be made up of algorithm and
@@ -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 { Location } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -16,12 +17,12 @@ import {
16
17
  SupportedSku,
17
18
  LocationListSupportedVirtualMachineSkusNextOptionalParams,
18
19
  LocationListSupportedVirtualMachineSkusOptionalParams,
20
+ LocationListSupportedVirtualMachineSkusResponse,
19
21
  LocationListSupportedCloudServiceSkusNextOptionalParams,
20
22
  LocationListSupportedCloudServiceSkusOptionalParams,
23
+ LocationListSupportedCloudServiceSkusResponse,
21
24
  LocationGetQuotasOptionalParams,
22
25
  LocationGetQuotasResponse,
23
- LocationListSupportedVirtualMachineSkusResponse,
24
- LocationListSupportedCloudServiceSkusResponse,
25
26
  CheckNameAvailabilityParameters,
26
27
  LocationCheckNameAvailabilityOptionalParams,
27
28
  LocationCheckNameAvailabilityResponse,
@@ -62,10 +63,14 @@ export class LocationImpl implements Location {
62
63
  [Symbol.asyncIterator]() {
63
64
  return this;
64
65
  },
65
- byPage: () => {
66
+ byPage: (settings?: PageSettings) => {
67
+ if (settings?.maxPageSize) {
68
+ throw new Error("maxPageSize is not supported by this operation.");
69
+ }
66
70
  return this.listSupportedVirtualMachineSkusPagingPage(
67
71
  locationName,
68
- options
72
+ options,
73
+ settings
69
74
  );
70
75
  }
71
76
  };
@@ -73,14 +78,21 @@ export class LocationImpl implements Location {
73
78
 
74
79
  private async *listSupportedVirtualMachineSkusPagingPage(
75
80
  locationName: string,
76
- options?: LocationListSupportedVirtualMachineSkusOptionalParams
81
+ options?: LocationListSupportedVirtualMachineSkusOptionalParams,
82
+ settings?: PageSettings
77
83
  ): AsyncIterableIterator<SupportedSku[]> {
78
- let result = await this._listSupportedVirtualMachineSkus(
79
- locationName,
80
- options
81
- );
82
- yield result.value || [];
83
- let continuationToken = result.nextLink;
84
+ let result: LocationListSupportedVirtualMachineSkusResponse;
85
+ let continuationToken = settings?.continuationToken;
86
+ if (!continuationToken) {
87
+ result = await this._listSupportedVirtualMachineSkus(
88
+ locationName,
89
+ options
90
+ );
91
+ let page = result.value || [];
92
+ continuationToken = result.nextLink;
93
+ setContinuationToken(page, continuationToken);
94
+ yield page;
95
+ }
84
96
  while (continuationToken) {
85
97
  result = await this._listSupportedVirtualMachineSkusNext(
86
98
  locationName,
@@ -88,7 +100,9 @@ export class LocationImpl implements Location {
88
100
  options
89
101
  );
90
102
  continuationToken = result.nextLink;
91
- yield result.value || [];
103
+ let page = result.value || [];
104
+ setContinuationToken(page, continuationToken);
105
+ yield page;
92
106
  }
93
107
  }
94
108
 
@@ -124,10 +138,14 @@ export class LocationImpl implements Location {
124
138
  [Symbol.asyncIterator]() {
125
139
  return this;
126
140
  },
127
- byPage: () => {
141
+ byPage: (settings?: PageSettings) => {
142
+ if (settings?.maxPageSize) {
143
+ throw new Error("maxPageSize is not supported by this operation.");
144
+ }
128
145
  return this.listSupportedCloudServiceSkusPagingPage(
129
146
  locationName,
130
- options
147
+ options,
148
+ settings
131
149
  );
132
150
  }
133
151
  };
@@ -135,14 +153,18 @@ export class LocationImpl implements Location {
135
153
 
136
154
  private async *listSupportedCloudServiceSkusPagingPage(
137
155
  locationName: string,
138
- options?: LocationListSupportedCloudServiceSkusOptionalParams
156
+ options?: LocationListSupportedCloudServiceSkusOptionalParams,
157
+ settings?: PageSettings
139
158
  ): AsyncIterableIterator<SupportedSku[]> {
140
- let result = await this._listSupportedCloudServiceSkus(
141
- locationName,
142
- options
143
- );
144
- yield result.value || [];
145
- let continuationToken = result.nextLink;
159
+ let result: LocationListSupportedCloudServiceSkusResponse;
160
+ let continuationToken = settings?.continuationToken;
161
+ if (!continuationToken) {
162
+ result = await this._listSupportedCloudServiceSkus(locationName, options);
163
+ let page = result.value || [];
164
+ continuationToken = result.nextLink;
165
+ setContinuationToken(page, continuationToken);
166
+ yield page;
167
+ }
146
168
  while (continuationToken) {
147
169
  result = await this._listSupportedCloudServiceSkusNext(
148
170
  locationName,
@@ -150,7 +172,9 @@ export class LocationImpl implements Location {
150
172
  options
151
173
  );
152
174
  continuationToken = result.nextLink;
153
- yield result.value || [];
175
+ let page = result.value || [];
176
+ setContinuationToken(page, continuationToken);
177
+ yield page;
154
178
  }
155
179
  }
156
180
 
@@ -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 { Operations } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -48,22 +49,34 @@ export class OperationsImpl implements Operations {
48
49
  [Symbol.asyncIterator]() {
49
50
  return this;
50
51
  },
51
- byPage: () => {
52
- return this.listPagingPage(options);
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);
53
57
  }
54
58
  };
55
59
  }
56
60
 
57
61
  private async *listPagingPage(
58
- options?: OperationsListOptionalParams
62
+ options?: OperationsListOptionalParams,
63
+ settings?: PageSettings
59
64
  ): AsyncIterableIterator<Operation[]> {
60
- let result = await this._list(options);
61
- yield result.value || [];
62
- let continuationToken = result.nextLink;
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
+ }
63
74
  while (continuationToken) {
64
75
  result = await this._listNext(continuationToken, options);
65
76
  continuationToken = result.nextLink;
66
- yield result.value || [];
77
+ let page = result.value || [];
78
+ setContinuationToken(page, continuationToken);
79
+ yield page;
67
80
  }
68
81
  }
69
82