@azure/arm-batch 4.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 (251) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +75 -77
  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/dist-esm/src/models/index.js +9 -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 +2357 -1248
  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 +2 -0
  53. package/dist-esm/src/operations/index.d.ts.map +1 -0
  54. package/dist-esm/src/operations/index.js +17 -0
  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/dist-esm/src/operationsInterfaces/applicationOperations.js +9 -0
  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/dist-esm/src/operationsInterfaces/applicationPackageOperations.js +9 -0
  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/dist-esm/src/operationsInterfaces/batchAccountOperations.js +9 -0
  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 +71 -34
  121. package/review/arm-batch.api.md +1459 -0
  122. package/rollup.config.js +184 -27
  123. package/src/batchManagementClient.ts +75 -0
  124. package/src/batchManagementClientContext.ts +71 -0
  125. package/src/index.ts +13 -0
  126. package/src/lroImpl.ts +34 -0
  127. package/src/models/index.ts +2045 -0
  128. package/{lib → src}/models/mappers.ts +2413 -1223
  129. package/src/models/parameters.ts +351 -0
  130. package/src/operations/applicationOperations.ts +357 -0
  131. package/src/operations/applicationPackageOperations.ts +410 -0
  132. package/src/operations/batchAccountOperations.ts +901 -0
  133. package/src/operations/certificateOperations.ts +527 -0
  134. package/{lib → src}/operations/index.ts +5 -5
  135. package/src/operations/location.ts +413 -0
  136. package/src/operations/operations.ts +137 -0
  137. package/src/operations/poolOperations.ts +560 -0
  138. package/src/operations/privateEndpointConnectionOperations.ts +388 -0
  139. package/src/operations/privateLinkResourceOperations.ts +235 -0
  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/{esm/operations/index.js → src/operationsInterfaces/index.ts} +6 -6
  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 +4 -4
  151. package/types/arm-batch.d.ts +2528 -0
  152. package/types/tsdoc-metadata.json +11 -0
  153. package/dist/arm-batch.js +0 -4689
  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 -25
  158. package/esm/batchManagementClient.d.ts.map +0 -1
  159. package/esm/batchManagementClient.js +0 -40
  160. package/esm/batchManagementClient.js.map +0 -1
  161. package/esm/batchManagementClientContext.d.ts +0 -17
  162. package/esm/batchManagementClientContext.d.ts.map +0 -1
  163. package/esm/batchManagementClientContext.js +0 -57
  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 -11
  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 -11
  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 -11
  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 -11
  180. package/esm/models/certificateOperationsMappers.js.map +0 -1
  181. package/esm/models/index.d.ts +0 -3108
  182. package/esm/models/index.d.ts.map +0 -1
  183. package/esm/models/index.js +0 -10
  184. package/esm/models/index.js.map +0 -1
  185. package/esm/models/locationMappers.d.ts +0 -2
  186. package/esm/models/locationMappers.d.ts.map +0 -1
  187. package/esm/models/locationMappers.js +0 -11
  188. package/esm/models/locationMappers.js.map +0 -1
  189. package/esm/models/mappers.d.ts +0 -76
  190. package/esm/models/mappers.d.ts.map +0 -1
  191. package/esm/models/mappers.js.map +0 -1
  192. package/esm/models/operationsMappers.d.ts +0 -2
  193. package/esm/models/operationsMappers.d.ts.map +0 -1
  194. package/esm/models/operationsMappers.js +0 -11
  195. package/esm/models/operationsMappers.js.map +0 -1
  196. package/esm/models/parameters.d.ts +0 -18
  197. package/esm/models/parameters.d.ts.map +0 -1
  198. package/esm/models/parameters.js +0 -196
  199. package/esm/models/parameters.js.map +0 -1
  200. package/esm/models/poolOperationsMappers.d.ts +0 -2
  201. package/esm/models/poolOperationsMappers.d.ts.map +0 -1
  202. package/esm/models/poolOperationsMappers.js +0 -11
  203. package/esm/models/poolOperationsMappers.js.map +0 -1
  204. package/esm/operations/applicationOperations.d.ts +0 -151
  205. package/esm/operations/applicationOperations.d.ts.map +0 -1
  206. package/esm/operations/applicationOperations.js +0 -226
  207. package/esm/operations/applicationOperations.js.map +0 -1
  208. package/esm/operations/applicationPackageOperations.d.ts +0 -124
  209. package/esm/operations/applicationPackageOperations.d.ts.map +0 -1
  210. package/esm/operations/applicationPackageOperations.js +0 -171
  211. package/esm/operations/applicationPackageOperations.js.map +0 -1
  212. package/esm/operations/batchAccountOperations.d.ts +0 -246
  213. package/esm/operations/batchAccountOperations.d.ts.map +0 -1
  214. package/esm/operations/batchAccountOperations.js +0 -426
  215. package/esm/operations/batchAccountOperations.js.map +0 -1
  216. package/esm/operations/certificateOperations.d.ts +0 -198
  217. package/esm/operations/certificateOperations.d.ts.map +0 -1
  218. package/esm/operations/certificateOperations.js +0 -326
  219. package/esm/operations/certificateOperations.js.map +0 -1
  220. package/esm/operations/index.d.ts.map +0 -1
  221. package/esm/operations/index.js.map +0 -1
  222. package/esm/operations/location.d.ts +0 -52
  223. package/esm/operations/location.d.ts.map +0 -1
  224. package/esm/operations/location.js +0 -93
  225. package/esm/operations/location.js.map +0 -1
  226. package/esm/operations/operations.d.ts +0 -46
  227. package/esm/operations/operations.d.ts.map +0 -1
  228. package/esm/operations/operations.js +0 -77
  229. package/esm/operations/operations.js.map +0 -1
  230. package/esm/operations/poolOperations.d.ts +0 -199
  231. package/esm/operations/poolOperations.d.ts.map +0 -1
  232. package/esm/operations/poolOperations.js +0 -352
  233. package/esm/operations/poolOperations.js.map +0 -1
  234. package/lib/batchManagementClient.ts +0 -55
  235. package/lib/batchManagementClientContext.ts +0 -63
  236. package/lib/models/applicationOperationsMappers.ts +0 -19
  237. package/lib/models/applicationPackageOperationsMappers.ts +0 -16
  238. package/lib/models/batchAccountOperationsMappers.ts +0 -61
  239. package/lib/models/certificateOperationsMappers.ts +0 -60
  240. package/lib/models/index.ts +0 -3252
  241. package/lib/models/locationMappers.ts +0 -17
  242. package/lib/models/operationsMappers.ts +0 -17
  243. package/lib/models/parameters.ts +0 -198
  244. package/lib/models/poolOperationsMappers.ts +0 -61
  245. package/lib/operations/applicationOperations.ts +0 -399
  246. package/lib/operations/applicationPackageOperations.ts +0 -307
  247. package/lib/operations/batchAccountOperations.ts +0 -683
  248. package/lib/operations/certificateOperations.ts +0 -510
  249. package/lib/operations/location.ts +0 -147
  250. package/lib/operations/operations.ts +0 -123
  251. package/lib/operations/poolOperations.ts +0 -550
@@ -0,0 +1,388 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { PrivateEndpointConnectionOperations } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
+ import * as Parameters from "../models/parameters";
14
+ import { BatchManagementClientContext } from "../batchManagementClientContext";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ PrivateEndpointConnection,
19
+ PrivateEndpointConnectionListByBatchAccountNextOptionalParams,
20
+ PrivateEndpointConnectionListByBatchAccountOptionalParams,
21
+ PrivateEndpointConnectionListByBatchAccountResponse,
22
+ PrivateEndpointConnectionGetOptionalParams,
23
+ PrivateEndpointConnectionGetResponse,
24
+ PrivateEndpointConnectionUpdateOptionalParams,
25
+ PrivateEndpointConnectionUpdateResponse,
26
+ PrivateEndpointConnectionListByBatchAccountNextResponse
27
+ } from "../models";
28
+
29
+ /// <reference lib="esnext.asynciterable" />
30
+ /** Class containing PrivateEndpointConnectionOperations operations. */
31
+ export class PrivateEndpointConnectionOperationsImpl
32
+ implements PrivateEndpointConnectionOperations {
33
+ private readonly client: BatchManagementClientContext;
34
+
35
+ /**
36
+ * Initialize a new instance of the class PrivateEndpointConnectionOperations class.
37
+ * @param client Reference to the service client
38
+ */
39
+ constructor(client: BatchManagementClientContext) {
40
+ this.client = client;
41
+ }
42
+
43
+ /**
44
+ * Lists all of the private endpoint connections in the specified account.
45
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
46
+ * @param accountName The name of the Batch account.
47
+ * @param options The options parameters.
48
+ */
49
+ public listByBatchAccount(
50
+ resourceGroupName: string,
51
+ accountName: string,
52
+ options?: PrivateEndpointConnectionListByBatchAccountOptionalParams
53
+ ): PagedAsyncIterableIterator<PrivateEndpointConnection> {
54
+ const iter = this.listByBatchAccountPagingAll(
55
+ resourceGroupName,
56
+ accountName,
57
+ options
58
+ );
59
+ return {
60
+ next() {
61
+ return iter.next();
62
+ },
63
+ [Symbol.asyncIterator]() {
64
+ return this;
65
+ },
66
+ byPage: () => {
67
+ return this.listByBatchAccountPagingPage(
68
+ resourceGroupName,
69
+ accountName,
70
+ options
71
+ );
72
+ }
73
+ };
74
+ }
75
+
76
+ private async *listByBatchAccountPagingPage(
77
+ resourceGroupName: string,
78
+ accountName: string,
79
+ options?: PrivateEndpointConnectionListByBatchAccountOptionalParams
80
+ ): AsyncIterableIterator<PrivateEndpointConnection[]> {
81
+ let result = await this._listByBatchAccount(
82
+ resourceGroupName,
83
+ accountName,
84
+ options
85
+ );
86
+ yield result.value || [];
87
+ let continuationToken = result.nextLink;
88
+ while (continuationToken) {
89
+ result = await this._listByBatchAccountNext(
90
+ resourceGroupName,
91
+ accountName,
92
+ continuationToken,
93
+ options
94
+ );
95
+ continuationToken = result.nextLink;
96
+ yield result.value || [];
97
+ }
98
+ }
99
+
100
+ private async *listByBatchAccountPagingAll(
101
+ resourceGroupName: string,
102
+ accountName: string,
103
+ options?: PrivateEndpointConnectionListByBatchAccountOptionalParams
104
+ ): AsyncIterableIterator<PrivateEndpointConnection> {
105
+ for await (const page of this.listByBatchAccountPagingPage(
106
+ resourceGroupName,
107
+ accountName,
108
+ options
109
+ )) {
110
+ yield* page;
111
+ }
112
+ }
113
+
114
+ /**
115
+ * Lists all of the private endpoint connections in the specified account.
116
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
117
+ * @param accountName The name of the Batch account.
118
+ * @param options The options parameters.
119
+ */
120
+ private _listByBatchAccount(
121
+ resourceGroupName: string,
122
+ accountName: string,
123
+ options?: PrivateEndpointConnectionListByBatchAccountOptionalParams
124
+ ): Promise<PrivateEndpointConnectionListByBatchAccountResponse> {
125
+ return this.client.sendOperationRequest(
126
+ { resourceGroupName, accountName, options },
127
+ listByBatchAccountOperationSpec
128
+ );
129
+ }
130
+
131
+ /**
132
+ * Gets information about the specified private endpoint connection.
133
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
134
+ * @param accountName The name of the Batch account.
135
+ * @param privateEndpointConnectionName The private endpoint connection name. This must be unique
136
+ * within the account.
137
+ * @param options The options parameters.
138
+ */
139
+ get(
140
+ resourceGroupName: string,
141
+ accountName: string,
142
+ privateEndpointConnectionName: string,
143
+ options?: PrivateEndpointConnectionGetOptionalParams
144
+ ): Promise<PrivateEndpointConnectionGetResponse> {
145
+ return this.client.sendOperationRequest(
146
+ {
147
+ resourceGroupName,
148
+ accountName,
149
+ privateEndpointConnectionName,
150
+ options
151
+ },
152
+ getOperationSpec
153
+ );
154
+ }
155
+
156
+ /**
157
+ * Updates the properties of an existing private endpoint connection.
158
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
159
+ * @param accountName The name of the Batch account.
160
+ * @param privateEndpointConnectionName The private endpoint connection name. This must be unique
161
+ * within the account.
162
+ * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are
163
+ * supplied will be updated, any property not supplied will be unchanged.
164
+ * @param options The options parameters.
165
+ */
166
+ async beginUpdate(
167
+ resourceGroupName: string,
168
+ accountName: string,
169
+ privateEndpointConnectionName: string,
170
+ parameters: PrivateEndpointConnection,
171
+ options?: PrivateEndpointConnectionUpdateOptionalParams
172
+ ): Promise<
173
+ PollerLike<
174
+ PollOperationState<PrivateEndpointConnectionUpdateResponse>,
175
+ PrivateEndpointConnectionUpdateResponse
176
+ >
177
+ > {
178
+ const directSendOperation = async (
179
+ args: coreClient.OperationArguments,
180
+ spec: coreClient.OperationSpec
181
+ ): Promise<PrivateEndpointConnectionUpdateResponse> => {
182
+ return this.client.sendOperationRequest(args, spec);
183
+ };
184
+ const sendOperation = async (
185
+ args: coreClient.OperationArguments,
186
+ spec: coreClient.OperationSpec
187
+ ) => {
188
+ let currentRawResponse:
189
+ | coreClient.FullOperationResponse
190
+ | undefined = undefined;
191
+ const providedCallback = args.options?.onResponse;
192
+ const callback: coreClient.RawResponseCallback = (
193
+ rawResponse: coreClient.FullOperationResponse,
194
+ flatResponse: unknown
195
+ ) => {
196
+ currentRawResponse = rawResponse;
197
+ providedCallback?.(rawResponse, flatResponse);
198
+ };
199
+ const updatedArgs = {
200
+ ...args,
201
+ options: {
202
+ ...args.options,
203
+ onResponse: callback
204
+ }
205
+ };
206
+ const flatResponse = await directSendOperation(updatedArgs, spec);
207
+ return {
208
+ flatResponse,
209
+ rawResponse: {
210
+ statusCode: currentRawResponse!.status,
211
+ body: currentRawResponse!.parsedBody,
212
+ headers: currentRawResponse!.headers.toJSON()
213
+ }
214
+ };
215
+ };
216
+
217
+ const lro = new LroImpl(
218
+ sendOperation,
219
+ {
220
+ resourceGroupName,
221
+ accountName,
222
+ privateEndpointConnectionName,
223
+ parameters,
224
+ options
225
+ },
226
+ updateOperationSpec
227
+ );
228
+ return new LroEngine(lro, {
229
+ resumeFrom: options?.resumeFrom,
230
+ intervalInMs: options?.updateIntervalInMs,
231
+ lroResourceLocationConfig: "azure-async-operation"
232
+ });
233
+ }
234
+
235
+ /**
236
+ * Updates the properties of an existing private endpoint connection.
237
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
238
+ * @param accountName The name of the Batch account.
239
+ * @param privateEndpointConnectionName The private endpoint connection name. This must be unique
240
+ * within the account.
241
+ * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are
242
+ * supplied will be updated, any property not supplied will be unchanged.
243
+ * @param options The options parameters.
244
+ */
245
+ async beginUpdateAndWait(
246
+ resourceGroupName: string,
247
+ accountName: string,
248
+ privateEndpointConnectionName: string,
249
+ parameters: PrivateEndpointConnection,
250
+ options?: PrivateEndpointConnectionUpdateOptionalParams
251
+ ): Promise<PrivateEndpointConnectionUpdateResponse> {
252
+ const poller = await this.beginUpdate(
253
+ resourceGroupName,
254
+ accountName,
255
+ privateEndpointConnectionName,
256
+ parameters,
257
+ options
258
+ );
259
+ return poller.pollUntilDone();
260
+ }
261
+
262
+ /**
263
+ * ListByBatchAccountNext
264
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
265
+ * @param accountName The name of the Batch account.
266
+ * @param nextLink The nextLink from the previous successful call to the ListByBatchAccount method.
267
+ * @param options The options parameters.
268
+ */
269
+ private _listByBatchAccountNext(
270
+ resourceGroupName: string,
271
+ accountName: string,
272
+ nextLink: string,
273
+ options?: PrivateEndpointConnectionListByBatchAccountNextOptionalParams
274
+ ): Promise<PrivateEndpointConnectionListByBatchAccountNextResponse> {
275
+ return this.client.sendOperationRequest(
276
+ { resourceGroupName, accountName, nextLink, options },
277
+ listByBatchAccountNextOperationSpec
278
+ );
279
+ }
280
+ }
281
+ // Operation Specifications
282
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
283
+
284
+ const listByBatchAccountOperationSpec: coreClient.OperationSpec = {
285
+ path:
286
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections",
287
+ httpMethod: "GET",
288
+ responses: {
289
+ 200: {
290
+ bodyMapper: Mappers.ListPrivateEndpointConnectionsResult
291
+ },
292
+ default: {
293
+ bodyMapper: Mappers.CloudError
294
+ }
295
+ },
296
+ queryParameters: [Parameters.apiVersion, Parameters.maxresults],
297
+ urlParameters: [
298
+ Parameters.$host,
299
+ Parameters.resourceGroupName,
300
+ Parameters.subscriptionId,
301
+ Parameters.accountName1
302
+ ],
303
+ headerParameters: [Parameters.accept],
304
+ serializer
305
+ };
306
+ const getOperationSpec: coreClient.OperationSpec = {
307
+ path:
308
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}",
309
+ httpMethod: "GET",
310
+ responses: {
311
+ 200: {
312
+ bodyMapper: Mappers.PrivateEndpointConnection
313
+ },
314
+ default: {
315
+ bodyMapper: Mappers.CloudError
316
+ }
317
+ },
318
+ queryParameters: [Parameters.apiVersion],
319
+ urlParameters: [
320
+ Parameters.$host,
321
+ Parameters.resourceGroupName,
322
+ Parameters.subscriptionId,
323
+ Parameters.accountName1,
324
+ Parameters.privateEndpointConnectionName
325
+ ],
326
+ headerParameters: [Parameters.accept],
327
+ serializer
328
+ };
329
+ const updateOperationSpec: coreClient.OperationSpec = {
330
+ path:
331
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}",
332
+ httpMethod: "PATCH",
333
+ responses: {
334
+ 200: {
335
+ bodyMapper: Mappers.PrivateEndpointConnection
336
+ },
337
+ 201: {
338
+ bodyMapper: Mappers.PrivateEndpointConnection
339
+ },
340
+ 202: {
341
+ bodyMapper: Mappers.PrivateEndpointConnection
342
+ },
343
+ 204: {
344
+ bodyMapper: Mappers.PrivateEndpointConnection
345
+ },
346
+ default: {
347
+ bodyMapper: Mappers.CloudError
348
+ }
349
+ },
350
+ requestBody: Parameters.parameters9,
351
+ queryParameters: [Parameters.apiVersion],
352
+ urlParameters: [
353
+ Parameters.$host,
354
+ Parameters.resourceGroupName,
355
+ Parameters.subscriptionId,
356
+ Parameters.accountName1,
357
+ Parameters.privateEndpointConnectionName
358
+ ],
359
+ headerParameters: [
360
+ Parameters.contentType,
361
+ Parameters.accept,
362
+ Parameters.ifMatch
363
+ ],
364
+ mediaType: "json",
365
+ serializer
366
+ };
367
+ const listByBatchAccountNextOperationSpec: coreClient.OperationSpec = {
368
+ path: "{nextLink}",
369
+ httpMethod: "GET",
370
+ responses: {
371
+ 200: {
372
+ bodyMapper: Mappers.ListPrivateEndpointConnectionsResult
373
+ },
374
+ default: {
375
+ bodyMapper: Mappers.CloudError
376
+ }
377
+ },
378
+ queryParameters: [Parameters.apiVersion, Parameters.maxresults],
379
+ urlParameters: [
380
+ Parameters.$host,
381
+ Parameters.resourceGroupName,
382
+ Parameters.subscriptionId,
383
+ Parameters.accountName1,
384
+ Parameters.nextLink
385
+ ],
386
+ headerParameters: [Parameters.accept],
387
+ serializer
388
+ };
@@ -0,0 +1,235 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { PrivateLinkResourceOperations } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
+ import * as Parameters from "../models/parameters";
14
+ import { BatchManagementClientContext } from "../batchManagementClientContext";
15
+ import {
16
+ PrivateLinkResource,
17
+ PrivateLinkResourceListByBatchAccountNextOptionalParams,
18
+ PrivateLinkResourceListByBatchAccountOptionalParams,
19
+ PrivateLinkResourceListByBatchAccountResponse,
20
+ PrivateLinkResourceGetOptionalParams,
21
+ PrivateLinkResourceGetResponse,
22
+ PrivateLinkResourceListByBatchAccountNextResponse
23
+ } from "../models";
24
+
25
+ /// <reference lib="esnext.asynciterable" />
26
+ /** Class containing PrivateLinkResourceOperations operations. */
27
+ export class PrivateLinkResourceOperationsImpl
28
+ implements PrivateLinkResourceOperations {
29
+ private readonly client: BatchManagementClientContext;
30
+
31
+ /**
32
+ * Initialize a new instance of the class PrivateLinkResourceOperations class.
33
+ * @param client Reference to the service client
34
+ */
35
+ constructor(client: BatchManagementClientContext) {
36
+ this.client = client;
37
+ }
38
+
39
+ /**
40
+ * Lists all of the private link resources in the specified account.
41
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
42
+ * @param accountName The name of the Batch account.
43
+ * @param options The options parameters.
44
+ */
45
+ public listByBatchAccount(
46
+ resourceGroupName: string,
47
+ accountName: string,
48
+ options?: PrivateLinkResourceListByBatchAccountOptionalParams
49
+ ): PagedAsyncIterableIterator<PrivateLinkResource> {
50
+ const iter = this.listByBatchAccountPagingAll(
51
+ resourceGroupName,
52
+ accountName,
53
+ options
54
+ );
55
+ return {
56
+ next() {
57
+ return iter.next();
58
+ },
59
+ [Symbol.asyncIterator]() {
60
+ return this;
61
+ },
62
+ byPage: () => {
63
+ return this.listByBatchAccountPagingPage(
64
+ resourceGroupName,
65
+ accountName,
66
+ options
67
+ );
68
+ }
69
+ };
70
+ }
71
+
72
+ private async *listByBatchAccountPagingPage(
73
+ resourceGroupName: string,
74
+ accountName: string,
75
+ options?: PrivateLinkResourceListByBatchAccountOptionalParams
76
+ ): AsyncIterableIterator<PrivateLinkResource[]> {
77
+ let result = await this._listByBatchAccount(
78
+ resourceGroupName,
79
+ accountName,
80
+ options
81
+ );
82
+ yield result.value || [];
83
+ let continuationToken = result.nextLink;
84
+ while (continuationToken) {
85
+ result = await this._listByBatchAccountNext(
86
+ resourceGroupName,
87
+ accountName,
88
+ continuationToken,
89
+ options
90
+ );
91
+ continuationToken = result.nextLink;
92
+ yield result.value || [];
93
+ }
94
+ }
95
+
96
+ private async *listByBatchAccountPagingAll(
97
+ resourceGroupName: string,
98
+ accountName: string,
99
+ options?: PrivateLinkResourceListByBatchAccountOptionalParams
100
+ ): AsyncIterableIterator<PrivateLinkResource> {
101
+ for await (const page of this.listByBatchAccountPagingPage(
102
+ resourceGroupName,
103
+ accountName,
104
+ options
105
+ )) {
106
+ yield* page;
107
+ }
108
+ }
109
+
110
+ /**
111
+ * Lists all of the private link resources in the specified account.
112
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
113
+ * @param accountName The name of the Batch account.
114
+ * @param options The options parameters.
115
+ */
116
+ private _listByBatchAccount(
117
+ resourceGroupName: string,
118
+ accountName: string,
119
+ options?: PrivateLinkResourceListByBatchAccountOptionalParams
120
+ ): Promise<PrivateLinkResourceListByBatchAccountResponse> {
121
+ return this.client.sendOperationRequest(
122
+ { resourceGroupName, accountName, options },
123
+ listByBatchAccountOperationSpec
124
+ );
125
+ }
126
+
127
+ /**
128
+ * Gets information about the specified private link resource.
129
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
130
+ * @param accountName The name of the Batch account.
131
+ * @param privateLinkResourceName The private link resource name. This must be unique within the
132
+ * account.
133
+ * @param options The options parameters.
134
+ */
135
+ get(
136
+ resourceGroupName: string,
137
+ accountName: string,
138
+ privateLinkResourceName: string,
139
+ options?: PrivateLinkResourceGetOptionalParams
140
+ ): Promise<PrivateLinkResourceGetResponse> {
141
+ return this.client.sendOperationRequest(
142
+ { resourceGroupName, accountName, privateLinkResourceName, options },
143
+ getOperationSpec
144
+ );
145
+ }
146
+
147
+ /**
148
+ * ListByBatchAccountNext
149
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
150
+ * @param accountName The name of the Batch account.
151
+ * @param nextLink The nextLink from the previous successful call to the ListByBatchAccount method.
152
+ * @param options The options parameters.
153
+ */
154
+ private _listByBatchAccountNext(
155
+ resourceGroupName: string,
156
+ accountName: string,
157
+ nextLink: string,
158
+ options?: PrivateLinkResourceListByBatchAccountNextOptionalParams
159
+ ): Promise<PrivateLinkResourceListByBatchAccountNextResponse> {
160
+ return this.client.sendOperationRequest(
161
+ { resourceGroupName, accountName, nextLink, options },
162
+ listByBatchAccountNextOperationSpec
163
+ );
164
+ }
165
+ }
166
+ // Operation Specifications
167
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
168
+
169
+ const listByBatchAccountOperationSpec: coreClient.OperationSpec = {
170
+ path:
171
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateLinkResources",
172
+ httpMethod: "GET",
173
+ responses: {
174
+ 200: {
175
+ bodyMapper: Mappers.ListPrivateLinkResourcesResult
176
+ },
177
+ default: {
178
+ bodyMapper: Mappers.CloudError
179
+ }
180
+ },
181
+ queryParameters: [Parameters.apiVersion, Parameters.maxresults],
182
+ urlParameters: [
183
+ Parameters.$host,
184
+ Parameters.resourceGroupName,
185
+ Parameters.subscriptionId,
186
+ Parameters.accountName1
187
+ ],
188
+ headerParameters: [Parameters.accept],
189
+ serializer
190
+ };
191
+ const getOperationSpec: coreClient.OperationSpec = {
192
+ path:
193
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateLinkResources/{privateLinkResourceName}",
194
+ httpMethod: "GET",
195
+ responses: {
196
+ 200: {
197
+ bodyMapper: Mappers.PrivateLinkResource
198
+ },
199
+ default: {
200
+ bodyMapper: Mappers.CloudError
201
+ }
202
+ },
203
+ queryParameters: [Parameters.apiVersion],
204
+ urlParameters: [
205
+ Parameters.$host,
206
+ Parameters.resourceGroupName,
207
+ Parameters.subscriptionId,
208
+ Parameters.accountName1,
209
+ Parameters.privateLinkResourceName
210
+ ],
211
+ headerParameters: [Parameters.accept],
212
+ serializer
213
+ };
214
+ const listByBatchAccountNextOperationSpec: coreClient.OperationSpec = {
215
+ path: "{nextLink}",
216
+ httpMethod: "GET",
217
+ responses: {
218
+ 200: {
219
+ bodyMapper: Mappers.ListPrivateLinkResourcesResult
220
+ },
221
+ default: {
222
+ bodyMapper: Mappers.CloudError
223
+ }
224
+ },
225
+ queryParameters: [Parameters.apiVersion, Parameters.maxresults],
226
+ urlParameters: [
227
+ Parameters.$host,
228
+ Parameters.resourceGroupName,
229
+ Parameters.subscriptionId,
230
+ Parameters.accountName1,
231
+ Parameters.nextLink
232
+ ],
233
+ headerParameters: [Parameters.accept],
234
+ serializer
235
+ };
@@ -0,0 +1,90 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import {
11
+ Application,
12
+ ApplicationListOptionalParams,
13
+ ApplicationCreateOptionalParams,
14
+ ApplicationCreateResponse,
15
+ ApplicationDeleteOptionalParams,
16
+ ApplicationGetOptionalParams,
17
+ ApplicationGetResponse,
18
+ ApplicationUpdateOptionalParams,
19
+ ApplicationUpdateResponse
20
+ } from "../models";
21
+
22
+ /// <reference lib="esnext.asynciterable" />
23
+ /** Interface representing a ApplicationOperations. */
24
+ export interface ApplicationOperations {
25
+ /**
26
+ * Lists all of the applications in the specified account.
27
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
28
+ * @param accountName The name of the Batch account.
29
+ * @param options The options parameters.
30
+ */
31
+ list(
32
+ resourceGroupName: string,
33
+ accountName: string,
34
+ options?: ApplicationListOptionalParams
35
+ ): PagedAsyncIterableIterator<Application>;
36
+ /**
37
+ * Adds an application to the specified Batch account.
38
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
39
+ * @param accountName The name of the Batch account.
40
+ * @param applicationName The name of the application. This must be unique within the account.
41
+ * @param options The options parameters.
42
+ */
43
+ create(
44
+ resourceGroupName: string,
45
+ accountName: string,
46
+ applicationName: string,
47
+ options?: ApplicationCreateOptionalParams
48
+ ): Promise<ApplicationCreateResponse>;
49
+ /**
50
+ * Deletes an application.
51
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
52
+ * @param accountName The name of the Batch account.
53
+ * @param applicationName The name of the application. This must be unique within the account.
54
+ * @param options The options parameters.
55
+ */
56
+ delete(
57
+ resourceGroupName: string,
58
+ accountName: string,
59
+ applicationName: string,
60
+ options?: ApplicationDeleteOptionalParams
61
+ ): Promise<void>;
62
+ /**
63
+ * Gets information about the specified application.
64
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
65
+ * @param accountName The name of the Batch account.
66
+ * @param applicationName The name of the application. This must be unique within the account.
67
+ * @param options The options parameters.
68
+ */
69
+ get(
70
+ resourceGroupName: string,
71
+ accountName: string,
72
+ applicationName: string,
73
+ options?: ApplicationGetOptionalParams
74
+ ): Promise<ApplicationGetResponse>;
75
+ /**
76
+ * Updates settings for the specified application.
77
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
78
+ * @param accountName The name of the Batch account.
79
+ * @param applicationName The name of the application. This must be unique within the account.
80
+ * @param parameters The parameters for the request.
81
+ * @param options The options parameters.
82
+ */
83
+ update(
84
+ resourceGroupName: string,
85
+ accountName: string,
86
+ applicationName: string,
87
+ parameters: Application,
88
+ options?: ApplicationUpdateOptionalParams
89
+ ): Promise<ApplicationUpdateResponse>;
90
+ }