@azure/arm-batch 6.0.0 → 7.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 (254) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/{LICENSE.txt → LICENSE} +1 -1
  3. package/README.md +70 -82
  4. package/dist/index.js +6873 -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/src/batchManagementClient.d.ts +24 -0
  9. package/dist-esm/src/batchManagementClient.d.ts.map +1 -0
  10. package/dist-esm/src/batchManagementClient.js +31 -0
  11. package/dist-esm/src/batchManagementClient.js.map +1 -0
  12. package/dist-esm/src/batchManagementClientContext.d.ts +17 -0
  13. package/dist-esm/src/batchManagementClientContext.d.ts.map +1 -0
  14. package/dist-esm/src/batchManagementClientContext.js +50 -0
  15. package/dist-esm/src/batchManagementClientContext.js.map +1 -0
  16. package/dist-esm/src/index.d.ts +6 -0
  17. package/dist-esm/src/index.d.ts.map +1 -0
  18. package/dist-esm/src/index.js +13 -0
  19. package/dist-esm/src/index.js.map +1 -0
  20. package/dist-esm/src/lroImpl.d.ts +16 -0
  21. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  22. package/dist-esm/src/lroImpl.js +29 -0
  23. package/dist-esm/src/lroImpl.js.map +1 -0
  24. package/dist-esm/src/models/index.d.ts +1780 -0
  25. package/dist-esm/src/models/index.d.ts.map +1 -0
  26. package/{esm → dist-esm/src}/models/index.js +1 -0
  27. package/dist-esm/src/models/index.js.map +1 -0
  28. package/dist-esm/src/models/mappers.d.ts +112 -0
  29. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  30. package/{esm → dist-esm/src}/models/mappers.js +1723 -1885
  31. package/dist-esm/src/models/mappers.js.map +1 -0
  32. package/dist-esm/src/models/parameters.d.ts +34 -0
  33. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  34. package/dist-esm/src/models/parameters.js +303 -0
  35. package/dist-esm/src/models/parameters.js.map +1 -0
  36. package/dist-esm/src/operations/applicationOperations.d.ts +71 -0
  37. package/dist-esm/src/operations/applicationOperations.d.ts.map +1 -0
  38. package/dist-esm/src/operations/applicationOperations.js +269 -0
  39. package/dist-esm/src/operations/applicationOperations.js.map +1 -0
  40. package/dist-esm/src/operations/applicationPackageOperations.d.ts +83 -0
  41. package/dist-esm/src/operations/applicationPackageOperations.d.ts.map +1 -0
  42. package/dist-esm/src/operations/applicationPackageOperations.js +294 -0
  43. package/dist-esm/src/operations/applicationPackageOperations.js.map +1 -0
  44. package/dist-esm/src/operations/batchAccountOperations.d.ts +171 -0
  45. package/dist-esm/src/operations/batchAccountOperations.d.ts.map +1 -0
  46. package/dist-esm/src/operations/batchAccountOperations.js +681 -0
  47. package/dist-esm/src/operations/batchAccountOperations.js.map +1 -0
  48. package/dist-esm/src/operations/certificateOperations.d.ts +106 -0
  49. package/dist-esm/src/operations/certificateOperations.d.ts.map +1 -0
  50. package/dist-esm/src/operations/certificateOperations.js +388 -0
  51. package/dist-esm/src/operations/certificateOperations.js.map +1 -0
  52. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  53. package/dist-esm/src/operations/index.d.ts.map +1 -0
  54. package/{esm → dist-esm/src}/operations/index.js +1 -2
  55. package/dist-esm/src/operations/index.js.map +1 -0
  56. package/dist-esm/src/operations/location.d.ts +71 -0
  57. package/dist-esm/src/operations/location.d.ts.map +1 -0
  58. package/dist-esm/src/operations/location.js +316 -0
  59. package/dist-esm/src/operations/location.js.map +1 -0
  60. package/dist-esm/src/operations/operations.d.ts +32 -0
  61. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  62. package/dist-esm/src/operations/operations.js +120 -0
  63. package/dist-esm/src/operations/operations.js.map +1 -0
  64. package/dist-esm/src/operations/poolOperations.d.ts +103 -0
  65. package/dist-esm/src/operations/poolOperations.d.ts.map +1 -0
  66. package/dist-esm/src/operations/poolOperations.js +410 -0
  67. package/dist-esm/src/operations/poolOperations.js.map +1 -0
  68. package/dist-esm/src/operations/privateEndpointConnectionOperations.d.ts +70 -0
  69. package/dist-esm/src/operations/privateEndpointConnectionOperations.d.ts.map +1 -0
  70. package/dist-esm/src/operations/privateEndpointConnectionOperations.js +278 -0
  71. package/dist-esm/src/operations/privateEndpointConnectionOperations.js.map +1 -0
  72. package/dist-esm/src/operations/privateLinkResourceOperations.d.ts +47 -0
  73. package/dist-esm/src/operations/privateLinkResourceOperations.d.ts.map +1 -0
  74. package/dist-esm/src/operations/privateLinkResourceOperations.js +170 -0
  75. package/dist-esm/src/operations/privateLinkResourceOperations.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/applicationOperations.d.ts +46 -0
  77. package/dist-esm/src/operationsInterfaces/applicationOperations.d.ts.map +1 -0
  78. package/{src/models/operationsMappers.ts → dist-esm/src/operationsInterfaces/applicationOperations.js} +2 -7
  79. package/dist-esm/src/operationsInterfaces/applicationOperations.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/applicationPackageOperations.d.ts +56 -0
  81. package/dist-esm/src/operationsInterfaces/applicationPackageOperations.d.ts.map +1 -0
  82. package/{esm/models/operationsMappers.js → dist-esm/src/operationsInterfaces/applicationPackageOperations.js} +2 -2
  83. package/dist-esm/src/operationsInterfaces/applicationPackageOperations.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/batchAccountOperations.d.ts +112 -0
  85. package/dist-esm/src/operationsInterfaces/batchAccountOperations.d.ts.map +1 -0
  86. package/{src/models/locationMappers.ts → dist-esm/src/operationsInterfaces/batchAccountOperations.js} +2 -10
  87. package/dist-esm/src/operationsInterfaces/batchAccountOperations.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/certificateOperations.d.ts +81 -0
  89. package/dist-esm/src/operationsInterfaces/certificateOperations.d.ts.map +1 -0
  90. package/dist-esm/src/operationsInterfaces/certificateOperations.js +9 -0
  91. package/dist-esm/src/operationsInterfaces/certificateOperations.js.map +1 -0
  92. package/dist-esm/src/operationsInterfaces/index.d.ts +10 -0
  93. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  94. package/dist-esm/src/operationsInterfaces/index.js +17 -0
  95. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  96. package/dist-esm/src/operationsInterfaces/location.d.ts +31 -0
  97. package/dist-esm/src/operationsInterfaces/location.d.ts.map +1 -0
  98. package/dist-esm/src/operationsInterfaces/location.js +9 -0
  99. package/dist-esm/src/operationsInterfaces/location.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/poolOperations.d.ts +78 -0
  105. package/dist-esm/src/operationsInterfaces/poolOperations.d.ts.map +1 -0
  106. package/dist-esm/src/operationsInterfaces/poolOperations.js +9 -0
  107. package/dist-esm/src/operationsInterfaces/poolOperations.js.map +1 -0
  108. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.d.ts +45 -0
  109. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.d.ts.map +1 -0
  110. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.js +9 -0
  111. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.js.map +1 -0
  112. package/dist-esm/src/operationsInterfaces/privateLinkResourceOperations.d.ts +22 -0
  113. package/dist-esm/src/operationsInterfaces/privateLinkResourceOperations.d.ts.map +1 -0
  114. package/dist-esm/src/operationsInterfaces/privateLinkResourceOperations.js +9 -0
  115. package/dist-esm/src/operationsInterfaces/privateLinkResourceOperations.js.map +1 -0
  116. package/dist-esm/test/sampleTest.d.ts +4 -0
  117. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  118. package/dist-esm/test/sampleTest.js +479 -0
  119. package/dist-esm/test/sampleTest.js.map +1 -0
  120. package/package.json +66 -32
  121. package/review/arm-batch.api.md +1459 -0
  122. package/rollup.config.js +181 -30
  123. package/src/batchManagementClient.ts +59 -48
  124. package/src/batchManagementClientContext.ts +46 -43
  125. package/src/index.ts +13 -0
  126. package/src/lroImpl.ts +34 -0
  127. package/src/models/index.ts +1460 -3635
  128. package/src/models/mappers.ts +1705 -1851
  129. package/src/models/parameters.ts +216 -117
  130. package/src/operations/applicationOperations.ts +215 -263
  131. package/src/operations/applicationPackageOperations.ts +252 -279
  132. package/src/operations/batchAccountOperations.ts +660 -572
  133. package/src/operations/certificateOperations.ts +360 -359
  134. package/src/operations/index.ts +1 -2
  135. package/src/operations/location.ts +285 -234
  136. package/src/operations/operations.ts +82 -70
  137. package/src/operations/poolOperations.ts +373 -378
  138. package/src/operations/privateEndpointConnectionOperations.ts +269 -169
  139. package/src/operations/privateLinkResourceOperations.ts +156 -126
  140. package/src/operationsInterfaces/applicationOperations.ts +90 -0
  141. package/src/operationsInterfaces/applicationPackageOperations.ts +106 -0
  142. package/src/operationsInterfaces/batchAccountOperations.ts +196 -0
  143. package/src/operationsInterfaces/certificateOperations.ts +139 -0
  144. package/src/operationsInterfaces/index.ts +17 -0
  145. package/src/operationsInterfaces/location.ts +62 -0
  146. package/src/operationsInterfaces/operations.ts +22 -0
  147. package/src/operationsInterfaces/poolOperations.ts +142 -0
  148. package/src/operationsInterfaces/privateEndpointConnectionOperations.ts +87 -0
  149. package/src/operationsInterfaces/privateLinkResourceOperations.ts +45 -0
  150. package/tsconfig.json +3 -3
  151. package/types/arm-batch.d.ts +2528 -0
  152. package/types/tsdoc-metadata.json +11 -0
  153. package/dist/arm-batch.js +0 -6972
  154. package/dist/arm-batch.js.map +0 -1
  155. package/dist/arm-batch.min.js +0 -1
  156. package/dist/arm-batch.min.js.map +0 -1
  157. package/esm/batchManagementClient.d.ts +0 -33
  158. package/esm/batchManagementClient.d.ts.map +0 -1
  159. package/esm/batchManagementClient.js +0 -46
  160. package/esm/batchManagementClient.js.map +0 -1
  161. package/esm/batchManagementClientContext.d.ts +0 -23
  162. package/esm/batchManagementClientContext.d.ts.map +0 -1
  163. package/esm/batchManagementClientContext.js +0 -61
  164. package/esm/batchManagementClientContext.js.map +0 -1
  165. package/esm/models/applicationOperationsMappers.d.ts +0 -2
  166. package/esm/models/applicationOperationsMappers.d.ts.map +0 -1
  167. package/esm/models/applicationOperationsMappers.js +0 -9
  168. package/esm/models/applicationOperationsMappers.js.map +0 -1
  169. package/esm/models/applicationPackageOperationsMappers.d.ts +0 -2
  170. package/esm/models/applicationPackageOperationsMappers.d.ts.map +0 -1
  171. package/esm/models/applicationPackageOperationsMappers.js +0 -9
  172. package/esm/models/applicationPackageOperationsMappers.js.map +0 -1
  173. package/esm/models/batchAccountOperationsMappers.d.ts +0 -2
  174. package/esm/models/batchAccountOperationsMappers.d.ts.map +0 -1
  175. package/esm/models/batchAccountOperationsMappers.js +0 -9
  176. package/esm/models/batchAccountOperationsMappers.js.map +0 -1
  177. package/esm/models/certificateOperationsMappers.d.ts +0 -2
  178. package/esm/models/certificateOperationsMappers.d.ts.map +0 -1
  179. package/esm/models/certificateOperationsMappers.js +0 -9
  180. package/esm/models/certificateOperationsMappers.js.map +0 -1
  181. package/esm/models/index.d.ts +0 -3946
  182. package/esm/models/index.d.ts.map +0 -1
  183. package/esm/models/index.js.map +0 -1
  184. package/esm/models/locationMappers.d.ts +0 -2
  185. package/esm/models/locationMappers.d.ts.map +0 -1
  186. package/esm/models/locationMappers.js +0 -9
  187. package/esm/models/locationMappers.js.map +0 -1
  188. package/esm/models/mappers.d.ts +0 -110
  189. package/esm/models/mappers.d.ts.map +0 -1
  190. package/esm/models/mappers.js.map +0 -1
  191. package/esm/models/operationsMappers.d.ts +0 -2
  192. package/esm/models/operationsMappers.d.ts.map +0 -1
  193. package/esm/models/operationsMappers.js.map +0 -1
  194. package/esm/models/parameters.d.ts +0 -21
  195. package/esm/models/parameters.d.ts.map +0 -1
  196. package/esm/models/parameters.js +0 -250
  197. package/esm/models/parameters.js.map +0 -1
  198. package/esm/models/poolOperationsMappers.d.ts +0 -2
  199. package/esm/models/poolOperationsMappers.d.ts.map +0 -1
  200. package/esm/models/poolOperationsMappers.js +0 -9
  201. package/esm/models/poolOperationsMappers.js.map +0 -1
  202. package/esm/models/privateEndpointConnectionOperationsMappers.d.ts +0 -2
  203. package/esm/models/privateEndpointConnectionOperationsMappers.d.ts.map +0 -1
  204. package/esm/models/privateEndpointConnectionOperationsMappers.js +0 -9
  205. package/esm/models/privateEndpointConnectionOperationsMappers.js.map +0 -1
  206. package/esm/models/privateLinkResourceOperationsMappers.d.ts +0 -2
  207. package/esm/models/privateLinkResourceOperationsMappers.d.ts.map +0 -1
  208. package/esm/models/privateLinkResourceOperationsMappers.js +0 -9
  209. package/esm/models/privateLinkResourceOperationsMappers.js.map +0 -1
  210. package/esm/operations/applicationOperations.d.ts +0 -151
  211. package/esm/operations/applicationOperations.d.ts.map +0 -1
  212. package/esm/operations/applicationOperations.js +0 -232
  213. package/esm/operations/applicationOperations.js.map +0 -1
  214. package/esm/operations/applicationPackageOperations.d.ts +0 -171
  215. package/esm/operations/applicationPackageOperations.d.ts.map +0 -1
  216. package/esm/operations/applicationPackageOperations.js +0 -244
  217. package/esm/operations/applicationPackageOperations.js.map +0 -1
  218. package/esm/operations/batchAccountOperations.d.ts +0 -299
  219. package/esm/operations/batchAccountOperations.d.ts.map +0 -1
  220. package/esm/operations/batchAccountOperations.js +0 -493
  221. package/esm/operations/batchAccountOperations.js.map +0 -1
  222. package/esm/operations/certificateOperations.d.ts +0 -207
  223. package/esm/operations/certificateOperations.d.ts.map +0 -1
  224. package/esm/operations/certificateOperations.js +0 -310
  225. package/esm/operations/certificateOperations.js.map +0 -1
  226. package/esm/operations/index.d.ts.map +0 -1
  227. package/esm/operations/index.js.map +0 -1
  228. package/esm/operations/location.d.ts +0 -124
  229. package/esm/operations/location.d.ts.map +0 -1
  230. package/esm/operations/location.js +0 -216
  231. package/esm/operations/location.js.map +0 -1
  232. package/esm/operations/operations.d.ts +0 -46
  233. package/esm/operations/operations.d.ts.map +0 -1
  234. package/esm/operations/operations.js +0 -79
  235. package/esm/operations/operations.js.map +0 -1
  236. package/esm/operations/poolOperations.d.ts +0 -206
  237. package/esm/operations/poolOperations.d.ts.map +0 -1
  238. package/esm/operations/poolOperations.js +0 -341
  239. package/esm/operations/poolOperations.js.map +0 -1
  240. package/esm/operations/privateEndpointConnectionOperations.d.ts +0 -104
  241. package/esm/operations/privateEndpointConnectionOperations.d.ts.map +0 -1
  242. package/esm/operations/privateEndpointConnectionOperations.js +0 -195
  243. package/esm/operations/privateEndpointConnectionOperations.js.map +0 -1
  244. package/esm/operations/privateLinkResourceOperations.d.ts +0 -79
  245. package/esm/operations/privateLinkResourceOperations.d.ts.map +0 -1
  246. package/esm/operations/privateLinkResourceOperations.js +0 -121
  247. package/esm/operations/privateLinkResourceOperations.js.map +0 -1
  248. package/src/models/applicationOperationsMappers.ts +0 -79
  249. package/src/models/applicationPackageOperationsMappers.ts +0 -80
  250. package/src/models/batchAccountOperationsMappers.ts +0 -89
  251. package/src/models/certificateOperationsMappers.ts +0 -84
  252. package/src/models/poolOperationsMappers.ts +0 -85
  253. package/src/models/privateEndpointConnectionOperationsMappers.ts +0 -80
  254. package/src/models/privateLinkResourceOperationsMappers.ts +0 -79
@@ -3,210 +3,490 @@
3
3
  * Licensed under the MIT License.
4
4
  *
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is
7
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
7
  */
9
8
 
10
- import * as msRest from "@azure/ms-rest-js";
11
- import * as msRestAzure from "@azure/ms-rest-azure-js";
12
- import * as Models from "../models";
13
- import * as Mappers from "../models/batchAccountOperationsMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { BatchAccountOperations } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
14
13
  import * as Parameters from "../models/parameters";
15
14
  import { BatchManagementClientContext } from "../batchManagementClientContext";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ BatchAccount,
19
+ BatchAccountListNextOptionalParams,
20
+ BatchAccountListOptionalParams,
21
+ BatchAccountListByResourceGroupNextOptionalParams,
22
+ BatchAccountListByResourceGroupOptionalParams,
23
+ OutboundEnvironmentEndpoint,
24
+ BatchAccountListOutboundNetworkDependenciesEndpointsNextOptionalParams,
25
+ BatchAccountListOutboundNetworkDependenciesEndpointsOptionalParams,
26
+ BatchAccountCreateParameters,
27
+ BatchAccountCreateOptionalParams,
28
+ BatchAccountCreateResponse,
29
+ BatchAccountUpdateParameters,
30
+ BatchAccountUpdateOptionalParams,
31
+ BatchAccountUpdateResponse,
32
+ BatchAccountDeleteOptionalParams,
33
+ BatchAccountGetOptionalParams,
34
+ BatchAccountGetResponse,
35
+ BatchAccountListResponse,
36
+ BatchAccountListByResourceGroupResponse,
37
+ BatchAccountSynchronizeAutoStorageKeysOptionalParams,
38
+ BatchAccountRegenerateKeyParameters,
39
+ BatchAccountRegenerateKeyOptionalParams,
40
+ BatchAccountRegenerateKeyResponse,
41
+ BatchAccountGetKeysOptionalParams,
42
+ BatchAccountGetKeysResponse,
43
+ BatchAccountListOutboundNetworkDependenciesEndpointsResponse,
44
+ BatchAccountListNextResponse,
45
+ BatchAccountListByResourceGroupNextResponse,
46
+ BatchAccountListOutboundNetworkDependenciesEndpointsNextResponse
47
+ } from "../models";
16
48
 
17
- /** Class representing a BatchAccountOperations. */
18
- export class BatchAccountOperations {
49
+ /// <reference lib="esnext.asynciterable" />
50
+ /** Class containing BatchAccountOperations operations. */
51
+ export class BatchAccountOperationsImpl implements BatchAccountOperations {
19
52
  private readonly client: BatchManagementClientContext;
20
53
 
21
54
  /**
22
- * Create a BatchAccountOperations.
23
- * @param {BatchManagementClientContext} client Reference to the service client.
55
+ * Initialize a new instance of the class BatchAccountOperations class.
56
+ * @param client Reference to the service client
24
57
  */
25
58
  constructor(client: BatchManagementClientContext) {
26
59
  this.client = client;
27
60
  }
28
61
 
29
62
  /**
30
- * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated
31
- * with this API and should instead be updated with the Update Batch Account API.
63
+ * Gets information about the Batch accounts associated with the subscription.
64
+ * @param options The options parameters.
65
+ */
66
+ public list(
67
+ options?: BatchAccountListOptionalParams
68
+ ): PagedAsyncIterableIterator<BatchAccount> {
69
+ const iter = this.listPagingAll(options);
70
+ return {
71
+ next() {
72
+ return iter.next();
73
+ },
74
+ [Symbol.asyncIterator]() {
75
+ return this;
76
+ },
77
+ byPage: () => {
78
+ return this.listPagingPage(options);
79
+ }
80
+ };
81
+ }
82
+
83
+ private async *listPagingPage(
84
+ options?: BatchAccountListOptionalParams
85
+ ): AsyncIterableIterator<BatchAccount[]> {
86
+ let result = await this._list(options);
87
+ yield result.value || [];
88
+ let continuationToken = result.nextLink;
89
+ while (continuationToken) {
90
+ result = await this._listNext(continuationToken, options);
91
+ continuationToken = result.nextLink;
92
+ yield result.value || [];
93
+ }
94
+ }
95
+
96
+ private async *listPagingAll(
97
+ options?: BatchAccountListOptionalParams
98
+ ): AsyncIterableIterator<BatchAccount> {
99
+ for await (const page of this.listPagingPage(options)) {
100
+ yield* page;
101
+ }
102
+ }
103
+
104
+ /**
105
+ * Gets information about the Batch accounts associated with the specified resource group.
32
106
  * @param resourceGroupName The name of the resource group that contains the Batch account.
33
- * @param accountName A name for the Batch account which must be unique within the region. Batch
34
- * account names must be between 3 and 24 characters in length and must use only numbers and
35
- * lowercase letters. This name is used as part of the DNS name that is used to access the Batch
36
- * service in the region in which the account is created. For example:
37
- * http://accountname.region.batch.azure.com/.
38
- * @param parameters Additional parameters for account creation.
39
- * @param [options] The optional parameters
40
- * @returns Promise<Models.BatchAccountCreateResponse>
41
- */
42
- create(resourceGroupName: string, accountName: string, parameters: Models.BatchAccountCreateParameters, options?: msRest.RequestOptionsBase): Promise<Models.BatchAccountCreateResponse> {
43
- return this.beginCreate(resourceGroupName,accountName,parameters,options)
44
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.BatchAccountCreateResponse>;
107
+ * @param options The options parameters.
108
+ */
109
+ public listByResourceGroup(
110
+ resourceGroupName: string,
111
+ options?: BatchAccountListByResourceGroupOptionalParams
112
+ ): PagedAsyncIterableIterator<BatchAccount> {
113
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
114
+ return {
115
+ next() {
116
+ return iter.next();
117
+ },
118
+ [Symbol.asyncIterator]() {
119
+ return this;
120
+ },
121
+ byPage: () => {
122
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
123
+ }
124
+ };
125
+ }
126
+
127
+ private async *listByResourceGroupPagingPage(
128
+ resourceGroupName: string,
129
+ options?: BatchAccountListByResourceGroupOptionalParams
130
+ ): AsyncIterableIterator<BatchAccount[]> {
131
+ let result = await this._listByResourceGroup(resourceGroupName, options);
132
+ yield result.value || [];
133
+ let continuationToken = result.nextLink;
134
+ while (continuationToken) {
135
+ result = await this._listByResourceGroupNext(
136
+ resourceGroupName,
137
+ continuationToken,
138
+ options
139
+ );
140
+ continuationToken = result.nextLink;
141
+ yield result.value || [];
142
+ }
143
+ }
144
+
145
+ private async *listByResourceGroupPagingAll(
146
+ resourceGroupName: string,
147
+ options?: BatchAccountListByResourceGroupOptionalParams
148
+ ): AsyncIterableIterator<BatchAccount> {
149
+ for await (const page of this.listByResourceGroupPagingPage(
150
+ resourceGroupName,
151
+ options
152
+ )) {
153
+ yield* page;
154
+ }
45
155
  }
46
156
 
47
157
  /**
48
- * Updates the properties of an existing Batch account.
158
+ * Lists the endpoints that a Batch Compute Node under this Batch Account may call as part of Batch
159
+ * service administration. If you are deploying a Pool inside of a virtual network that you specify,
160
+ * you must make sure your network allows outbound access to these endpoints. Failure to allow access
161
+ * to these endpoints may cause Batch to mark the affected nodes as unusable. For more information
162
+ * about creating a pool inside of a virtual network, see
163
+ * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network.
49
164
  * @param resourceGroupName The name of the resource group that contains the Batch account.
50
165
  * @param accountName The name of the Batch account.
51
- * @param parameters Additional parameters for account update.
52
- * @param [options] The optional parameters
53
- * @returns Promise<Models.BatchAccountUpdateResponse>
54
- */
55
- update(resourceGroupName: string, accountName: string, parameters: Models.BatchAccountUpdateParameters, options?: msRest.RequestOptionsBase): Promise<Models.BatchAccountUpdateResponse>;
166
+ * @param options The options parameters.
167
+ */
168
+ public listOutboundNetworkDependenciesEndpoints(
169
+ resourceGroupName: string,
170
+ accountName: string,
171
+ options?: BatchAccountListOutboundNetworkDependenciesEndpointsOptionalParams
172
+ ): PagedAsyncIterableIterator<OutboundEnvironmentEndpoint> {
173
+ const iter = this.listOutboundNetworkDependenciesEndpointsPagingAll(
174
+ resourceGroupName,
175
+ accountName,
176
+ options
177
+ );
178
+ return {
179
+ next() {
180
+ return iter.next();
181
+ },
182
+ [Symbol.asyncIterator]() {
183
+ return this;
184
+ },
185
+ byPage: () => {
186
+ return this.listOutboundNetworkDependenciesEndpointsPagingPage(
187
+ resourceGroupName,
188
+ accountName,
189
+ options
190
+ );
191
+ }
192
+ };
193
+ }
194
+
195
+ private async *listOutboundNetworkDependenciesEndpointsPagingPage(
196
+ resourceGroupName: string,
197
+ accountName: string,
198
+ options?: BatchAccountListOutboundNetworkDependenciesEndpointsOptionalParams
199
+ ): AsyncIterableIterator<OutboundEnvironmentEndpoint[]> {
200
+ let result = await this._listOutboundNetworkDependenciesEndpoints(
201
+ resourceGroupName,
202
+ accountName,
203
+ options
204
+ );
205
+ yield result.value || [];
206
+ let continuationToken = result.nextLink;
207
+ while (continuationToken) {
208
+ result = await this._listOutboundNetworkDependenciesEndpointsNext(
209
+ resourceGroupName,
210
+ accountName,
211
+ continuationToken,
212
+ options
213
+ );
214
+ continuationToken = result.nextLink;
215
+ yield result.value || [];
216
+ }
217
+ }
218
+
219
+ private async *listOutboundNetworkDependenciesEndpointsPagingAll(
220
+ resourceGroupName: string,
221
+ accountName: string,
222
+ options?: BatchAccountListOutboundNetworkDependenciesEndpointsOptionalParams
223
+ ): AsyncIterableIterator<OutboundEnvironmentEndpoint> {
224
+ for await (const page of this.listOutboundNetworkDependenciesEndpointsPagingPage(
225
+ resourceGroupName,
226
+ accountName,
227
+ options
228
+ )) {
229
+ yield* page;
230
+ }
231
+ }
232
+
56
233
  /**
234
+ * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with
235
+ * this API and should instead be updated with the Update Batch Account API.
57
236
  * @param resourceGroupName The name of the resource group that contains the Batch account.
58
- * @param accountName The name of the Batch account.
59
- * @param parameters Additional parameters for account update.
60
- * @param callback The callback
61
- */
62
- update(resourceGroupName: string, accountName: string, parameters: Models.BatchAccountUpdateParameters, callback: msRest.ServiceCallback<Models.BatchAccount>): void;
237
+ * @param accountName A name for the Batch account which must be unique within the region. Batch
238
+ * account names must be between 3 and 24 characters in length and must use only numbers and lowercase
239
+ * letters. This name is used as part of the DNS name that is used to access the Batch service in the
240
+ * region in which the account is created. For example: http://accountname.region.batch.azure.com/.
241
+ * @param parameters Additional parameters for account creation.
242
+ * @param options The options parameters.
243
+ */
244
+ async beginCreate(
245
+ resourceGroupName: string,
246
+ accountName: string,
247
+ parameters: BatchAccountCreateParameters,
248
+ options?: BatchAccountCreateOptionalParams
249
+ ): Promise<
250
+ PollerLike<
251
+ PollOperationState<BatchAccountCreateResponse>,
252
+ BatchAccountCreateResponse
253
+ >
254
+ > {
255
+ const directSendOperation = async (
256
+ args: coreClient.OperationArguments,
257
+ spec: coreClient.OperationSpec
258
+ ): Promise<BatchAccountCreateResponse> => {
259
+ return this.client.sendOperationRequest(args, spec);
260
+ };
261
+ const sendOperation = async (
262
+ args: coreClient.OperationArguments,
263
+ spec: coreClient.OperationSpec
264
+ ) => {
265
+ let currentRawResponse:
266
+ | coreClient.FullOperationResponse
267
+ | undefined = undefined;
268
+ const providedCallback = args.options?.onResponse;
269
+ const callback: coreClient.RawResponseCallback = (
270
+ rawResponse: coreClient.FullOperationResponse,
271
+ flatResponse: unknown
272
+ ) => {
273
+ currentRawResponse = rawResponse;
274
+ providedCallback?.(rawResponse, flatResponse);
275
+ };
276
+ const updatedArgs = {
277
+ ...args,
278
+ options: {
279
+ ...args.options,
280
+ onResponse: callback
281
+ }
282
+ };
283
+ const flatResponse = await directSendOperation(updatedArgs, spec);
284
+ return {
285
+ flatResponse,
286
+ rawResponse: {
287
+ statusCode: currentRawResponse!.status,
288
+ body: currentRawResponse!.parsedBody,
289
+ headers: currentRawResponse!.headers.toJSON()
290
+ }
291
+ };
292
+ };
293
+
294
+ const lro = new LroImpl(
295
+ sendOperation,
296
+ { resourceGroupName, accountName, parameters, options },
297
+ createOperationSpec
298
+ );
299
+ return new LroEngine(lro, {
300
+ resumeFrom: options?.resumeFrom,
301
+ intervalInMs: options?.updateIntervalInMs,
302
+ lroResourceLocationConfig: "location"
303
+ });
304
+ }
305
+
306
+ /**
307
+ * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with
308
+ * this API and should instead be updated with the Update Batch Account API.
309
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
310
+ * @param accountName A name for the Batch account which must be unique within the region. Batch
311
+ * account names must be between 3 and 24 characters in length and must use only numbers and lowercase
312
+ * letters. This name is used as part of the DNS name that is used to access the Batch service in the
313
+ * region in which the account is created. For example: http://accountname.region.batch.azure.com/.
314
+ * @param parameters Additional parameters for account creation.
315
+ * @param options The options parameters.
316
+ */
317
+ async beginCreateAndWait(
318
+ resourceGroupName: string,
319
+ accountName: string,
320
+ parameters: BatchAccountCreateParameters,
321
+ options?: BatchAccountCreateOptionalParams
322
+ ): Promise<BatchAccountCreateResponse> {
323
+ const poller = await this.beginCreate(
324
+ resourceGroupName,
325
+ accountName,
326
+ parameters,
327
+ options
328
+ );
329
+ return poller.pollUntilDone();
330
+ }
331
+
63
332
  /**
333
+ * Updates the properties of an existing Batch account.
64
334
  * @param resourceGroupName The name of the resource group that contains the Batch account.
65
335
  * @param accountName The name of the Batch account.
66
336
  * @param parameters Additional parameters for account update.
67
- * @param options The optional parameters
68
- * @param callback The callback
69
- */
70
- update(resourceGroupName: string, accountName: string, parameters: Models.BatchAccountUpdateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.BatchAccount>): void;
71
- update(resourceGroupName: string, accountName: string, parameters: Models.BatchAccountUpdateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.BatchAccount>, callback?: msRest.ServiceCallback<Models.BatchAccount>): Promise<Models.BatchAccountUpdateResponse> {
337
+ * @param options The options parameters.
338
+ */
339
+ update(
340
+ resourceGroupName: string,
341
+ accountName: string,
342
+ parameters: BatchAccountUpdateParameters,
343
+ options?: BatchAccountUpdateOptionalParams
344
+ ): Promise<BatchAccountUpdateResponse> {
72
345
  return this.client.sendOperationRequest(
73
- {
74
- resourceGroupName,
75
- accountName,
76
- parameters,
77
- options
78
- },
79
- updateOperationSpec,
80
- callback) as Promise<Models.BatchAccountUpdateResponse>;
346
+ { resourceGroupName, accountName, parameters, options },
347
+ updateOperationSpec
348
+ );
81
349
  }
82
350
 
83
351
  /**
84
352
  * Deletes the specified Batch account.
85
353
  * @param resourceGroupName The name of the resource group that contains the Batch account.
86
354
  * @param accountName The name of the Batch account.
87
- * @param [options] The optional parameters
88
- * @returns Promise<Models.BatchAccountDeleteResponse>
89
- */
90
- deleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise<Models.BatchAccountDeleteResponse> {
91
- return this.beginDeleteMethod(resourceGroupName,accountName,options)
92
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.BatchAccountDeleteResponse>;
355
+ * @param options The options parameters.
356
+ */
357
+ async beginDelete(
358
+ resourceGroupName: string,
359
+ accountName: string,
360
+ options?: BatchAccountDeleteOptionalParams
361
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
362
+ const directSendOperation = async (
363
+ args: coreClient.OperationArguments,
364
+ spec: coreClient.OperationSpec
365
+ ): Promise<void> => {
366
+ return this.client.sendOperationRequest(args, spec);
367
+ };
368
+ const sendOperation = async (
369
+ args: coreClient.OperationArguments,
370
+ spec: coreClient.OperationSpec
371
+ ) => {
372
+ let currentRawResponse:
373
+ | coreClient.FullOperationResponse
374
+ | undefined = undefined;
375
+ const providedCallback = args.options?.onResponse;
376
+ const callback: coreClient.RawResponseCallback = (
377
+ rawResponse: coreClient.FullOperationResponse,
378
+ flatResponse: unknown
379
+ ) => {
380
+ currentRawResponse = rawResponse;
381
+ providedCallback?.(rawResponse, flatResponse);
382
+ };
383
+ const updatedArgs = {
384
+ ...args,
385
+ options: {
386
+ ...args.options,
387
+ onResponse: callback
388
+ }
389
+ };
390
+ const flatResponse = await directSendOperation(updatedArgs, spec);
391
+ return {
392
+ flatResponse,
393
+ rawResponse: {
394
+ statusCode: currentRawResponse!.status,
395
+ body: currentRawResponse!.parsedBody,
396
+ headers: currentRawResponse!.headers.toJSON()
397
+ }
398
+ };
399
+ };
400
+
401
+ const lro = new LroImpl(
402
+ sendOperation,
403
+ { resourceGroupName, accountName, options },
404
+ deleteOperationSpec
405
+ );
406
+ return new LroEngine(lro, {
407
+ resumeFrom: options?.resumeFrom,
408
+ intervalInMs: options?.updateIntervalInMs,
409
+ lroResourceLocationConfig: "location"
410
+ });
93
411
  }
94
412
 
95
413
  /**
96
- * Gets information about the specified Batch account.
97
- * @param resourceGroupName The name of the resource group that contains the Batch account.
98
- * @param accountName The name of the Batch account.
99
- * @param [options] The optional parameters
100
- * @returns Promise<Models.BatchAccountGetResponse>
101
- */
102
- get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise<Models.BatchAccountGetResponse>;
103
- /**
414
+ * Deletes the specified Batch account.
104
415
  * @param resourceGroupName The name of the resource group that contains the Batch account.
105
416
  * @param accountName The name of the Batch account.
106
- * @param callback The callback
107
- */
108
- get(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback<Models.BatchAccount>): void;
417
+ * @param options The options parameters.
418
+ */
419
+ async beginDeleteAndWait(
420
+ resourceGroupName: string,
421
+ accountName: string,
422
+ options?: BatchAccountDeleteOptionalParams
423
+ ): Promise<void> {
424
+ const poller = await this.beginDelete(
425
+ resourceGroupName,
426
+ accountName,
427
+ options
428
+ );
429
+ return poller.pollUntilDone();
430
+ }
431
+
109
432
  /**
433
+ * Gets information about the specified Batch account.
110
434
  * @param resourceGroupName The name of the resource group that contains the Batch account.
111
435
  * @param accountName The name of the Batch account.
112
- * @param options The optional parameters
113
- * @param callback The callback
436
+ * @param options The options parameters.
114
437
  */
115
- get(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.BatchAccount>): void;
116
- get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.BatchAccount>, callback?: msRest.ServiceCallback<Models.BatchAccount>): Promise<Models.BatchAccountGetResponse> {
438
+ get(
439
+ resourceGroupName: string,
440
+ accountName: string,
441
+ options?: BatchAccountGetOptionalParams
442
+ ): Promise<BatchAccountGetResponse> {
117
443
  return this.client.sendOperationRequest(
118
- {
119
- resourceGroupName,
120
- accountName,
121
- options
122
- },
123
- getOperationSpec,
124
- callback) as Promise<Models.BatchAccountGetResponse>;
444
+ { resourceGroupName, accountName, options },
445
+ getOperationSpec
446
+ );
125
447
  }
126
448
 
127
449
  /**
128
450
  * Gets information about the Batch accounts associated with the subscription.
129
- * @param [options] The optional parameters
130
- * @returns Promise<Models.BatchAccountListResponse>
131
- */
132
- list(options?: msRest.RequestOptionsBase): Promise<Models.BatchAccountListResponse>;
133
- /**
134
- * @param callback The callback
451
+ * @param options The options parameters.
135
452
  */
136
- list(callback: msRest.ServiceCallback<Models.BatchAccountListResult>): void;
137
- /**
138
- * @param options The optional parameters
139
- * @param callback The callback
140
- */
141
- list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.BatchAccountListResult>): void;
142
- list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.BatchAccountListResult>, callback?: msRest.ServiceCallback<Models.BatchAccountListResult>): Promise<Models.BatchAccountListResponse> {
143
- return this.client.sendOperationRequest(
144
- {
145
- options
146
- },
147
- listOperationSpec,
148
- callback) as Promise<Models.BatchAccountListResponse>;
453
+ private _list(
454
+ options?: BatchAccountListOptionalParams
455
+ ): Promise<BatchAccountListResponse> {
456
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
149
457
  }
150
458
 
151
459
  /**
152
460
  * Gets information about the Batch accounts associated with the specified resource group.
153
461
  * @param resourceGroupName The name of the resource group that contains the Batch account.
154
- * @param [options] The optional parameters
155
- * @returns Promise<Models.BatchAccountListByResourceGroupResponse>
156
- */
157
- listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise<Models.BatchAccountListByResourceGroupResponse>;
158
- /**
159
- * @param resourceGroupName The name of the resource group that contains the Batch account.
160
- * @param callback The callback
161
- */
162
- listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback<Models.BatchAccountListResult>): void;
163
- /**
164
- * @param resourceGroupName The name of the resource group that contains the Batch account.
165
- * @param options The optional parameters
166
- * @param callback The callback
462
+ * @param options The options parameters.
167
463
  */
168
- listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.BatchAccountListResult>): void;
169
- listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.BatchAccountListResult>, callback?: msRest.ServiceCallback<Models.BatchAccountListResult>): Promise<Models.BatchAccountListByResourceGroupResponse> {
464
+ private _listByResourceGroup(
465
+ resourceGroupName: string,
466
+ options?: BatchAccountListByResourceGroupOptionalParams
467
+ ): Promise<BatchAccountListByResourceGroupResponse> {
170
468
  return this.client.sendOperationRequest(
171
- {
172
- resourceGroupName,
173
- options
174
- },
175
- listByResourceGroupOperationSpec,
176
- callback) as Promise<Models.BatchAccountListByResourceGroupResponse>;
469
+ { resourceGroupName, options },
470
+ listByResourceGroupOperationSpec
471
+ );
177
472
  }
178
473
 
179
474
  /**
180
- * Synchronizes access keys for the auto-storage account configured for the specified Batch
181
- * account, only if storage key authentication is being used.
182
- * @param resourceGroupName The name of the resource group that contains the Batch account.
183
- * @param accountName The name of the Batch account.
184
- * @param [options] The optional parameters
185
- * @returns Promise<msRest.RestResponse>
186
- */
187
- synchronizeAutoStorageKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse>;
188
- /**
189
- * @param resourceGroupName The name of the resource group that contains the Batch account.
190
- * @param accountName The name of the Batch account.
191
- * @param callback The callback
192
- */
193
- synchronizeAutoStorageKeys(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback<void>): void;
194
- /**
475
+ * Synchronizes access keys for the auto-storage account configured for the specified Batch account,
476
+ * only if storage key authentication is being used.
195
477
  * @param resourceGroupName The name of the resource group that contains the Batch account.
196
478
  * @param accountName The name of the Batch account.
197
- * @param options The optional parameters
198
- * @param callback The callback
479
+ * @param options The options parameters.
199
480
  */
200
- synchronizeAutoStorageKeys(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
201
- synchronizeAutoStorageKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
481
+ synchronizeAutoStorageKeys(
482
+ resourceGroupName: string,
483
+ accountName: string,
484
+ options?: BatchAccountSynchronizeAutoStorageKeysOptionalParams
485
+ ): Promise<void> {
202
486
  return this.client.sendOperationRequest(
203
- {
204
- resourceGroupName,
205
- accountName,
206
- options
207
- },
208
- synchronizeAutoStorageKeysOperationSpec,
209
- callback);
487
+ { resourceGroupName, accountName, options },
488
+ synchronizeAutoStorageKeysOperationSpec
489
+ );
210
490
  }
211
491
 
212
492
  /**
@@ -214,42 +494,21 @@ export class BatchAccountOperations {
214
494
  * 'SharedKey'. If the Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode,
215
495
  * clients cannot use shared keys to authenticate, and must use another allowedAuthenticationModes
216
496
  * instead. In this case, regenerating the keys will fail.
217
- * @summary Regenerates the specified account key for the Batch account.
218
- * @param resourceGroupName The name of the resource group that contains the Batch account.
219
- * @param accountName The name of the Batch account.
220
- * @param keyName The type of account key to regenerate. Possible values include: 'Primary',
221
- * 'Secondary'
222
- * @param [options] The optional parameters
223
- * @returns Promise<Models.BatchAccountRegenerateKeyResponse>
224
- */
225
- regenerateKey(resourceGroupName: string, accountName: string, keyName: Models.AccountKeyType, options?: msRest.RequestOptionsBase): Promise<Models.BatchAccountRegenerateKeyResponse>;
226
- /**
227
- * @param resourceGroupName The name of the resource group that contains the Batch account.
228
- * @param accountName The name of the Batch account.
229
- * @param keyName The type of account key to regenerate. Possible values include: 'Primary',
230
- * 'Secondary'
231
- * @param callback The callback
232
- */
233
- regenerateKey(resourceGroupName: string, accountName: string, keyName: Models.AccountKeyType, callback: msRest.ServiceCallback<Models.BatchAccountKeys>): void;
234
- /**
235
497
  * @param resourceGroupName The name of the resource group that contains the Batch account.
236
498
  * @param accountName The name of the Batch account.
237
- * @param keyName The type of account key to regenerate. Possible values include: 'Primary',
238
- * 'Secondary'
239
- * @param options The optional parameters
240
- * @param callback The callback
241
- */
242
- regenerateKey(resourceGroupName: string, accountName: string, keyName: Models.AccountKeyType, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.BatchAccountKeys>): void;
243
- regenerateKey(resourceGroupName: string, accountName: string, keyName: Models.AccountKeyType, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.BatchAccountKeys>, callback?: msRest.ServiceCallback<Models.BatchAccountKeys>): Promise<Models.BatchAccountRegenerateKeyResponse> {
499
+ * @param parameters The type of key to regenerate.
500
+ * @param options The options parameters.
501
+ */
502
+ regenerateKey(
503
+ resourceGroupName: string,
504
+ accountName: string,
505
+ parameters: BatchAccountRegenerateKeyParameters,
506
+ options?: BatchAccountRegenerateKeyOptionalParams
507
+ ): Promise<BatchAccountRegenerateKeyResponse> {
244
508
  return this.client.sendOperationRequest(
245
- {
246
- resourceGroupName,
247
- accountName,
248
- keyName,
249
- options
250
- },
251
- regenerateKeyOperationSpec,
252
- callback) as Promise<Models.BatchAccountRegenerateKeyResponse>;
509
+ { resourceGroupName, accountName, parameters, options },
510
+ regenerateKeyOperationSpec
511
+ );
253
512
  }
254
513
 
255
514
  /**
@@ -257,230 +516,135 @@ export class BatchAccountOperations {
257
516
  * 'SharedKey'. If the Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode,
258
517
  * clients cannot use shared keys to authenticate, and must use another allowedAuthenticationModes
259
518
  * instead. In this case, getting the keys will fail.
260
- * @summary Gets the account keys for the specified Batch account.
261
- * @param resourceGroupName The name of the resource group that contains the Batch account.
262
- * @param accountName The name of the Batch account.
263
- * @param [options] The optional parameters
264
- * @returns Promise<Models.BatchAccountGetKeysResponse>
265
- */
266
- getKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise<Models.BatchAccountGetKeysResponse>;
267
- /**
268
- * @param resourceGroupName The name of the resource group that contains the Batch account.
269
- * @param accountName The name of the Batch account.
270
- * @param callback The callback
271
- */
272
- getKeys(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback<Models.BatchAccountKeys>): void;
273
- /**
274
519
  * @param resourceGroupName The name of the resource group that contains the Batch account.
275
520
  * @param accountName The name of the Batch account.
276
- * @param options The optional parameters
277
- * @param callback The callback
521
+ * @param options The options parameters.
278
522
  */
279
- getKeys(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.BatchAccountKeys>): void;
280
- getKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.BatchAccountKeys>, callback?: msRest.ServiceCallback<Models.BatchAccountKeys>): Promise<Models.BatchAccountGetKeysResponse> {
523
+ getKeys(
524
+ resourceGroupName: string,
525
+ accountName: string,
526
+ options?: BatchAccountGetKeysOptionalParams
527
+ ): Promise<BatchAccountGetKeysResponse> {
281
528
  return this.client.sendOperationRequest(
282
- {
283
- resourceGroupName,
284
- accountName,
285
- options
286
- },
287
- getKeysOperationSpec,
288
- callback) as Promise<Models.BatchAccountGetKeysResponse>;
529
+ { resourceGroupName, accountName, options },
530
+ getKeysOperationSpec
531
+ );
289
532
  }
290
533
 
291
534
  /**
292
535
  * Lists the endpoints that a Batch Compute Node under this Batch Account may call as part of Batch
293
- * service administration. If you are deploying a Pool inside of a virtual network that you
294
- * specify, you must make sure your network allows outbound access to these endpoints. Failure to
295
- * allow access to these endpoints may cause Batch to mark the affected nodes as unusable. For more
296
- * information about creating a pool inside of a virtual network, see
536
+ * service administration. If you are deploying a Pool inside of a virtual network that you specify,
537
+ * you must make sure your network allows outbound access to these endpoints. Failure to allow access
538
+ * to these endpoints may cause Batch to mark the affected nodes as unusable. For more information
539
+ * about creating a pool inside of a virtual network, see
297
540
  * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network.
298
541
  * @param resourceGroupName The name of the resource group that contains the Batch account.
299
542
  * @param accountName The name of the Batch account.
300
- * @param [options] The optional parameters
301
- * @returns Promise<Models.BatchAccountListOutboundNetworkDependenciesEndpointsResponse>
543
+ * @param options The options parameters.
302
544
  */
303
- listOutboundNetworkDependenciesEndpoints(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise<Models.BatchAccountListOutboundNetworkDependenciesEndpointsResponse>;
304
- /**
305
- * @param resourceGroupName The name of the resource group that contains the Batch account.
306
- * @param accountName The name of the Batch account.
307
- * @param callback The callback
308
- */
309
- listOutboundNetworkDependenciesEndpoints(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback<Models.OutboundEnvironmentEndpointCollection>): void;
310
- /**
311
- * @param resourceGroupName The name of the resource group that contains the Batch account.
312
- * @param accountName The name of the Batch account.
313
- * @param options The optional parameters
314
- * @param callback The callback
315
- */
316
- listOutboundNetworkDependenciesEndpoints(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OutboundEnvironmentEndpointCollection>): void;
317
- listOutboundNetworkDependenciesEndpoints(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OutboundEnvironmentEndpointCollection>, callback?: msRest.ServiceCallback<Models.OutboundEnvironmentEndpointCollection>): Promise<Models.BatchAccountListOutboundNetworkDependenciesEndpointsResponse> {
545
+ private _listOutboundNetworkDependenciesEndpoints(
546
+ resourceGroupName: string,
547
+ accountName: string,
548
+ options?: BatchAccountListOutboundNetworkDependenciesEndpointsOptionalParams
549
+ ): Promise<BatchAccountListOutboundNetworkDependenciesEndpointsResponse> {
318
550
  return this.client.sendOperationRequest(
319
- {
320
- resourceGroupName,
321
- accountName,
322
- options
323
- },
324
- listOutboundNetworkDependenciesEndpointsOperationSpec,
325
- callback) as Promise<Models.BatchAccountListOutboundNetworkDependenciesEndpointsResponse>;
326
- }
327
-
328
- /**
329
- * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated
330
- * with this API and should instead be updated with the Update Batch Account API.
331
- * @param resourceGroupName The name of the resource group that contains the Batch account.
332
- * @param accountName A name for the Batch account which must be unique within the region. Batch
333
- * account names must be between 3 and 24 characters in length and must use only numbers and
334
- * lowercase letters. This name is used as part of the DNS name that is used to access the Batch
335
- * service in the region in which the account is created. For example:
336
- * http://accountname.region.batch.azure.com/.
337
- * @param parameters Additional parameters for account creation.
338
- * @param [options] The optional parameters
339
- * @returns Promise<msRestAzure.LROPoller>
340
- */
341
- beginCreate(resourceGroupName: string, accountName: string, parameters: Models.BatchAccountCreateParameters, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
342
- return this.client.sendLRORequest(
343
- {
344
- resourceGroupName,
345
- accountName,
346
- parameters,
347
- options
348
- },
349
- beginCreateOperationSpec,
350
- options);
351
- }
352
-
353
- /**
354
- * Deletes the specified Batch account.
355
- * @param resourceGroupName The name of the resource group that contains the Batch account.
356
- * @param accountName The name of the Batch account.
357
- * @param [options] The optional parameters
358
- * @returns Promise<msRestAzure.LROPoller>
359
- */
360
- beginDeleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
361
- return this.client.sendLRORequest(
362
- {
363
- resourceGroupName,
364
- accountName,
365
- options
366
- },
367
- beginDeleteMethodOperationSpec,
368
- options);
551
+ { resourceGroupName, accountName, options },
552
+ listOutboundNetworkDependenciesEndpointsOperationSpec
553
+ );
369
554
  }
370
555
 
371
556
  /**
372
- * Gets information about the Batch accounts associated with the subscription.
373
- * @param nextPageLink The NextLink from the previous successful call to List operation.
374
- * @param [options] The optional parameters
375
- * @returns Promise<Models.BatchAccountListNextResponse>
376
- */
377
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.BatchAccountListNextResponse>;
378
- /**
379
- * @param nextPageLink The NextLink from the previous successful call to List operation.
380
- * @param callback The callback
381
- */
382
- listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.BatchAccountListResult>): void;
383
- /**
384
- * @param nextPageLink The NextLink from the previous successful call to List operation.
385
- * @param options The optional parameters
386
- * @param callback The callback
557
+ * ListNext
558
+ * @param nextLink The nextLink from the previous successful call to the List method.
559
+ * @param options The options parameters.
387
560
  */
388
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.BatchAccountListResult>): void;
389
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.BatchAccountListResult>, callback?: msRest.ServiceCallback<Models.BatchAccountListResult>): Promise<Models.BatchAccountListNextResponse> {
561
+ private _listNext(
562
+ nextLink: string,
563
+ options?: BatchAccountListNextOptionalParams
564
+ ): Promise<BatchAccountListNextResponse> {
390
565
  return this.client.sendOperationRequest(
391
- {
392
- nextPageLink,
393
- options
394
- },
395
- listNextOperationSpec,
396
- callback) as Promise<Models.BatchAccountListNextResponse>;
566
+ { nextLink, options },
567
+ listNextOperationSpec
568
+ );
397
569
  }
398
570
 
399
571
  /**
400
- * Gets information about the Batch accounts associated with the specified resource group.
401
- * @param nextPageLink The NextLink from the previous successful call to List operation.
402
- * @param [options] The optional parameters
403
- * @returns Promise<Models.BatchAccountListByResourceGroupNextResponse>
404
- */
405
- listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.BatchAccountListByResourceGroupNextResponse>;
406
- /**
407
- * @param nextPageLink The NextLink from the previous successful call to List operation.
408
- * @param callback The callback
409
- */
410
- listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.BatchAccountListResult>): void;
411
- /**
412
- * @param nextPageLink The NextLink from the previous successful call to List operation.
413
- * @param options The optional parameters
414
- * @param callback The callback
415
- */
416
- listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.BatchAccountListResult>): void;
417
- listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.BatchAccountListResult>, callback?: msRest.ServiceCallback<Models.BatchAccountListResult>): Promise<Models.BatchAccountListByResourceGroupNextResponse> {
572
+ * ListByResourceGroupNext
573
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
574
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
575
+ * @param options The options parameters.
576
+ */
577
+ private _listByResourceGroupNext(
578
+ resourceGroupName: string,
579
+ nextLink: string,
580
+ options?: BatchAccountListByResourceGroupNextOptionalParams
581
+ ): Promise<BatchAccountListByResourceGroupNextResponse> {
418
582
  return this.client.sendOperationRequest(
419
- {
420
- nextPageLink,
421
- options
422
- },
423
- listByResourceGroupNextOperationSpec,
424
- callback) as Promise<Models.BatchAccountListByResourceGroupNextResponse>;
583
+ { resourceGroupName, nextLink, options },
584
+ listByResourceGroupNextOperationSpec
585
+ );
425
586
  }
426
587
 
427
588
  /**
428
- * Lists the endpoints that a Batch Compute Node under this Batch Account may call as part of Batch
429
- * service administration. If you are deploying a Pool inside of a virtual network that you
430
- * specify, you must make sure your network allows outbound access to these endpoints. Failure to
431
- * allow access to these endpoints may cause Batch to mark the affected nodes as unusable. For more
432
- * information about creating a pool inside of a virtual network, see
433
- * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network.
434
- * @param nextPageLink The NextLink from the previous successful call to List operation.
435
- * @param [options] The optional parameters
436
- * @returns Promise<Models.BatchAccountListOutboundNetworkDependenciesEndpointsNextResponse>
437
- */
438
- listOutboundNetworkDependenciesEndpointsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.BatchAccountListOutboundNetworkDependenciesEndpointsNextResponse>;
439
- /**
440
- * @param nextPageLink The NextLink from the previous successful call to List operation.
441
- * @param callback The callback
442
- */
443
- listOutboundNetworkDependenciesEndpointsNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.OutboundEnvironmentEndpointCollection>): void;
444
- /**
445
- * @param nextPageLink The NextLink from the previous successful call to List operation.
446
- * @param options The optional parameters
447
- * @param callback The callback
448
- */
449
- listOutboundNetworkDependenciesEndpointsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OutboundEnvironmentEndpointCollection>): void;
450
- listOutboundNetworkDependenciesEndpointsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OutboundEnvironmentEndpointCollection>, callback?: msRest.ServiceCallback<Models.OutboundEnvironmentEndpointCollection>): Promise<Models.BatchAccountListOutboundNetworkDependenciesEndpointsNextResponse> {
589
+ * ListOutboundNetworkDependenciesEndpointsNext
590
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
591
+ * @param accountName The name of the Batch account.
592
+ * @param nextLink The nextLink from the previous successful call to the
593
+ * ListOutboundNetworkDependenciesEndpoints method.
594
+ * @param options The options parameters.
595
+ */
596
+ private _listOutboundNetworkDependenciesEndpointsNext(
597
+ resourceGroupName: string,
598
+ accountName: string,
599
+ nextLink: string,
600
+ options?: BatchAccountListOutboundNetworkDependenciesEndpointsNextOptionalParams
601
+ ): Promise<BatchAccountListOutboundNetworkDependenciesEndpointsNextResponse> {
451
602
  return this.client.sendOperationRequest(
452
- {
453
- nextPageLink,
454
- options
455
- },
456
- listOutboundNetworkDependenciesEndpointsNextOperationSpec,
457
- callback) as Promise<Models.BatchAccountListOutboundNetworkDependenciesEndpointsNextResponse>;
603
+ { resourceGroupName, accountName, nextLink, options },
604
+ listOutboundNetworkDependenciesEndpointsNextOperationSpec
605
+ );
458
606
  }
459
607
  }
460
-
461
608
  // Operation Specifications
462
- const serializer = new msRest.Serializer(Mappers);
463
- const updateOperationSpec: msRest.OperationSpec = {
464
- httpMethod: "PATCH",
465
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}",
609
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
610
+
611
+ const createOperationSpec: coreClient.OperationSpec = {
612
+ path:
613
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}",
614
+ httpMethod: "PUT",
615
+ responses: {
616
+ 200: {
617
+ bodyMapper: Mappers.BatchAccount
618
+ },
619
+ 201: {
620
+ bodyMapper: Mappers.BatchAccount
621
+ },
622
+ 202: {
623
+ bodyMapper: Mappers.BatchAccount
624
+ },
625
+ 204: {
626
+ bodyMapper: Mappers.BatchAccount
627
+ },
628
+ default: {
629
+ bodyMapper: Mappers.CloudError
630
+ }
631
+ },
632
+ requestBody: Parameters.parameters,
633
+ queryParameters: [Parameters.apiVersion],
466
634
  urlParameters: [
635
+ Parameters.$host,
467
636
  Parameters.resourceGroupName,
468
- Parameters.accountName1,
637
+ Parameters.accountName,
469
638
  Parameters.subscriptionId
470
639
  ],
471
- queryParameters: [
472
- Parameters.apiVersion
473
- ],
474
- headerParameters: [
475
- Parameters.acceptLanguage
476
- ],
477
- requestBody: {
478
- parameterPath: "parameters",
479
- mapper: {
480
- ...Mappers.BatchAccountUpdateParameters,
481
- required: true
482
- }
483
- },
640
+ headerParameters: [Parameters.contentType, Parameters.accept],
641
+ mediaType: "json",
642
+ serializer
643
+ };
644
+ const updateOperationSpec: coreClient.OperationSpec = {
645
+ path:
646
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}",
647
+ httpMethod: "PATCH",
484
648
  responses: {
485
649
  200: {
486
650
  bodyMapper: Mappers.BatchAccount
@@ -489,23 +653,45 @@ const updateOperationSpec: msRest.OperationSpec = {
489
653
  bodyMapper: Mappers.CloudError
490
654
  }
491
655
  },
656
+ requestBody: Parameters.parameters1,
657
+ queryParameters: [Parameters.apiVersion],
658
+ urlParameters: [
659
+ Parameters.$host,
660
+ Parameters.resourceGroupName,
661
+ Parameters.subscriptionId,
662
+ Parameters.accountName1
663
+ ],
664
+ headerParameters: [Parameters.contentType, Parameters.accept],
665
+ mediaType: "json",
492
666
  serializer
493
667
  };
494
-
495
- const getOperationSpec: msRest.OperationSpec = {
496
- httpMethod: "GET",
497
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}",
668
+ const deleteOperationSpec: coreClient.OperationSpec = {
669
+ path:
670
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}",
671
+ httpMethod: "DELETE",
672
+ responses: {
673
+ 200: {},
674
+ 201: {},
675
+ 202: {},
676
+ 204: {},
677
+ default: {
678
+ bodyMapper: Mappers.CloudError
679
+ }
680
+ },
681
+ queryParameters: [Parameters.apiVersion],
498
682
  urlParameters: [
683
+ Parameters.$host,
499
684
  Parameters.resourceGroupName,
500
- Parameters.accountName1,
501
- Parameters.subscriptionId
502
- ],
503
- queryParameters: [
504
- Parameters.apiVersion
505
- ],
506
- headerParameters: [
507
- Parameters.acceptLanguage
685
+ Parameters.subscriptionId,
686
+ Parameters.accountName1
508
687
  ],
688
+ headerParameters: [Parameters.accept],
689
+ serializer
690
+ };
691
+ const getOperationSpec: coreClient.OperationSpec = {
692
+ path:
693
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}",
694
+ httpMethod: "GET",
509
695
  responses: {
510
696
  200: {
511
697
  bodyMapper: Mappers.BatchAccount
@@ -514,21 +700,20 @@ const getOperationSpec: msRest.OperationSpec = {
514
700
  bodyMapper: Mappers.CloudError
515
701
  }
516
702
  },
703
+ queryParameters: [Parameters.apiVersion],
704
+ urlParameters: [
705
+ Parameters.$host,
706
+ Parameters.resourceGroupName,
707
+ Parameters.subscriptionId,
708
+ Parameters.accountName1
709
+ ],
710
+ headerParameters: [Parameters.accept],
517
711
  serializer
518
712
  };
519
-
520
- const listOperationSpec: msRest.OperationSpec = {
713
+ const listOperationSpec: coreClient.OperationSpec = {
714
+ path:
715
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Batch/batchAccounts",
521
716
  httpMethod: "GET",
522
- path: "subscriptions/{subscriptionId}/providers/Microsoft.Batch/batchAccounts",
523
- urlParameters: [
524
- Parameters.subscriptionId
525
- ],
526
- queryParameters: [
527
- Parameters.apiVersion
528
- ],
529
- headerParameters: [
530
- Parameters.acceptLanguage
531
- ],
532
717
  responses: {
533
718
  200: {
534
719
  bodyMapper: Mappers.BatchAccountListResult
@@ -537,22 +722,15 @@ const listOperationSpec: msRest.OperationSpec = {
537
722
  bodyMapper: Mappers.CloudError
538
723
  }
539
724
  },
725
+ queryParameters: [Parameters.apiVersion],
726
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
727
+ headerParameters: [Parameters.accept],
540
728
  serializer
541
729
  };
542
-
543
- const listByResourceGroupOperationSpec: msRest.OperationSpec = {
730
+ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
731
+ path:
732
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts",
544
733
  httpMethod: "GET",
545
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts",
546
- urlParameters: [
547
- Parameters.resourceGroupName,
548
- Parameters.subscriptionId
549
- ],
550
- queryParameters: [
551
- Parameters.apiVersion
552
- ],
553
- headerParameters: [
554
- Parameters.acceptLanguage
555
- ],
556
734
  responses: {
557
735
  200: {
558
736
  bodyMapper: Mappers.BatchAccountListResult
@@ -561,80 +739,39 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = {
561
739
  bodyMapper: Mappers.CloudError
562
740
  }
563
741
  },
564
- serializer
565
- };
566
-
567
- const synchronizeAutoStorageKeysOperationSpec: msRest.OperationSpec = {
568
- httpMethod: "POST",
569
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/syncAutoStorageKeys",
742
+ queryParameters: [Parameters.apiVersion],
570
743
  urlParameters: [
744
+ Parameters.$host,
571
745
  Parameters.resourceGroupName,
572
- Parameters.accountName1,
573
746
  Parameters.subscriptionId
574
747
  ],
575
- queryParameters: [
576
- Parameters.apiVersion
577
- ],
578
- headerParameters: [
579
- Parameters.acceptLanguage
580
- ],
748
+ headerParameters: [Parameters.accept],
749
+ serializer
750
+ };
751
+ const synchronizeAutoStorageKeysOperationSpec: coreClient.OperationSpec = {
752
+ path:
753
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/syncAutoStorageKeys",
754
+ httpMethod: "POST",
581
755
  responses: {
582
756
  204: {},
583
757
  default: {
584
758
  bodyMapper: Mappers.CloudError
585
759
  }
586
760
  },
587
- serializer
588
- };
589
-
590
- const regenerateKeyOperationSpec: msRest.OperationSpec = {
591
- httpMethod: "POST",
592
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/regenerateKeys",
761
+ queryParameters: [Parameters.apiVersion],
593
762
  urlParameters: [
763
+ Parameters.$host,
594
764
  Parameters.resourceGroupName,
595
- Parameters.accountName1,
596
- Parameters.subscriptionId
597
- ],
598
- queryParameters: [
599
- Parameters.apiVersion
765
+ Parameters.subscriptionId,
766
+ Parameters.accountName1
600
767
  ],
601
- headerParameters: [
602
- Parameters.acceptLanguage
603
- ],
604
- requestBody: {
605
- parameterPath: {
606
- keyName: "keyName"
607
- },
608
- mapper: {
609
- ...Mappers.BatchAccountRegenerateKeyParameters,
610
- required: true
611
- }
612
- },
613
- responses: {
614
- 200: {
615
- bodyMapper: Mappers.BatchAccountKeys
616
- },
617
- default: {
618
- bodyMapper: Mappers.CloudError
619
- }
620
- },
768
+ headerParameters: [Parameters.accept],
621
769
  serializer
622
770
  };
623
-
624
- const getKeysOperationSpec: msRest.OperationSpec = {
771
+ const regenerateKeyOperationSpec: coreClient.OperationSpec = {
772
+ path:
773
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/regenerateKeys",
625
774
  httpMethod: "POST",
626
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/listKeys",
627
- urlParameters: [
628
- Parameters.resourceGroupName,
629
- Parameters.accountName1,
630
- Parameters.subscriptionId
631
- ],
632
- queryParameters: [
633
- Parameters.apiVersion
634
- ],
635
- headerParameters: [
636
- Parameters.acceptLanguage
637
- ],
638
775
  responses: {
639
776
  200: {
640
777
  bodyMapper: Mappers.BatchAccountKeys
@@ -643,116 +780,65 @@ const getKeysOperationSpec: msRest.OperationSpec = {
643
780
  bodyMapper: Mappers.CloudError
644
781
  }
645
782
  },
646
- serializer
647
- };
648
-
649
- const listOutboundNetworkDependenciesEndpointsOperationSpec: msRest.OperationSpec = {
650
- httpMethod: "GET",
651
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/outboundNetworkDependenciesEndpoints",
783
+ requestBody: Parameters.parameters2,
784
+ queryParameters: [Parameters.apiVersion],
652
785
  urlParameters: [
786
+ Parameters.$host,
653
787
  Parameters.resourceGroupName,
654
- Parameters.accountName1,
655
- Parameters.subscriptionId
656
- ],
657
- queryParameters: [
658
- Parameters.apiVersion
659
- ],
660
- headerParameters: [
661
- Parameters.acceptLanguage
788
+ Parameters.subscriptionId,
789
+ Parameters.accountName1
662
790
  ],
791
+ headerParameters: [Parameters.contentType, Parameters.accept],
792
+ mediaType: "json",
793
+ serializer
794
+ };
795
+ const getKeysOperationSpec: coreClient.OperationSpec = {
796
+ path:
797
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/listKeys",
798
+ httpMethod: "POST",
663
799
  responses: {
664
800
  200: {
665
- bodyMapper: Mappers.OutboundEnvironmentEndpointCollection
801
+ bodyMapper: Mappers.BatchAccountKeys
666
802
  },
667
803
  default: {
668
804
  bodyMapper: Mappers.CloudError
669
805
  }
670
806
  },
671
- serializer
672
- };
673
-
674
- const beginCreateOperationSpec: msRest.OperationSpec = {
675
- httpMethod: "PUT",
676
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}",
807
+ queryParameters: [Parameters.apiVersion],
677
808
  urlParameters: [
809
+ Parameters.$host,
678
810
  Parameters.resourceGroupName,
679
- Parameters.accountName0,
680
- Parameters.subscriptionId
681
- ],
682
- queryParameters: [
683
- Parameters.apiVersion
684
- ],
685
- headerParameters: [
686
- Parameters.acceptLanguage
811
+ Parameters.subscriptionId,
812
+ Parameters.accountName1
687
813
  ],
688
- requestBody: {
689
- parameterPath: "parameters",
690
- mapper: {
691
- ...Mappers.BatchAccountCreateParameters,
692
- required: true
693
- }
694
- },
814
+ headerParameters: [Parameters.accept],
815
+ serializer
816
+ };
817
+ const listOutboundNetworkDependenciesEndpointsOperationSpec: coreClient.OperationSpec = {
818
+ path:
819
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/outboundNetworkDependenciesEndpoints",
820
+ httpMethod: "GET",
695
821
  responses: {
696
822
  200: {
697
- bodyMapper: Mappers.BatchAccount,
698
- headersMapper: Mappers.BatchAccountCreateHeaders
699
- },
700
- 202: {
701
- headersMapper: Mappers.BatchAccountCreateHeaders
823
+ bodyMapper: Mappers.OutboundEnvironmentEndpointCollection
702
824
  },
703
825
  default: {
704
- bodyMapper: Mappers.CloudError,
705
- headersMapper: Mappers.BatchAccountCreateHeaders
826
+ bodyMapper: Mappers.CloudError
706
827
  }
707
828
  },
708
- serializer
709
- };
710
-
711
- const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
712
- httpMethod: "DELETE",
713
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}",
829
+ queryParameters: [Parameters.apiVersion],
714
830
  urlParameters: [
831
+ Parameters.$host,
715
832
  Parameters.resourceGroupName,
716
- Parameters.accountName1,
717
- Parameters.subscriptionId
718
- ],
719
- queryParameters: [
720
- Parameters.apiVersion
721
- ],
722
- headerParameters: [
723
- Parameters.acceptLanguage
833
+ Parameters.subscriptionId,
834
+ Parameters.accountName1
724
835
  ],
725
- responses: {
726
- 200: {
727
- headersMapper: Mappers.BatchAccountDeleteHeaders
728
- },
729
- 202: {
730
- headersMapper: Mappers.BatchAccountDeleteHeaders
731
- },
732
- 204: {
733
- headersMapper: Mappers.BatchAccountDeleteHeaders
734
- },
735
- default: {
736
- bodyMapper: Mappers.CloudError,
737
- headersMapper: Mappers.BatchAccountDeleteHeaders
738
- }
739
- },
836
+ headerParameters: [Parameters.accept],
740
837
  serializer
741
838
  };
742
-
743
- const listNextOperationSpec: msRest.OperationSpec = {
744
- httpMethod: "GET",
745
- baseUrl: "https://management.azure.com",
839
+ const listNextOperationSpec: coreClient.OperationSpec = {
746
840
  path: "{nextLink}",
747
- urlParameters: [
748
- Parameters.nextPageLink
749
- ],
750
- queryParameters: [
751
- Parameters.apiVersion
752
- ],
753
- headerParameters: [
754
- Parameters.acceptLanguage
755
- ],
841
+ httpMethod: "GET",
756
842
  responses: {
757
843
  200: {
758
844
  bodyMapper: Mappers.BatchAccountListResult
@@ -761,22 +847,18 @@ const listNextOperationSpec: msRest.OperationSpec = {
761
847
  bodyMapper: Mappers.CloudError
762
848
  }
763
849
  },
850
+ queryParameters: [Parameters.apiVersion],
851
+ urlParameters: [
852
+ Parameters.$host,
853
+ Parameters.subscriptionId,
854
+ Parameters.nextLink
855
+ ],
856
+ headerParameters: [Parameters.accept],
764
857
  serializer
765
858
  };
766
-
767
- const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
768
- httpMethod: "GET",
769
- baseUrl: "https://management.azure.com",
859
+ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
770
860
  path: "{nextLink}",
771
- urlParameters: [
772
- Parameters.nextPageLink
773
- ],
774
- queryParameters: [
775
- Parameters.apiVersion
776
- ],
777
- headerParameters: [
778
- Parameters.acceptLanguage
779
- ],
861
+ httpMethod: "GET",
780
862
  responses: {
781
863
  200: {
782
864
  bodyMapper: Mappers.BatchAccountListResult
@@ -785,22 +867,19 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
785
867
  bodyMapper: Mappers.CloudError
786
868
  }
787
869
  },
870
+ queryParameters: [Parameters.apiVersion],
871
+ urlParameters: [
872
+ Parameters.$host,
873
+ Parameters.resourceGroupName,
874
+ Parameters.subscriptionId,
875
+ Parameters.nextLink
876
+ ],
877
+ headerParameters: [Parameters.accept],
788
878
  serializer
789
879
  };
790
-
791
- const listOutboundNetworkDependenciesEndpointsNextOperationSpec: msRest.OperationSpec = {
792
- httpMethod: "GET",
793
- baseUrl: "https://management.azure.com",
880
+ const listOutboundNetworkDependenciesEndpointsNextOperationSpec: coreClient.OperationSpec = {
794
881
  path: "{nextLink}",
795
- urlParameters: [
796
- Parameters.nextPageLink
797
- ],
798
- queryParameters: [
799
- Parameters.apiVersion
800
- ],
801
- headerParameters: [
802
- Parameters.acceptLanguage
803
- ],
882
+ httpMethod: "GET",
804
883
  responses: {
805
884
  200: {
806
885
  bodyMapper: Mappers.OutboundEnvironmentEndpointCollection
@@ -809,5 +888,14 @@ const listOutboundNetworkDependenciesEndpointsNextOperationSpec: msRest.Operatio
809
888
  bodyMapper: Mappers.CloudError
810
889
  }
811
890
  },
891
+ queryParameters: [Parameters.apiVersion],
892
+ urlParameters: [
893
+ Parameters.$host,
894
+ Parameters.resourceGroupName,
895
+ Parameters.subscriptionId,
896
+ Parameters.accountName1,
897
+ Parameters.nextLink
898
+ ],
899
+ headerParameters: [Parameters.accept],
812
900
  serializer
813
901
  };