@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
@@ -0,0 +1,681 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import { __asyncDelegator, __asyncGenerator, __asyncValues, __await, __awaiter } from "tslib";
9
+ import * as coreClient from "@azure/core-client";
10
+ import * as Mappers from "../models/mappers";
11
+ import * as Parameters from "../models/parameters";
12
+ import { LroEngine } from "@azure/core-lro";
13
+ import { LroImpl } from "../lroImpl";
14
+ /// <reference lib="esnext.asynciterable" />
15
+ /** Class containing BatchAccountOperations operations. */
16
+ export class BatchAccountOperationsImpl {
17
+ /**
18
+ * Initialize a new instance of the class BatchAccountOperations class.
19
+ * @param client Reference to the service client
20
+ */
21
+ constructor(client) {
22
+ this.client = client;
23
+ }
24
+ /**
25
+ * Gets information about the Batch accounts associated with the subscription.
26
+ * @param options The options parameters.
27
+ */
28
+ list(options) {
29
+ const iter = this.listPagingAll(options);
30
+ return {
31
+ next() {
32
+ return iter.next();
33
+ },
34
+ [Symbol.asyncIterator]() {
35
+ return this;
36
+ },
37
+ byPage: () => {
38
+ return this.listPagingPage(options);
39
+ }
40
+ };
41
+ }
42
+ listPagingPage(options) {
43
+ return __asyncGenerator(this, arguments, function* listPagingPage_1() {
44
+ let result = yield __await(this._list(options));
45
+ yield yield __await(result.value || []);
46
+ let continuationToken = result.nextLink;
47
+ while (continuationToken) {
48
+ result = yield __await(this._listNext(continuationToken, options));
49
+ continuationToken = result.nextLink;
50
+ yield yield __await(result.value || []);
51
+ }
52
+ });
53
+ }
54
+ listPagingAll(options) {
55
+ return __asyncGenerator(this, arguments, function* listPagingAll_1() {
56
+ var e_1, _a;
57
+ try {
58
+ for (var _b = __asyncValues(this.listPagingPage(options)), _c; _c = yield __await(_b.next()), !_c.done;) {
59
+ const page = _c.value;
60
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
61
+ }
62
+ }
63
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
64
+ finally {
65
+ try {
66
+ if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
67
+ }
68
+ finally { if (e_1) throw e_1.error; }
69
+ }
70
+ });
71
+ }
72
+ /**
73
+ * Gets information about the Batch accounts associated with the specified resource group.
74
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
75
+ * @param options The options parameters.
76
+ */
77
+ listByResourceGroup(resourceGroupName, options) {
78
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
79
+ return {
80
+ next() {
81
+ return iter.next();
82
+ },
83
+ [Symbol.asyncIterator]() {
84
+ return this;
85
+ },
86
+ byPage: () => {
87
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
88
+ }
89
+ };
90
+ }
91
+ listByResourceGroupPagingPage(resourceGroupName, options) {
92
+ return __asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
93
+ let result = yield __await(this._listByResourceGroup(resourceGroupName, options));
94
+ yield yield __await(result.value || []);
95
+ let continuationToken = result.nextLink;
96
+ while (continuationToken) {
97
+ result = yield __await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
98
+ continuationToken = result.nextLink;
99
+ yield yield __await(result.value || []);
100
+ }
101
+ });
102
+ }
103
+ listByResourceGroupPagingAll(resourceGroupName, options) {
104
+ return __asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
105
+ var e_2, _a;
106
+ try {
107
+ for (var _b = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
108
+ const page = _c.value;
109
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
110
+ }
111
+ }
112
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
113
+ finally {
114
+ try {
115
+ if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
116
+ }
117
+ finally { if (e_2) throw e_2.error; }
118
+ }
119
+ });
120
+ }
121
+ /**
122
+ * Lists the endpoints that a Batch Compute Node under this Batch Account may call as part of Batch
123
+ * service administration. If you are deploying a Pool inside of a virtual network that you specify,
124
+ * you must make sure your network allows outbound access to these endpoints. Failure to allow access
125
+ * to these endpoints may cause Batch to mark the affected nodes as unusable. For more information
126
+ * about creating a pool inside of a virtual network, see
127
+ * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network.
128
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
129
+ * @param accountName The name of the Batch account.
130
+ * @param options The options parameters.
131
+ */
132
+ listOutboundNetworkDependenciesEndpoints(resourceGroupName, accountName, options) {
133
+ const iter = this.listOutboundNetworkDependenciesEndpointsPagingAll(resourceGroupName, accountName, options);
134
+ return {
135
+ next() {
136
+ return iter.next();
137
+ },
138
+ [Symbol.asyncIterator]() {
139
+ return this;
140
+ },
141
+ byPage: () => {
142
+ return this.listOutboundNetworkDependenciesEndpointsPagingPage(resourceGroupName, accountName, options);
143
+ }
144
+ };
145
+ }
146
+ listOutboundNetworkDependenciesEndpointsPagingPage(resourceGroupName, accountName, options) {
147
+ return __asyncGenerator(this, arguments, function* listOutboundNetworkDependenciesEndpointsPagingPage_1() {
148
+ let result = yield __await(this._listOutboundNetworkDependenciesEndpoints(resourceGroupName, accountName, options));
149
+ yield yield __await(result.value || []);
150
+ let continuationToken = result.nextLink;
151
+ while (continuationToken) {
152
+ result = yield __await(this._listOutboundNetworkDependenciesEndpointsNext(resourceGroupName, accountName, continuationToken, options));
153
+ continuationToken = result.nextLink;
154
+ yield yield __await(result.value || []);
155
+ }
156
+ });
157
+ }
158
+ listOutboundNetworkDependenciesEndpointsPagingAll(resourceGroupName, accountName, options) {
159
+ return __asyncGenerator(this, arguments, function* listOutboundNetworkDependenciesEndpointsPagingAll_1() {
160
+ var e_3, _a;
161
+ try {
162
+ for (var _b = __asyncValues(this.listOutboundNetworkDependenciesEndpointsPagingPage(resourceGroupName, accountName, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
163
+ const page = _c.value;
164
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
165
+ }
166
+ }
167
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
168
+ finally {
169
+ try {
170
+ if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
171
+ }
172
+ finally { if (e_3) throw e_3.error; }
173
+ }
174
+ });
175
+ }
176
+ /**
177
+ * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with
178
+ * this API and should instead be updated with the Update Batch Account API.
179
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
180
+ * @param accountName A name for the Batch account which must be unique within the region. Batch
181
+ * account names must be between 3 and 24 characters in length and must use only numbers and lowercase
182
+ * letters. This name is used as part of the DNS name that is used to access the Batch service in the
183
+ * region in which the account is created. For example: http://accountname.region.batch.azure.com/.
184
+ * @param parameters Additional parameters for account creation.
185
+ * @param options The options parameters.
186
+ */
187
+ beginCreate(resourceGroupName, accountName, parameters, options) {
188
+ return __awaiter(this, void 0, void 0, function* () {
189
+ const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
190
+ return this.client.sendOperationRequest(args, spec);
191
+ });
192
+ const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
193
+ var _a;
194
+ let currentRawResponse = undefined;
195
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
196
+ const callback = (rawResponse, flatResponse) => {
197
+ currentRawResponse = rawResponse;
198
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
199
+ };
200
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
201
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
202
+ return {
203
+ flatResponse,
204
+ rawResponse: {
205
+ statusCode: currentRawResponse.status,
206
+ body: currentRawResponse.parsedBody,
207
+ headers: currentRawResponse.headers.toJSON()
208
+ }
209
+ };
210
+ });
211
+ const lro = new LroImpl(sendOperation, { resourceGroupName, accountName, parameters, options }, createOperationSpec);
212
+ return new LroEngine(lro, {
213
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
214
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
215
+ lroResourceLocationConfig: "location"
216
+ });
217
+ });
218
+ }
219
+ /**
220
+ * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with
221
+ * this API and should instead be updated with the Update Batch Account API.
222
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
223
+ * @param accountName A name for the Batch account which must be unique within the region. Batch
224
+ * account names must be between 3 and 24 characters in length and must use only numbers and lowercase
225
+ * letters. This name is used as part of the DNS name that is used to access the Batch service in the
226
+ * region in which the account is created. For example: http://accountname.region.batch.azure.com/.
227
+ * @param parameters Additional parameters for account creation.
228
+ * @param options The options parameters.
229
+ */
230
+ beginCreateAndWait(resourceGroupName, accountName, parameters, options) {
231
+ return __awaiter(this, void 0, void 0, function* () {
232
+ const poller = yield this.beginCreate(resourceGroupName, accountName, parameters, options);
233
+ return poller.pollUntilDone();
234
+ });
235
+ }
236
+ /**
237
+ * Updates the properties of an existing Batch account.
238
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
239
+ * @param accountName The name of the Batch account.
240
+ * @param parameters Additional parameters for account update.
241
+ * @param options The options parameters.
242
+ */
243
+ update(resourceGroupName, accountName, parameters, options) {
244
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, parameters, options }, updateOperationSpec);
245
+ }
246
+ /**
247
+ * Deletes the specified Batch account.
248
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
249
+ * @param accountName The name of the Batch account.
250
+ * @param options The options parameters.
251
+ */
252
+ beginDelete(resourceGroupName, accountName, options) {
253
+ return __awaiter(this, void 0, void 0, function* () {
254
+ const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
255
+ return this.client.sendOperationRequest(args, spec);
256
+ });
257
+ const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
258
+ var _a;
259
+ let currentRawResponse = undefined;
260
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
261
+ const callback = (rawResponse, flatResponse) => {
262
+ currentRawResponse = rawResponse;
263
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
264
+ };
265
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
266
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
267
+ return {
268
+ flatResponse,
269
+ rawResponse: {
270
+ statusCode: currentRawResponse.status,
271
+ body: currentRawResponse.parsedBody,
272
+ headers: currentRawResponse.headers.toJSON()
273
+ }
274
+ };
275
+ });
276
+ const lro = new LroImpl(sendOperation, { resourceGroupName, accountName, options }, deleteOperationSpec);
277
+ return new LroEngine(lro, {
278
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
279
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
280
+ lroResourceLocationConfig: "location"
281
+ });
282
+ });
283
+ }
284
+ /**
285
+ * Deletes the specified Batch account.
286
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
287
+ * @param accountName The name of the Batch account.
288
+ * @param options The options parameters.
289
+ */
290
+ beginDeleteAndWait(resourceGroupName, accountName, options) {
291
+ return __awaiter(this, void 0, void 0, function* () {
292
+ const poller = yield this.beginDelete(resourceGroupName, accountName, options);
293
+ return poller.pollUntilDone();
294
+ });
295
+ }
296
+ /**
297
+ * Gets information about the specified Batch account.
298
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
299
+ * @param accountName The name of the Batch account.
300
+ * @param options The options parameters.
301
+ */
302
+ get(resourceGroupName, accountName, options) {
303
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, getOperationSpec);
304
+ }
305
+ /**
306
+ * Gets information about the Batch accounts associated with the subscription.
307
+ * @param options The options parameters.
308
+ */
309
+ _list(options) {
310
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
311
+ }
312
+ /**
313
+ * Gets information about the Batch accounts associated with the specified resource group.
314
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
315
+ * @param options The options parameters.
316
+ */
317
+ _listByResourceGroup(resourceGroupName, options) {
318
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
319
+ }
320
+ /**
321
+ * Synchronizes access keys for the auto-storage account configured for the specified Batch account,
322
+ * only if storage key authentication is being used.
323
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
324
+ * @param accountName The name of the Batch account.
325
+ * @param options The options parameters.
326
+ */
327
+ synchronizeAutoStorageKeys(resourceGroupName, accountName, options) {
328
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, synchronizeAutoStorageKeysOperationSpec);
329
+ }
330
+ /**
331
+ * This operation applies only to Batch accounts with allowedAuthenticationModes containing
332
+ * 'SharedKey'. If the Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode,
333
+ * clients cannot use shared keys to authenticate, and must use another allowedAuthenticationModes
334
+ * instead. In this case, regenerating the keys will fail.
335
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
336
+ * @param accountName The name of the Batch account.
337
+ * @param parameters The type of key to regenerate.
338
+ * @param options The options parameters.
339
+ */
340
+ regenerateKey(resourceGroupName, accountName, parameters, options) {
341
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, parameters, options }, regenerateKeyOperationSpec);
342
+ }
343
+ /**
344
+ * This operation applies only to Batch accounts with allowedAuthenticationModes containing
345
+ * 'SharedKey'. If the Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode,
346
+ * clients cannot use shared keys to authenticate, and must use another allowedAuthenticationModes
347
+ * instead. In this case, getting the keys will fail.
348
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
349
+ * @param accountName The name of the Batch account.
350
+ * @param options The options parameters.
351
+ */
352
+ getKeys(resourceGroupName, accountName, options) {
353
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, getKeysOperationSpec);
354
+ }
355
+ /**
356
+ * Lists the endpoints that a Batch Compute Node under this Batch Account may call as part of Batch
357
+ * service administration. If you are deploying a Pool inside of a virtual network that you specify,
358
+ * you must make sure your network allows outbound access to these endpoints. Failure to allow access
359
+ * to these endpoints may cause Batch to mark the affected nodes as unusable. For more information
360
+ * about creating a pool inside of a virtual network, see
361
+ * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network.
362
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
363
+ * @param accountName The name of the Batch account.
364
+ * @param options The options parameters.
365
+ */
366
+ _listOutboundNetworkDependenciesEndpoints(resourceGroupName, accountName, options) {
367
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, listOutboundNetworkDependenciesEndpointsOperationSpec);
368
+ }
369
+ /**
370
+ * ListNext
371
+ * @param nextLink The nextLink from the previous successful call to the List method.
372
+ * @param options The options parameters.
373
+ */
374
+ _listNext(nextLink, options) {
375
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
376
+ }
377
+ /**
378
+ * ListByResourceGroupNext
379
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
380
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
381
+ * @param options The options parameters.
382
+ */
383
+ _listByResourceGroupNext(resourceGroupName, nextLink, options) {
384
+ return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec);
385
+ }
386
+ /**
387
+ * ListOutboundNetworkDependenciesEndpointsNext
388
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
389
+ * @param accountName The name of the Batch account.
390
+ * @param nextLink The nextLink from the previous successful call to the
391
+ * ListOutboundNetworkDependenciesEndpoints method.
392
+ * @param options The options parameters.
393
+ */
394
+ _listOutboundNetworkDependenciesEndpointsNext(resourceGroupName, accountName, nextLink, options) {
395
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, nextLink, options }, listOutboundNetworkDependenciesEndpointsNextOperationSpec);
396
+ }
397
+ }
398
+ // Operation Specifications
399
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
400
+ const createOperationSpec = {
401
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}",
402
+ httpMethod: "PUT",
403
+ responses: {
404
+ 200: {
405
+ bodyMapper: Mappers.BatchAccount
406
+ },
407
+ 201: {
408
+ bodyMapper: Mappers.BatchAccount
409
+ },
410
+ 202: {
411
+ bodyMapper: Mappers.BatchAccount
412
+ },
413
+ 204: {
414
+ bodyMapper: Mappers.BatchAccount
415
+ },
416
+ default: {
417
+ bodyMapper: Mappers.CloudError
418
+ }
419
+ },
420
+ requestBody: Parameters.parameters,
421
+ queryParameters: [Parameters.apiVersion],
422
+ urlParameters: [
423
+ Parameters.$host,
424
+ Parameters.resourceGroupName,
425
+ Parameters.accountName,
426
+ Parameters.subscriptionId
427
+ ],
428
+ headerParameters: [Parameters.contentType, Parameters.accept],
429
+ mediaType: "json",
430
+ serializer
431
+ };
432
+ const updateOperationSpec = {
433
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}",
434
+ httpMethod: "PATCH",
435
+ responses: {
436
+ 200: {
437
+ bodyMapper: Mappers.BatchAccount
438
+ },
439
+ default: {
440
+ bodyMapper: Mappers.CloudError
441
+ }
442
+ },
443
+ requestBody: Parameters.parameters1,
444
+ queryParameters: [Parameters.apiVersion],
445
+ urlParameters: [
446
+ Parameters.$host,
447
+ Parameters.resourceGroupName,
448
+ Parameters.subscriptionId,
449
+ Parameters.accountName1
450
+ ],
451
+ headerParameters: [Parameters.contentType, Parameters.accept],
452
+ mediaType: "json",
453
+ serializer
454
+ };
455
+ const deleteOperationSpec = {
456
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}",
457
+ httpMethod: "DELETE",
458
+ responses: {
459
+ 200: {},
460
+ 201: {},
461
+ 202: {},
462
+ 204: {},
463
+ default: {
464
+ bodyMapper: Mappers.CloudError
465
+ }
466
+ },
467
+ queryParameters: [Parameters.apiVersion],
468
+ urlParameters: [
469
+ Parameters.$host,
470
+ Parameters.resourceGroupName,
471
+ Parameters.subscriptionId,
472
+ Parameters.accountName1
473
+ ],
474
+ headerParameters: [Parameters.accept],
475
+ serializer
476
+ };
477
+ const getOperationSpec = {
478
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}",
479
+ httpMethod: "GET",
480
+ responses: {
481
+ 200: {
482
+ bodyMapper: Mappers.BatchAccount
483
+ },
484
+ default: {
485
+ bodyMapper: Mappers.CloudError
486
+ }
487
+ },
488
+ queryParameters: [Parameters.apiVersion],
489
+ urlParameters: [
490
+ Parameters.$host,
491
+ Parameters.resourceGroupName,
492
+ Parameters.subscriptionId,
493
+ Parameters.accountName1
494
+ ],
495
+ headerParameters: [Parameters.accept],
496
+ serializer
497
+ };
498
+ const listOperationSpec = {
499
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Batch/batchAccounts",
500
+ httpMethod: "GET",
501
+ responses: {
502
+ 200: {
503
+ bodyMapper: Mappers.BatchAccountListResult
504
+ },
505
+ default: {
506
+ bodyMapper: Mappers.CloudError
507
+ }
508
+ },
509
+ queryParameters: [Parameters.apiVersion],
510
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
511
+ headerParameters: [Parameters.accept],
512
+ serializer
513
+ };
514
+ const listByResourceGroupOperationSpec = {
515
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts",
516
+ httpMethod: "GET",
517
+ responses: {
518
+ 200: {
519
+ bodyMapper: Mappers.BatchAccountListResult
520
+ },
521
+ default: {
522
+ bodyMapper: Mappers.CloudError
523
+ }
524
+ },
525
+ queryParameters: [Parameters.apiVersion],
526
+ urlParameters: [
527
+ Parameters.$host,
528
+ Parameters.resourceGroupName,
529
+ Parameters.subscriptionId
530
+ ],
531
+ headerParameters: [Parameters.accept],
532
+ serializer
533
+ };
534
+ const synchronizeAutoStorageKeysOperationSpec = {
535
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/syncAutoStorageKeys",
536
+ httpMethod: "POST",
537
+ responses: {
538
+ 204: {},
539
+ default: {
540
+ bodyMapper: Mappers.CloudError
541
+ }
542
+ },
543
+ queryParameters: [Parameters.apiVersion],
544
+ urlParameters: [
545
+ Parameters.$host,
546
+ Parameters.resourceGroupName,
547
+ Parameters.subscriptionId,
548
+ Parameters.accountName1
549
+ ],
550
+ headerParameters: [Parameters.accept],
551
+ serializer
552
+ };
553
+ const regenerateKeyOperationSpec = {
554
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/regenerateKeys",
555
+ httpMethod: "POST",
556
+ responses: {
557
+ 200: {
558
+ bodyMapper: Mappers.BatchAccountKeys
559
+ },
560
+ default: {
561
+ bodyMapper: Mappers.CloudError
562
+ }
563
+ },
564
+ requestBody: Parameters.parameters2,
565
+ queryParameters: [Parameters.apiVersion],
566
+ urlParameters: [
567
+ Parameters.$host,
568
+ Parameters.resourceGroupName,
569
+ Parameters.subscriptionId,
570
+ Parameters.accountName1
571
+ ],
572
+ headerParameters: [Parameters.contentType, Parameters.accept],
573
+ mediaType: "json",
574
+ serializer
575
+ };
576
+ const getKeysOperationSpec = {
577
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/listKeys",
578
+ httpMethod: "POST",
579
+ responses: {
580
+ 200: {
581
+ bodyMapper: Mappers.BatchAccountKeys
582
+ },
583
+ default: {
584
+ bodyMapper: Mappers.CloudError
585
+ }
586
+ },
587
+ queryParameters: [Parameters.apiVersion],
588
+ urlParameters: [
589
+ Parameters.$host,
590
+ Parameters.resourceGroupName,
591
+ Parameters.subscriptionId,
592
+ Parameters.accountName1
593
+ ],
594
+ headerParameters: [Parameters.accept],
595
+ serializer
596
+ };
597
+ const listOutboundNetworkDependenciesEndpointsOperationSpec = {
598
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/outboundNetworkDependenciesEndpoints",
599
+ httpMethod: "GET",
600
+ responses: {
601
+ 200: {
602
+ bodyMapper: Mappers.OutboundEnvironmentEndpointCollection
603
+ },
604
+ default: {
605
+ bodyMapper: Mappers.CloudError
606
+ }
607
+ },
608
+ queryParameters: [Parameters.apiVersion],
609
+ urlParameters: [
610
+ Parameters.$host,
611
+ Parameters.resourceGroupName,
612
+ Parameters.subscriptionId,
613
+ Parameters.accountName1
614
+ ],
615
+ headerParameters: [Parameters.accept],
616
+ serializer
617
+ };
618
+ const listNextOperationSpec = {
619
+ path: "{nextLink}",
620
+ httpMethod: "GET",
621
+ responses: {
622
+ 200: {
623
+ bodyMapper: Mappers.BatchAccountListResult
624
+ },
625
+ default: {
626
+ bodyMapper: Mappers.CloudError
627
+ }
628
+ },
629
+ queryParameters: [Parameters.apiVersion],
630
+ urlParameters: [
631
+ Parameters.$host,
632
+ Parameters.subscriptionId,
633
+ Parameters.nextLink
634
+ ],
635
+ headerParameters: [Parameters.accept],
636
+ serializer
637
+ };
638
+ const listByResourceGroupNextOperationSpec = {
639
+ path: "{nextLink}",
640
+ httpMethod: "GET",
641
+ responses: {
642
+ 200: {
643
+ bodyMapper: Mappers.BatchAccountListResult
644
+ },
645
+ default: {
646
+ bodyMapper: Mappers.CloudError
647
+ }
648
+ },
649
+ queryParameters: [Parameters.apiVersion],
650
+ urlParameters: [
651
+ Parameters.$host,
652
+ Parameters.resourceGroupName,
653
+ Parameters.subscriptionId,
654
+ Parameters.nextLink
655
+ ],
656
+ headerParameters: [Parameters.accept],
657
+ serializer
658
+ };
659
+ const listOutboundNetworkDependenciesEndpointsNextOperationSpec = {
660
+ path: "{nextLink}",
661
+ httpMethod: "GET",
662
+ responses: {
663
+ 200: {
664
+ bodyMapper: Mappers.OutboundEnvironmentEndpointCollection
665
+ },
666
+ default: {
667
+ bodyMapper: Mappers.CloudError
668
+ }
669
+ },
670
+ queryParameters: [Parameters.apiVersion],
671
+ urlParameters: [
672
+ Parameters.$host,
673
+ Parameters.resourceGroupName,
674
+ Parameters.subscriptionId,
675
+ Parameters.accountName1,
676
+ Parameters.nextLink
677
+ ],
678
+ headerParameters: [Parameters.accept],
679
+ serializer
680
+ };
681
+ //# sourceMappingURL=batchAccountOperations.js.map