@azure/arm-avs 1.0.0 → 3.0.0

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 (301) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +72 -73
  4. package/dist/index.js +11681 -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/azureVMwareSolutionAPI.d.ts +33 -0
  9. package/dist-esm/src/azureVMwareSolutionAPI.d.ts.map +1 -0
  10. package/dist-esm/src/azureVMwareSolutionAPI.js +66 -0
  11. package/dist-esm/src/azureVMwareSolutionAPI.js.map +1 -0
  12. package/dist-esm/src/index.d.ts +5 -0
  13. package/dist-esm/src/index.d.ts.map +1 -0
  14. package/dist-esm/src/index.js +12 -0
  15. package/dist-esm/src/index.js.map +1 -0
  16. package/dist-esm/src/lroImpl.d.ts +16 -0
  17. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  18. package/dist-esm/src/lroImpl.js +29 -0
  19. package/dist-esm/src/lroImpl.js.map +1 -0
  20. package/dist-esm/src/models/index.d.ts +2962 -0
  21. package/dist-esm/src/models/index.d.ts.map +1 -0
  22. package/dist-esm/src/models/index.js +363 -0
  23. package/dist-esm/src/models/index.js.map +1 -0
  24. package/dist-esm/src/models/mappers.d.ts +115 -0
  25. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  26. package/dist-esm/src/models/mappers.js +3114 -0
  27. package/dist-esm/src/models/mappers.js.map +1 -0
  28. package/dist-esm/src/models/parameters.d.ts +53 -0
  29. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  30. package/dist-esm/src/models/parameters.js +409 -0
  31. package/dist-esm/src/models/parameters.js.map +1 -0
  32. package/dist-esm/src/operations/addons.d.ts +81 -0
  33. package/dist-esm/src/operations/addons.d.ts.map +1 -0
  34. package/dist-esm/src/operations/addons.js +331 -0
  35. package/dist-esm/src/operations/addons.js.map +1 -0
  36. package/dist-esm/src/operations/authorizations.d.ts +81 -0
  37. package/dist-esm/src/operations/authorizations.d.ts.map +1 -0
  38. package/dist-esm/src/operations/authorizations.js +337 -0
  39. package/dist-esm/src/operations/authorizations.js.map +1 -0
  40. package/dist-esm/src/operations/cloudLinks.d.ts +81 -0
  41. package/dist-esm/src/operations/cloudLinks.d.ts.map +1 -0
  42. package/dist-esm/src/operations/cloudLinks.js +337 -0
  43. package/dist-esm/src/operations/cloudLinks.js.map +1 -0
  44. package/dist-esm/src/operations/clusters.d.ts +99 -0
  45. package/dist-esm/src/operations/clusters.d.ts.map +1 -0
  46. package/dist-esm/src/operations/clusters.js +423 -0
  47. package/dist-esm/src/operations/clusters.js.map +1 -0
  48. package/dist-esm/src/operations/datastores.d.ts +89 -0
  49. package/dist-esm/src/operations/datastores.d.ts.map +1 -0
  50. package/dist-esm/src/operations/datastores.js +363 -0
  51. package/dist-esm/src/operations/datastores.js.map +1 -0
  52. package/dist-esm/src/operations/globalReachConnections.d.ts +81 -0
  53. package/dist-esm/src/operations/globalReachConnections.d.ts.map +1 -0
  54. package/dist-esm/src/operations/globalReachConnections.js +347 -0
  55. package/dist-esm/src/operations/globalReachConnections.js.map +1 -0
  56. package/dist-esm/src/operations/hcxEnterpriseSites.d.ts +63 -0
  57. package/dist-esm/src/operations/hcxEnterpriseSites.d.ts.map +1 -0
  58. package/dist-esm/src/operations/hcxEnterpriseSites.js +244 -0
  59. package/dist-esm/src/operations/hcxEnterpriseSites.js.map +1 -0
  60. package/dist-esm/src/operations/index.d.ts +17 -0
  61. package/dist-esm/src/operations/index.d.ts.map +1 -0
  62. package/dist-esm/src/operations/index.js +24 -0
  63. package/dist-esm/src/operations/index.js.map +1 -0
  64. package/dist-esm/src/operations/locations.d.ts +25 -0
  65. package/dist-esm/src/operations/locations.d.ts.map +1 -0
  66. package/dist-esm/src/operations/locations.js +79 -0
  67. package/dist-esm/src/operations/locations.js.map +1 -0
  68. package/dist-esm/src/operations/operations.d.ts +32 -0
  69. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  70. package/dist-esm/src/operations/operations.js +120 -0
  71. package/dist-esm/src/operations/operations.js.map +1 -0
  72. package/dist-esm/src/operations/placementPolicies.d.ts +116 -0
  73. package/dist-esm/src/operations/placementPolicies.d.ts.map +1 -0
  74. package/dist-esm/src/operations/placementPolicies.js +466 -0
  75. package/dist-esm/src/operations/placementPolicies.js.map +1 -0
  76. package/dist-esm/src/operations/privateClouds.d.ts +142 -0
  77. package/dist-esm/src/operations/privateClouds.d.ts.map +1 -0
  78. package/dist-esm/src/operations/privateClouds.js +672 -0
  79. package/dist-esm/src/operations/privateClouds.js.map +1 -0
  80. package/dist-esm/src/operations/scriptCmdlets.d.ts +53 -0
  81. package/dist-esm/src/operations/scriptCmdlets.d.ts.map +1 -0
  82. package/dist-esm/src/operations/scriptCmdlets.js +191 -0
  83. package/dist-esm/src/operations/scriptCmdlets.js.map +1 -0
  84. package/dist-esm/src/operations/scriptExecutions.d.ts +89 -0
  85. package/dist-esm/src/operations/scriptExecutions.d.ts.map +1 -0
  86. package/dist-esm/src/operations/scriptExecutions.js +371 -0
  87. package/dist-esm/src/operations/scriptExecutions.js.map +1 -0
  88. package/dist-esm/src/operations/scriptPackages.d.ts +46 -0
  89. package/dist-esm/src/operations/scriptPackages.d.ts.map +1 -0
  90. package/dist-esm/src/operations/scriptPackages.js +169 -0
  91. package/dist-esm/src/operations/scriptPackages.js.map +1 -0
  92. package/dist-esm/src/operations/virtualMachines.d.ts +71 -0
  93. package/dist-esm/src/operations/virtualMachines.d.ts.map +1 -0
  94. package/dist-esm/src/operations/virtualMachines.js +272 -0
  95. package/dist-esm/src/operations/virtualMachines.js.map +1 -0
  96. package/dist-esm/src/operations/workloadNetworks.d.ts +661 -0
  97. package/dist-esm/src/operations/workloadNetworks.d.ts.map +1 -0
  98. package/dist-esm/src/operations/workloadNetworks.js +3049 -0
  99. package/dist-esm/src/operations/workloadNetworks.js.map +1 -0
  100. package/dist-esm/src/operationsInterfaces/addons.d.ts +56 -0
  101. package/dist-esm/src/operationsInterfaces/addons.d.ts.map +1 -0
  102. package/dist-esm/src/operationsInterfaces/addons.js +9 -0
  103. package/dist-esm/src/operationsInterfaces/addons.js.map +1 -0
  104. package/dist-esm/src/operationsInterfaces/authorizations.d.ts +56 -0
  105. package/dist-esm/src/operationsInterfaces/authorizations.d.ts.map +1 -0
  106. package/dist-esm/src/operationsInterfaces/authorizations.js +9 -0
  107. package/dist-esm/src/operationsInterfaces/authorizations.js.map +1 -0
  108. package/dist-esm/src/operationsInterfaces/cloudLinks.d.ts +56 -0
  109. package/dist-esm/src/operationsInterfaces/cloudLinks.d.ts.map +1 -0
  110. package/dist-esm/src/operationsInterfaces/cloudLinks.js +9 -0
  111. package/dist-esm/src/operationsInterfaces/cloudLinks.js.map +1 -0
  112. package/dist-esm/src/operationsInterfaces/clusters.d.ts +74 -0
  113. package/dist-esm/src/operationsInterfaces/clusters.d.ts.map +1 -0
  114. package/dist-esm/src/operationsInterfaces/clusters.js +9 -0
  115. package/dist-esm/src/operationsInterfaces/clusters.js.map +1 -0
  116. package/dist-esm/src/operationsInterfaces/datastores.d.ts +62 -0
  117. package/dist-esm/src/operationsInterfaces/datastores.d.ts.map +1 -0
  118. package/dist-esm/src/operationsInterfaces/datastores.js +9 -0
  119. package/dist-esm/src/operationsInterfaces/datastores.js.map +1 -0
  120. package/dist-esm/src/operationsInterfaces/globalReachConnections.d.ts +56 -0
  121. package/dist-esm/src/operationsInterfaces/globalReachConnections.d.ts.map +1 -0
  122. package/dist-esm/src/operationsInterfaces/globalReachConnections.js +9 -0
  123. package/dist-esm/src/operationsInterfaces/globalReachConnections.js.map +1 -0
  124. package/dist-esm/src/operationsInterfaces/hcxEnterpriseSites.d.ts +38 -0
  125. package/dist-esm/src/operationsInterfaces/hcxEnterpriseSites.d.ts.map +1 -0
  126. package/dist-esm/src/operationsInterfaces/hcxEnterpriseSites.js +9 -0
  127. package/dist-esm/src/operationsInterfaces/hcxEnterpriseSites.js.map +1 -0
  128. package/dist-esm/src/operationsInterfaces/index.d.ts +17 -0
  129. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  130. package/dist-esm/src/operationsInterfaces/index.js +24 -0
  131. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  132. package/dist-esm/src/operationsInterfaces/locations.d.ts +17 -0
  133. package/dist-esm/src/operationsInterfaces/locations.d.ts.map +1 -0
  134. package/dist-esm/src/operationsInterfaces/locations.js +9 -0
  135. package/dist-esm/src/operationsInterfaces/locations.js.map +1 -0
  136. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  137. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  138. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  139. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  140. package/dist-esm/src/operationsInterfaces/placementPolicies.d.ts +89 -0
  141. package/dist-esm/src/operationsInterfaces/placementPolicies.d.ts.map +1 -0
  142. package/dist-esm/src/operationsInterfaces/placementPolicies.js +9 -0
  143. package/dist-esm/src/operationsInterfaces/placementPolicies.js.map +1 -0
  144. package/dist-esm/src/operationsInterfaces/privateClouds.d.ts +106 -0
  145. package/dist-esm/src/operationsInterfaces/privateClouds.d.ts.map +1 -0
  146. package/dist-esm/src/operationsInterfaces/privateClouds.js +9 -0
  147. package/dist-esm/src/operationsInterfaces/privateClouds.js.map +1 -0
  148. package/dist-esm/src/operationsInterfaces/scriptCmdlets.d.ts +25 -0
  149. package/dist-esm/src/operationsInterfaces/scriptCmdlets.d.ts.map +1 -0
  150. package/dist-esm/src/operationsInterfaces/scriptCmdlets.js +9 -0
  151. package/dist-esm/src/operationsInterfaces/scriptCmdlets.js.map +1 -0
  152. package/dist-esm/src/operationsInterfaces/scriptExecutions.d.ts +64 -0
  153. package/dist-esm/src/operationsInterfaces/scriptExecutions.d.ts.map +1 -0
  154. package/dist-esm/src/operationsInterfaces/scriptExecutions.js +9 -0
  155. package/dist-esm/src/operationsInterfaces/scriptExecutions.js.map +1 -0
  156. package/dist-esm/src/operationsInterfaces/scriptPackages.d.ts +21 -0
  157. package/dist-esm/src/operationsInterfaces/scriptPackages.d.ts.map +1 -0
  158. package/dist-esm/src/operationsInterfaces/scriptPackages.js +9 -0
  159. package/dist-esm/src/operationsInterfaces/scriptPackages.js.map +1 -0
  160. package/dist-esm/src/operationsInterfaces/virtualMachines.d.ts +44 -0
  161. package/dist-esm/src/operationsInterfaces/virtualMachines.d.ts.map +1 -0
  162. package/dist-esm/src/operationsInterfaces/virtualMachines.js +9 -0
  163. package/dist-esm/src/operationsInterfaces/virtualMachines.js.map +1 -0
  164. package/dist-esm/src/operationsInterfaces/workloadNetworks.d.ts +500 -0
  165. package/dist-esm/src/operationsInterfaces/workloadNetworks.d.ts.map +1 -0
  166. package/dist-esm/src/operationsInterfaces/workloadNetworks.js +9 -0
  167. package/dist-esm/src/operationsInterfaces/workloadNetworks.js.map +1 -0
  168. package/dist-esm/test/sampleTest.d.ts +2 -0
  169. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  170. package/dist-esm/test/sampleTest.js +40 -0
  171. package/dist-esm/test/sampleTest.js.map +1 -0
  172. package/package.json +65 -31
  173. package/review/arm-avs.api.md +2534 -0
  174. package/rollup.config.js +181 -30
  175. package/src/azureVMwareSolutionAPI.ts +139 -0
  176. package/src/index.ts +12 -0
  177. package/src/lroImpl.ts +34 -0
  178. package/src/models/index.ts +3101 -931
  179. package/src/models/mappers.ts +2874 -387
  180. package/src/models/parameters.ts +407 -44
  181. package/src/operations/addons.ts +472 -0
  182. package/src/operations/authorizations.ts +341 -196
  183. package/src/operations/cloudLinks.ts +478 -0
  184. package/src/operations/clusters.ts +444 -238
  185. package/src/operations/datastores.ts +525 -0
  186. package/src/operations/globalReachConnections.ts +488 -0
  187. package/src/operations/hcxEnterpriseSites.ts +200 -210
  188. package/src/operations/index.ts +13 -5
  189. package/src/operations/locations.ts +56 -83
  190. package/src/operations/operations.ts +87 -73
  191. package/src/operations/placementPolicies.ts +677 -0
  192. package/src/operations/privateClouds.ts +705 -319
  193. package/src/operations/scriptCmdlets.ts +266 -0
  194. package/src/operations/scriptExecutions.ts +524 -0
  195. package/src/operations/scriptPackages.ts +229 -0
  196. package/src/operations/virtualMachines.ts +390 -0
  197. package/src/operations/workloadNetworks.ts +4398 -0
  198. package/src/operationsInterfaces/addons.ts +109 -0
  199. package/src/operationsInterfaces/authorizations.ts +109 -0
  200. package/src/operationsInterfaces/cloudLinks.ts +109 -0
  201. package/src/operationsInterfaces/clusters.ts +147 -0
  202. package/src/operationsInterfaces/datastores.ts +121 -0
  203. package/src/operationsInterfaces/globalReachConnections.ts +109 -0
  204. package/src/operationsInterfaces/hcxEnterpriseSites.ts +75 -0
  205. package/src/operationsInterfaces/index.ts +24 -0
  206. package/src/operationsInterfaces/locations.ts +36 -0
  207. package/src/operationsInterfaces/operations.ts +22 -0
  208. package/src/operationsInterfaces/placementPolicies.ts +170 -0
  209. package/src/operationsInterfaces/privateClouds.ts +198 -0
  210. package/src/operationsInterfaces/scriptCmdlets.ts +50 -0
  211. package/src/operationsInterfaces/scriptExecutions.ts +124 -0
  212. package/src/operationsInterfaces/scriptPackages.ts +44 -0
  213. package/src/operationsInterfaces/virtualMachines.ts +85 -0
  214. package/src/operationsInterfaces/workloadNetworks.ts +951 -0
  215. package/tsconfig.json +3 -3
  216. package/types/arm-avs.d.ts +4645 -0
  217. package/types/tsdoc-metadata.json +11 -0
  218. package/dist/arm-avs.js +0 -2585
  219. package/dist/arm-avs.js.map +0 -1
  220. package/dist/arm-avs.min.js +0 -1
  221. package/dist/arm-avs.min.js.map +0 -1
  222. package/esm/avsClient.d.ts +0 -23
  223. package/esm/avsClient.d.ts.map +0 -1
  224. package/esm/avsClient.js +0 -38
  225. package/esm/avsClient.js.map +0 -1
  226. package/esm/avsClientContext.d.ts +0 -16
  227. package/esm/avsClientContext.d.ts.map +0 -1
  228. package/esm/avsClientContext.js +0 -56
  229. package/esm/avsClientContext.js.map +0 -1
  230. package/esm/models/authorizationsMappers.d.ts +0 -2
  231. package/esm/models/authorizationsMappers.d.ts.map +0 -1
  232. package/esm/models/authorizationsMappers.js +0 -9
  233. package/esm/models/authorizationsMappers.js.map +0 -1
  234. package/esm/models/clustersMappers.d.ts +0 -2
  235. package/esm/models/clustersMappers.d.ts.map +0 -1
  236. package/esm/models/clustersMappers.js +0 -9
  237. package/esm/models/clustersMappers.js.map +0 -1
  238. package/esm/models/hcxEnterpriseSitesMappers.d.ts +0 -2
  239. package/esm/models/hcxEnterpriseSitesMappers.d.ts.map +0 -1
  240. package/esm/models/hcxEnterpriseSitesMappers.js +0 -9
  241. package/esm/models/hcxEnterpriseSitesMappers.js.map +0 -1
  242. package/esm/models/index.d.ts +0 -1163
  243. package/esm/models/index.d.ts.map +0 -1
  244. package/esm/models/index.js +0 -8
  245. package/esm/models/index.js.map +0 -1
  246. package/esm/models/locationsMappers.d.ts +0 -2
  247. package/esm/models/locationsMappers.d.ts.map +0 -1
  248. package/esm/models/locationsMappers.js +0 -9
  249. package/esm/models/locationsMappers.js.map +0 -1
  250. package/esm/models/mappers.d.ts +0 -30
  251. package/esm/models/mappers.d.ts.map +0 -1
  252. package/esm/models/mappers.js +0 -881
  253. package/esm/models/mappers.js.map +0 -1
  254. package/esm/models/operationsMappers.d.ts +0 -2
  255. package/esm/models/operationsMappers.d.ts.map +0 -1
  256. package/esm/models/operationsMappers.js +0 -9
  257. package/esm/models/operationsMappers.js.map +0 -1
  258. package/esm/models/parameters.d.ts +0 -12
  259. package/esm/models/parameters.d.ts.map +0 -1
  260. package/esm/models/parameters.js +0 -122
  261. package/esm/models/parameters.js.map +0 -1
  262. package/esm/models/privateCloudsMappers.d.ts +0 -2
  263. package/esm/models/privateCloudsMappers.d.ts.map +0 -1
  264. package/esm/models/privateCloudsMappers.js +0 -9
  265. package/esm/models/privateCloudsMappers.js.map +0 -1
  266. package/esm/operations/authorizations.d.ts +0 -115
  267. package/esm/operations/authorizations.d.ts.map +0 -1
  268. package/esm/operations/authorizations.js +0 -239
  269. package/esm/operations/authorizations.js.map +0 -1
  270. package/esm/operations/clusters.d.ts +0 -133
  271. package/esm/operations/clusters.d.ts.map +0 -1
  272. package/esm/operations/clusters.js +0 -299
  273. package/esm/operations/clusters.js.map +0 -1
  274. package/esm/operations/hcxEnterpriseSites.d.ts +0 -127
  275. package/esm/operations/hcxEnterpriseSites.d.ts.map +0 -1
  276. package/esm/operations/hcxEnterpriseSites.js +0 -196
  277. package/esm/operations/hcxEnterpriseSites.js.map +0 -1
  278. package/esm/operations/index.d.ts +0 -7
  279. package/esm/operations/index.d.ts.map +0 -1
  280. package/esm/operations/index.js +0 -16
  281. package/esm/operations/index.js.map +0 -1
  282. package/esm/operations/locations.d.ts +0 -49
  283. package/esm/operations/locations.d.ts.map +0 -1
  284. package/esm/operations/locations.js +0 -85
  285. package/esm/operations/locations.js.map +0 -1
  286. package/esm/operations/operations.d.ts +0 -46
  287. package/esm/operations/operations.d.ts.map +0 -1
  288. package/esm/operations/operations.js +0 -77
  289. package/esm/operations/operations.js.map +0 -1
  290. package/esm/operations/privateClouds.d.ts +0 -177
  291. package/esm/operations/privateClouds.d.ts.map +0 -1
  292. package/esm/operations/privateClouds.js +0 -365
  293. package/esm/operations/privateClouds.js.map +0 -1
  294. package/src/avsClient.ts +0 -52
  295. package/src/avsClientContext.ts +0 -62
  296. package/src/models/authorizationsMappers.ts +0 -27
  297. package/src/models/clustersMappers.ts +0 -28
  298. package/src/models/hcxEnterpriseSitesMappers.ts +0 -27
  299. package/src/models/locationsMappers.ts +0 -15
  300. package/src/models/operationsMappers.ts +0 -16
  301. package/src/models/privateCloudsMappers.ts +0 -29
@@ -1,316 +1,669 @@
1
1
  /*
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for
4
- * license information.
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
5
4
  *
6
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is
8
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
9
7
  */
10
8
 
11
- import * as msRest from "@azure/ms-rest-js";
12
- import * as msRestAzure from "@azure/ms-rest-azure-js";
13
- import * as Models from "../models";
14
- import * as Mappers from "../models/privateCloudsMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { PrivateClouds } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
15
13
  import * as Parameters from "../models/parameters";
16
- import { AvsClientContext } from "../avsClientContext";
14
+ import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ PrivateCloud,
19
+ PrivateCloudsListNextOptionalParams,
20
+ PrivateCloudsListOptionalParams,
21
+ PrivateCloudsListInSubscriptionNextOptionalParams,
22
+ PrivateCloudsListInSubscriptionOptionalParams,
23
+ PrivateCloudsListResponse,
24
+ PrivateCloudsListInSubscriptionResponse,
25
+ PrivateCloudsGetOptionalParams,
26
+ PrivateCloudsGetResponse,
27
+ PrivateCloudsCreateOrUpdateOptionalParams,
28
+ PrivateCloudsCreateOrUpdateResponse,
29
+ PrivateCloudUpdate,
30
+ PrivateCloudsUpdateOptionalParams,
31
+ PrivateCloudsUpdateResponse,
32
+ PrivateCloudsDeleteOptionalParams,
33
+ PrivateCloudsRotateVcenterPasswordOptionalParams,
34
+ PrivateCloudsRotateNsxtPasswordOptionalParams,
35
+ PrivateCloudsListAdminCredentialsOptionalParams,
36
+ PrivateCloudsListAdminCredentialsResponse,
37
+ PrivateCloudsListNextResponse,
38
+ PrivateCloudsListInSubscriptionNextResponse
39
+ } from "../models";
17
40
 
18
- /** Class representing a PrivateClouds. */
19
- export class PrivateClouds {
20
- private readonly client: AvsClientContext;
41
+ /// <reference lib="esnext.asynciterable" />
42
+ /** Class containing PrivateClouds operations. */
43
+ export class PrivateCloudsImpl implements PrivateClouds {
44
+ private readonly client: AzureVMwareSolutionAPI;
21
45
 
22
46
  /**
23
- * Create a PrivateClouds.
24
- * @param {AvsClientContext} client Reference to the service client.
47
+ * Initialize a new instance of the class PrivateClouds class.
48
+ * @param client Reference to the service client
25
49
  */
26
- constructor(client: AvsClientContext) {
50
+ constructor(client: AzureVMwareSolutionAPI) {
27
51
  this.client = client;
28
52
  }
29
53
 
30
54
  /**
31
- * @summary List private clouds in a resource group
55
+ * List private clouds in a resource group
32
56
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
33
- * @param [options] The optional parameters
34
- * @returns Promise<Models.PrivateCloudsListResponse>
57
+ * @param options The options parameters.
35
58
  */
36
- list(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateCloudsListResponse>;
37
- /**
38
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
39
- * @param callback The callback
40
- */
41
- list(resourceGroupName: string, callback: msRest.ServiceCallback<Models.PrivateCloudList>): void;
42
- /**
43
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
44
- * @param options The optional parameters
45
- * @param callback The callback
46
- */
47
- list(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateCloudList>): void;
48
- list(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateCloudList>, callback?: msRest.ServiceCallback<Models.PrivateCloudList>): Promise<Models.PrivateCloudsListResponse> {
49
- return this.client.sendOperationRequest(
50
- {
59
+ public list(
60
+ resourceGroupName: string,
61
+ options?: PrivateCloudsListOptionalParams
62
+ ): PagedAsyncIterableIterator<PrivateCloud> {
63
+ const iter = this.listPagingAll(resourceGroupName, options);
64
+ return {
65
+ next() {
66
+ return iter.next();
67
+ },
68
+ [Symbol.asyncIterator]() {
69
+ return this;
70
+ },
71
+ byPage: () => {
72
+ return this.listPagingPage(resourceGroupName, options);
73
+ }
74
+ };
75
+ }
76
+
77
+ private async *listPagingPage(
78
+ resourceGroupName: string,
79
+ options?: PrivateCloudsListOptionalParams
80
+ ): AsyncIterableIterator<PrivateCloud[]> {
81
+ let result = await this._list(resourceGroupName, options);
82
+ yield result.value || [];
83
+ let continuationToken = result.nextLink;
84
+ while (continuationToken) {
85
+ result = await this._listNext(
51
86
  resourceGroupName,
87
+ continuationToken,
52
88
  options
53
- },
54
- listOperationSpec,
55
- callback) as Promise<Models.PrivateCloudsListResponse>;
89
+ );
90
+ continuationToken = result.nextLink;
91
+ yield result.value || [];
92
+ }
93
+ }
94
+
95
+ private async *listPagingAll(
96
+ resourceGroupName: string,
97
+ options?: PrivateCloudsListOptionalParams
98
+ ): AsyncIterableIterator<PrivateCloud> {
99
+ for await (const page of this.listPagingPage(resourceGroupName, options)) {
100
+ yield* page;
101
+ }
56
102
  }
57
103
 
58
104
  /**
59
- * @summary List private clouds in a subscription
60
- * @param [options] The optional parameters
61
- * @returns Promise<Models.PrivateCloudsListInSubscriptionResponse>
105
+ * List private clouds in a subscription
106
+ * @param options The options parameters.
62
107
  */
63
- listInSubscription(options?: msRest.RequestOptionsBase): Promise<Models.PrivateCloudsListInSubscriptionResponse>;
108
+ public listInSubscription(
109
+ options?: PrivateCloudsListInSubscriptionOptionalParams
110
+ ): PagedAsyncIterableIterator<PrivateCloud> {
111
+ const iter = this.listInSubscriptionPagingAll(options);
112
+ return {
113
+ next() {
114
+ return iter.next();
115
+ },
116
+ [Symbol.asyncIterator]() {
117
+ return this;
118
+ },
119
+ byPage: () => {
120
+ return this.listInSubscriptionPagingPage(options);
121
+ }
122
+ };
123
+ }
124
+
125
+ private async *listInSubscriptionPagingPage(
126
+ options?: PrivateCloudsListInSubscriptionOptionalParams
127
+ ): AsyncIterableIterator<PrivateCloud[]> {
128
+ let result = await this._listInSubscription(options);
129
+ yield result.value || [];
130
+ let continuationToken = result.nextLink;
131
+ while (continuationToken) {
132
+ result = await this._listInSubscriptionNext(continuationToken, options);
133
+ continuationToken = result.nextLink;
134
+ yield result.value || [];
135
+ }
136
+ }
137
+
138
+ private async *listInSubscriptionPagingAll(
139
+ options?: PrivateCloudsListInSubscriptionOptionalParams
140
+ ): AsyncIterableIterator<PrivateCloud> {
141
+ for await (const page of this.listInSubscriptionPagingPage(options)) {
142
+ yield* page;
143
+ }
144
+ }
145
+
64
146
  /**
65
- * @param callback The callback
147
+ * List private clouds in a resource group
148
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
149
+ * @param options The options parameters.
66
150
  */
67
- listInSubscription(callback: msRest.ServiceCallback<Models.PrivateCloudList>): void;
151
+ private _list(
152
+ resourceGroupName: string,
153
+ options?: PrivateCloudsListOptionalParams
154
+ ): Promise<PrivateCloudsListResponse> {
155
+ return this.client.sendOperationRequest(
156
+ { resourceGroupName, options },
157
+ listOperationSpec
158
+ );
159
+ }
160
+
68
161
  /**
69
- * @param options The optional parameters
70
- * @param callback The callback
162
+ * List private clouds in a subscription
163
+ * @param options The options parameters.
71
164
  */
72
- listInSubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateCloudList>): void;
73
- listInSubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateCloudList>, callback?: msRest.ServiceCallback<Models.PrivateCloudList>): Promise<Models.PrivateCloudsListInSubscriptionResponse> {
165
+ private _listInSubscription(
166
+ options?: PrivateCloudsListInSubscriptionOptionalParams
167
+ ): Promise<PrivateCloudsListInSubscriptionResponse> {
74
168
  return this.client.sendOperationRequest(
75
- {
76
- options
77
- },
78
- listInSubscriptionOperationSpec,
79
- callback) as Promise<Models.PrivateCloudsListInSubscriptionResponse>;
169
+ { options },
170
+ listInSubscriptionOperationSpec
171
+ );
80
172
  }
81
173
 
82
174
  /**
83
- * @summary Get a private cloud
175
+ * Get a private cloud
84
176
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
85
177
  * @param privateCloudName Name of the private cloud
86
- * @param [options] The optional parameters
87
- * @returns Promise<Models.PrivateCloudsGetResponse>
178
+ * @param options The options parameters.
88
179
  */
89
- get(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateCloudsGetResponse>;
180
+ get(
181
+ resourceGroupName: string,
182
+ privateCloudName: string,
183
+ options?: PrivateCloudsGetOptionalParams
184
+ ): Promise<PrivateCloudsGetResponse> {
185
+ return this.client.sendOperationRequest(
186
+ { resourceGroupName, privateCloudName, options },
187
+ getOperationSpec
188
+ );
189
+ }
190
+
90
191
  /**
192
+ * Create or update a private cloud
91
193
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
92
194
  * @param privateCloudName Name of the private cloud
93
- * @param callback The callback
195
+ * @param privateCloud The private cloud
196
+ * @param options The options parameters.
94
197
  */
95
- get(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback<Models.PrivateCloud>): void;
198
+ async beginCreateOrUpdate(
199
+ resourceGroupName: string,
200
+ privateCloudName: string,
201
+ privateCloud: PrivateCloud,
202
+ options?: PrivateCloudsCreateOrUpdateOptionalParams
203
+ ): Promise<
204
+ PollerLike<
205
+ PollOperationState<PrivateCloudsCreateOrUpdateResponse>,
206
+ PrivateCloudsCreateOrUpdateResponse
207
+ >
208
+ > {
209
+ const directSendOperation = async (
210
+ args: coreClient.OperationArguments,
211
+ spec: coreClient.OperationSpec
212
+ ): Promise<PrivateCloudsCreateOrUpdateResponse> => {
213
+ return this.client.sendOperationRequest(args, spec);
214
+ };
215
+ const sendOperation = async (
216
+ args: coreClient.OperationArguments,
217
+ spec: coreClient.OperationSpec
218
+ ) => {
219
+ let currentRawResponse:
220
+ | coreClient.FullOperationResponse
221
+ | undefined = undefined;
222
+ const providedCallback = args.options?.onResponse;
223
+ const callback: coreClient.RawResponseCallback = (
224
+ rawResponse: coreClient.FullOperationResponse,
225
+ flatResponse: unknown
226
+ ) => {
227
+ currentRawResponse = rawResponse;
228
+ providedCallback?.(rawResponse, flatResponse);
229
+ };
230
+ const updatedArgs = {
231
+ ...args,
232
+ options: {
233
+ ...args.options,
234
+ onResponse: callback
235
+ }
236
+ };
237
+ const flatResponse = await directSendOperation(updatedArgs, spec);
238
+ return {
239
+ flatResponse,
240
+ rawResponse: {
241
+ statusCode: currentRawResponse!.status,
242
+ body: currentRawResponse!.parsedBody,
243
+ headers: currentRawResponse!.headers.toJSON()
244
+ }
245
+ };
246
+ };
247
+
248
+ const lro = new LroImpl(
249
+ sendOperation,
250
+ { resourceGroupName, privateCloudName, privateCloud, options },
251
+ createOrUpdateOperationSpec
252
+ );
253
+ return new LroEngine(lro, {
254
+ resumeFrom: options?.resumeFrom,
255
+ intervalInMs: options?.updateIntervalInMs
256
+ });
257
+ }
258
+
96
259
  /**
260
+ * Create or update a private cloud
97
261
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
98
262
  * @param privateCloudName Name of the private cloud
99
- * @param options The optional parameters
100
- * @param callback The callback
263
+ * @param privateCloud The private cloud
264
+ * @param options The options parameters.
101
265
  */
102
- get(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateCloud>): void;
103
- get(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateCloud>, callback?: msRest.ServiceCallback<Models.PrivateCloud>): Promise<Models.PrivateCloudsGetResponse> {
104
- return this.client.sendOperationRequest(
105
- {
106
- resourceGroupName,
107
- privateCloudName,
108
- options
109
- },
110
- getOperationSpec,
111
- callback) as Promise<Models.PrivateCloudsGetResponse>;
266
+ async beginCreateOrUpdateAndWait(
267
+ resourceGroupName: string,
268
+ privateCloudName: string,
269
+ privateCloud: PrivateCloud,
270
+ options?: PrivateCloudsCreateOrUpdateOptionalParams
271
+ ): Promise<PrivateCloudsCreateOrUpdateResponse> {
272
+ const poller = await this.beginCreateOrUpdate(
273
+ resourceGroupName,
274
+ privateCloudName,
275
+ privateCloud,
276
+ options
277
+ );
278
+ return poller.pollUntilDone();
112
279
  }
113
280
 
114
281
  /**
115
- * @summary Create or update a private cloud
282
+ * Update a private cloud
116
283
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
117
284
  * @param privateCloudName Name of the private cloud
118
- * @param privateCloud The private cloud
119
- * @param [options] The optional parameters
120
- * @returns Promise<Models.PrivateCloudsCreateOrUpdateResponse>
285
+ * @param privateCloudUpdate The private cloud properties to be updated
286
+ * @param options The options parameters.
121
287
  */
122
- createOrUpdate(resourceGroupName: string, privateCloudName: string, privateCloud: Models.PrivateCloud, options?: msRest.RequestOptionsBase): Promise<Models.PrivateCloudsCreateOrUpdateResponse> {
123
- return this.beginCreateOrUpdate(resourceGroupName,privateCloudName,privateCloud,options)
124
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.PrivateCloudsCreateOrUpdateResponse>;
288
+ async beginUpdate(
289
+ resourceGroupName: string,
290
+ privateCloudName: string,
291
+ privateCloudUpdate: PrivateCloudUpdate,
292
+ options?: PrivateCloudsUpdateOptionalParams
293
+ ): Promise<
294
+ PollerLike<
295
+ PollOperationState<PrivateCloudsUpdateResponse>,
296
+ PrivateCloudsUpdateResponse
297
+ >
298
+ > {
299
+ const directSendOperation = async (
300
+ args: coreClient.OperationArguments,
301
+ spec: coreClient.OperationSpec
302
+ ): Promise<PrivateCloudsUpdateResponse> => {
303
+ return this.client.sendOperationRequest(args, spec);
304
+ };
305
+ const sendOperation = async (
306
+ args: coreClient.OperationArguments,
307
+ spec: coreClient.OperationSpec
308
+ ) => {
309
+ let currentRawResponse:
310
+ | coreClient.FullOperationResponse
311
+ | undefined = undefined;
312
+ const providedCallback = args.options?.onResponse;
313
+ const callback: coreClient.RawResponseCallback = (
314
+ rawResponse: coreClient.FullOperationResponse,
315
+ flatResponse: unknown
316
+ ) => {
317
+ currentRawResponse = rawResponse;
318
+ providedCallback?.(rawResponse, flatResponse);
319
+ };
320
+ const updatedArgs = {
321
+ ...args,
322
+ options: {
323
+ ...args.options,
324
+ onResponse: callback
325
+ }
326
+ };
327
+ const flatResponse = await directSendOperation(updatedArgs, spec);
328
+ return {
329
+ flatResponse,
330
+ rawResponse: {
331
+ statusCode: currentRawResponse!.status,
332
+ body: currentRawResponse!.parsedBody,
333
+ headers: currentRawResponse!.headers.toJSON()
334
+ }
335
+ };
336
+ };
337
+
338
+ const lro = new LroImpl(
339
+ sendOperation,
340
+ { resourceGroupName, privateCloudName, privateCloudUpdate, options },
341
+ updateOperationSpec
342
+ );
343
+ return new LroEngine(lro, {
344
+ resumeFrom: options?.resumeFrom,
345
+ intervalInMs: options?.updateIntervalInMs
346
+ });
125
347
  }
126
348
 
127
349
  /**
128
- * @summary Update a private cloud
350
+ * Update a private cloud
129
351
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
130
352
  * @param privateCloudName Name of the private cloud
131
353
  * @param privateCloudUpdate The private cloud properties to be updated
132
- * @param [options] The optional parameters
133
- * @returns Promise<Models.PrivateCloudsUpdateResponse>
354
+ * @param options The options parameters.
134
355
  */
135
- update(resourceGroupName: string, privateCloudName: string, privateCloudUpdate: Models.PrivateCloudUpdate, options?: msRest.RequestOptionsBase): Promise<Models.PrivateCloudsUpdateResponse> {
136
- return this.beginUpdate(resourceGroupName,privateCloudName,privateCloudUpdate,options)
137
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.PrivateCloudsUpdateResponse>;
356
+ async beginUpdateAndWait(
357
+ resourceGroupName: string,
358
+ privateCloudName: string,
359
+ privateCloudUpdate: PrivateCloudUpdate,
360
+ options?: PrivateCloudsUpdateOptionalParams
361
+ ): Promise<PrivateCloudsUpdateResponse> {
362
+ const poller = await this.beginUpdate(
363
+ resourceGroupName,
364
+ privateCloudName,
365
+ privateCloudUpdate,
366
+ options
367
+ );
368
+ return poller.pollUntilDone();
138
369
  }
139
370
 
140
371
  /**
141
- * @summary Delete a private cloud
372
+ * Delete a private cloud
142
373
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
143
374
  * @param privateCloudName Name of the private cloud
144
- * @param [options] The optional parameters
145
- * @returns Promise<msRest.RestResponse>
375
+ * @param options The options parameters.
146
376
  */
147
- deleteMethod(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
148
- return this.beginDeleteMethod(resourceGroupName,privateCloudName,options)
149
- .then(lroPoller => lroPoller.pollUntilFinished());
377
+ async beginDelete(
378
+ resourceGroupName: string,
379
+ privateCloudName: string,
380
+ options?: PrivateCloudsDeleteOptionalParams
381
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
382
+ const directSendOperation = async (
383
+ args: coreClient.OperationArguments,
384
+ spec: coreClient.OperationSpec
385
+ ): Promise<void> => {
386
+ return this.client.sendOperationRequest(args, spec);
387
+ };
388
+ const sendOperation = async (
389
+ args: coreClient.OperationArguments,
390
+ spec: coreClient.OperationSpec
391
+ ) => {
392
+ let currentRawResponse:
393
+ | coreClient.FullOperationResponse
394
+ | undefined = undefined;
395
+ const providedCallback = args.options?.onResponse;
396
+ const callback: coreClient.RawResponseCallback = (
397
+ rawResponse: coreClient.FullOperationResponse,
398
+ flatResponse: unknown
399
+ ) => {
400
+ currentRawResponse = rawResponse;
401
+ providedCallback?.(rawResponse, flatResponse);
402
+ };
403
+ const updatedArgs = {
404
+ ...args,
405
+ options: {
406
+ ...args.options,
407
+ onResponse: callback
408
+ }
409
+ };
410
+ const flatResponse = await directSendOperation(updatedArgs, spec);
411
+ return {
412
+ flatResponse,
413
+ rawResponse: {
414
+ statusCode: currentRawResponse!.status,
415
+ body: currentRawResponse!.parsedBody,
416
+ headers: currentRawResponse!.headers.toJSON()
417
+ }
418
+ };
419
+ };
420
+
421
+ const lro = new LroImpl(
422
+ sendOperation,
423
+ { resourceGroupName, privateCloudName, options },
424
+ deleteOperationSpec
425
+ );
426
+ return new LroEngine(lro, {
427
+ resumeFrom: options?.resumeFrom,
428
+ intervalInMs: options?.updateIntervalInMs
429
+ });
150
430
  }
151
431
 
152
432
  /**
153
- * @summary List the admin credentials for the private cloud
433
+ * Delete a private cloud
154
434
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
155
435
  * @param privateCloudName Name of the private cloud
156
- * @param [options] The optional parameters
157
- * @returns Promise<Models.PrivateCloudsListAdminCredentialsResponse>
436
+ * @param options The options parameters.
158
437
  */
159
- listAdminCredentials(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateCloudsListAdminCredentialsResponse>;
438
+ async beginDeleteAndWait(
439
+ resourceGroupName: string,
440
+ privateCloudName: string,
441
+ options?: PrivateCloudsDeleteOptionalParams
442
+ ): Promise<void> {
443
+ const poller = await this.beginDelete(
444
+ resourceGroupName,
445
+ privateCloudName,
446
+ options
447
+ );
448
+ return poller.pollUntilDone();
449
+ }
450
+
160
451
  /**
452
+ * Rotate the vCenter password
161
453
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
162
454
  * @param privateCloudName Name of the private cloud
163
- * @param callback The callback
455
+ * @param options The options parameters.
164
456
  */
165
- listAdminCredentials(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback<Models.AdminCredentials>): void;
457
+ async beginRotateVcenterPassword(
458
+ resourceGroupName: string,
459
+ privateCloudName: string,
460
+ options?: PrivateCloudsRotateVcenterPasswordOptionalParams
461
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
462
+ const directSendOperation = async (
463
+ args: coreClient.OperationArguments,
464
+ spec: coreClient.OperationSpec
465
+ ): Promise<void> => {
466
+ return this.client.sendOperationRequest(args, spec);
467
+ };
468
+ const sendOperation = async (
469
+ args: coreClient.OperationArguments,
470
+ spec: coreClient.OperationSpec
471
+ ) => {
472
+ let currentRawResponse:
473
+ | coreClient.FullOperationResponse
474
+ | undefined = undefined;
475
+ const providedCallback = args.options?.onResponse;
476
+ const callback: coreClient.RawResponseCallback = (
477
+ rawResponse: coreClient.FullOperationResponse,
478
+ flatResponse: unknown
479
+ ) => {
480
+ currentRawResponse = rawResponse;
481
+ providedCallback?.(rawResponse, flatResponse);
482
+ };
483
+ const updatedArgs = {
484
+ ...args,
485
+ options: {
486
+ ...args.options,
487
+ onResponse: callback
488
+ }
489
+ };
490
+ const flatResponse = await directSendOperation(updatedArgs, spec);
491
+ return {
492
+ flatResponse,
493
+ rawResponse: {
494
+ statusCode: currentRawResponse!.status,
495
+ body: currentRawResponse!.parsedBody,
496
+ headers: currentRawResponse!.headers.toJSON()
497
+ }
498
+ };
499
+ };
500
+
501
+ const lro = new LroImpl(
502
+ sendOperation,
503
+ { resourceGroupName, privateCloudName, options },
504
+ rotateVcenterPasswordOperationSpec
505
+ );
506
+ return new LroEngine(lro, {
507
+ resumeFrom: options?.resumeFrom,
508
+ intervalInMs: options?.updateIntervalInMs
509
+ });
510
+ }
511
+
166
512
  /**
513
+ * Rotate the vCenter password
167
514
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
168
515
  * @param privateCloudName Name of the private cloud
169
- * @param options The optional parameters
170
- * @param callback The callback
516
+ * @param options The options parameters.
171
517
  */
172
- listAdminCredentials(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.AdminCredentials>): void;
173
- listAdminCredentials(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.AdminCredentials>, callback?: msRest.ServiceCallback<Models.AdminCredentials>): Promise<Models.PrivateCloudsListAdminCredentialsResponse> {
174
- return this.client.sendOperationRequest(
175
- {
176
- resourceGroupName,
177
- privateCloudName,
178
- options
179
- },
180
- listAdminCredentialsOperationSpec,
181
- callback) as Promise<Models.PrivateCloudsListAdminCredentialsResponse>;
518
+ async beginRotateVcenterPasswordAndWait(
519
+ resourceGroupName: string,
520
+ privateCloudName: string,
521
+ options?: PrivateCloudsRotateVcenterPasswordOptionalParams
522
+ ): Promise<void> {
523
+ const poller = await this.beginRotateVcenterPassword(
524
+ resourceGroupName,
525
+ privateCloudName,
526
+ options
527
+ );
528
+ return poller.pollUntilDone();
182
529
  }
183
530
 
184
531
  /**
185
- * @summary Create or update a private cloud
532
+ * Rotate the NSX-T Manager password
186
533
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
187
534
  * @param privateCloudName Name of the private cloud
188
- * @param privateCloud The private cloud
189
- * @param [options] The optional parameters
190
- * @returns Promise<msRestAzure.LROPoller>
535
+ * @param options The options parameters.
191
536
  */
192
- beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, privateCloud: Models.PrivateCloud, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
193
- return this.client.sendLRORequest(
194
- {
195
- resourceGroupName,
196
- privateCloudName,
197
- privateCloud,
198
- options
199
- },
200
- beginCreateOrUpdateOperationSpec,
201
- options);
537
+ async beginRotateNsxtPassword(
538
+ resourceGroupName: string,
539
+ privateCloudName: string,
540
+ options?: PrivateCloudsRotateNsxtPasswordOptionalParams
541
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
542
+ const directSendOperation = async (
543
+ args: coreClient.OperationArguments,
544
+ spec: coreClient.OperationSpec
545
+ ): Promise<void> => {
546
+ return this.client.sendOperationRequest(args, spec);
547
+ };
548
+ const sendOperation = async (
549
+ args: coreClient.OperationArguments,
550
+ spec: coreClient.OperationSpec
551
+ ) => {
552
+ let currentRawResponse:
553
+ | coreClient.FullOperationResponse
554
+ | undefined = undefined;
555
+ const providedCallback = args.options?.onResponse;
556
+ const callback: coreClient.RawResponseCallback = (
557
+ rawResponse: coreClient.FullOperationResponse,
558
+ flatResponse: unknown
559
+ ) => {
560
+ currentRawResponse = rawResponse;
561
+ providedCallback?.(rawResponse, flatResponse);
562
+ };
563
+ const updatedArgs = {
564
+ ...args,
565
+ options: {
566
+ ...args.options,
567
+ onResponse: callback
568
+ }
569
+ };
570
+ const flatResponse = await directSendOperation(updatedArgs, spec);
571
+ return {
572
+ flatResponse,
573
+ rawResponse: {
574
+ statusCode: currentRawResponse!.status,
575
+ body: currentRawResponse!.parsedBody,
576
+ headers: currentRawResponse!.headers.toJSON()
577
+ }
578
+ };
579
+ };
580
+
581
+ const lro = new LroImpl(
582
+ sendOperation,
583
+ { resourceGroupName, privateCloudName, options },
584
+ rotateNsxtPasswordOperationSpec
585
+ );
586
+ return new LroEngine(lro, {
587
+ resumeFrom: options?.resumeFrom,
588
+ intervalInMs: options?.updateIntervalInMs
589
+ });
202
590
  }
203
591
 
204
592
  /**
205
- * @summary Update a private cloud
593
+ * Rotate the NSX-T Manager password
206
594
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
207
595
  * @param privateCloudName Name of the private cloud
208
- * @param privateCloudUpdate The private cloud properties to be updated
209
- * @param [options] The optional parameters
210
- * @returns Promise<msRestAzure.LROPoller>
596
+ * @param options The options parameters.
211
597
  */
212
- beginUpdate(resourceGroupName: string, privateCloudName: string, privateCloudUpdate: Models.PrivateCloudUpdate, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
213
- return this.client.sendLRORequest(
214
- {
215
- resourceGroupName,
216
- privateCloudName,
217
- privateCloudUpdate,
218
- options
219
- },
220
- beginUpdateOperationSpec,
221
- options);
598
+ async beginRotateNsxtPasswordAndWait(
599
+ resourceGroupName: string,
600
+ privateCloudName: string,
601
+ options?: PrivateCloudsRotateNsxtPasswordOptionalParams
602
+ ): Promise<void> {
603
+ const poller = await this.beginRotateNsxtPassword(
604
+ resourceGroupName,
605
+ privateCloudName,
606
+ options
607
+ );
608
+ return poller.pollUntilDone();
222
609
  }
223
610
 
224
611
  /**
225
- * @summary Delete a private cloud
612
+ * List the admin credentials for the private cloud
226
613
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
227
614
  * @param privateCloudName Name of the private cloud
228
- * @param [options] The optional parameters
229
- * @returns Promise<msRestAzure.LROPoller>
615
+ * @param options The options parameters.
230
616
  */
231
- beginDeleteMethod(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
232
- return this.client.sendLRORequest(
233
- {
234
- resourceGroupName,
235
- privateCloudName,
236
- options
237
- },
238
- beginDeleteMethodOperationSpec,
239
- options);
617
+ listAdminCredentials(
618
+ resourceGroupName: string,
619
+ privateCloudName: string,
620
+ options?: PrivateCloudsListAdminCredentialsOptionalParams
621
+ ): Promise<PrivateCloudsListAdminCredentialsResponse> {
622
+ return this.client.sendOperationRequest(
623
+ { resourceGroupName, privateCloudName, options },
624
+ listAdminCredentialsOperationSpec
625
+ );
240
626
  }
241
627
 
242
628
  /**
243
- * @summary List private clouds in a resource group
244
- * @param nextPageLink The NextLink from the previous successful call to List operation.
245
- * @param [options] The optional parameters
246
- * @returns Promise<Models.PrivateCloudsListNextResponse>
247
- */
248
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateCloudsListNextResponse>;
249
- /**
250
- * @param nextPageLink The NextLink from the previous successful call to List operation.
251
- * @param callback The callback
252
- */
253
- listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PrivateCloudList>): void;
254
- /**
255
- * @param nextPageLink The NextLink from the previous successful call to List operation.
256
- * @param options The optional parameters
257
- * @param callback The callback
629
+ * ListNext
630
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
631
+ * @param nextLink The nextLink from the previous successful call to the List method.
632
+ * @param options The options parameters.
258
633
  */
259
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateCloudList>): void;
260
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateCloudList>, callback?: msRest.ServiceCallback<Models.PrivateCloudList>): Promise<Models.PrivateCloudsListNextResponse> {
634
+ private _listNext(
635
+ resourceGroupName: string,
636
+ nextLink: string,
637
+ options?: PrivateCloudsListNextOptionalParams
638
+ ): Promise<PrivateCloudsListNextResponse> {
261
639
  return this.client.sendOperationRequest(
262
- {
263
- nextPageLink,
264
- options
265
- },
266
- listNextOperationSpec,
267
- callback) as Promise<Models.PrivateCloudsListNextResponse>;
640
+ { resourceGroupName, nextLink, options },
641
+ listNextOperationSpec
642
+ );
268
643
  }
269
644
 
270
645
  /**
271
- * @summary List private clouds in a subscription
272
- * @param nextPageLink The NextLink from the previous successful call to List operation.
273
- * @param [options] The optional parameters
274
- * @returns Promise<Models.PrivateCloudsListInSubscriptionNextResponse>
646
+ * ListInSubscriptionNext
647
+ * @param nextLink The nextLink from the previous successful call to the ListInSubscription method.
648
+ * @param options The options parameters.
275
649
  */
276
- listInSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateCloudsListInSubscriptionNextResponse>;
277
- /**
278
- * @param nextPageLink The NextLink from the previous successful call to List operation.
279
- * @param callback The callback
280
- */
281
- listInSubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PrivateCloudList>): void;
282
- /**
283
- * @param nextPageLink The NextLink from the previous successful call to List operation.
284
- * @param options The optional parameters
285
- * @param callback The callback
286
- */
287
- listInSubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateCloudList>): void;
288
- listInSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateCloudList>, callback?: msRest.ServiceCallback<Models.PrivateCloudList>): Promise<Models.PrivateCloudsListInSubscriptionNextResponse> {
650
+ private _listInSubscriptionNext(
651
+ nextLink: string,
652
+ options?: PrivateCloudsListInSubscriptionNextOptionalParams
653
+ ): Promise<PrivateCloudsListInSubscriptionNextResponse> {
289
654
  return this.client.sendOperationRequest(
290
- {
291
- nextPageLink,
292
- options
293
- },
294
- listInSubscriptionNextOperationSpec,
295
- callback) as Promise<Models.PrivateCloudsListInSubscriptionNextResponse>;
655
+ { nextLink, options },
656
+ listInSubscriptionNextOperationSpec
657
+ );
296
658
  }
297
659
  }
298
-
299
660
  // Operation Specifications
300
- const serializer = new msRest.Serializer(Mappers);
301
- const listOperationSpec: msRest.OperationSpec = {
661
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
662
+
663
+ const listOperationSpec: coreClient.OperationSpec = {
664
+ path:
665
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds",
302
666
  httpMethod: "GET",
303
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds",
304
- urlParameters: [
305
- Parameters.subscriptionId,
306
- Parameters.resourceGroupName
307
- ],
308
- queryParameters: [
309
- Parameters.apiVersion
310
- ],
311
- headerParameters: [
312
- Parameters.acceptLanguage
313
- ],
314
667
  responses: {
315
668
  200: {
316
669
  bodyMapper: Mappers.PrivateCloudList
@@ -319,21 +672,18 @@ const listOperationSpec: msRest.OperationSpec = {
319
672
  bodyMapper: Mappers.CloudError
320
673
  }
321
674
  },
675
+ queryParameters: [Parameters.apiVersion],
676
+ urlParameters: [
677
+ Parameters.$host,
678
+ Parameters.subscriptionId,
679
+ Parameters.resourceGroupName
680
+ ],
681
+ headerParameters: [Parameters.accept],
322
682
  serializer
323
683
  };
324
-
325
- const listInSubscriptionOperationSpec: msRest.OperationSpec = {
684
+ const listInSubscriptionOperationSpec: coreClient.OperationSpec = {
685
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/privateClouds",
326
686
  httpMethod: "GET",
327
- path: "subscriptions/{subscriptionId}/providers/Microsoft.AVS/privateClouds",
328
- urlParameters: [
329
- Parameters.subscriptionId
330
- ],
331
- queryParameters: [
332
- Parameters.apiVersion
333
- ],
334
- headerParameters: [
335
- Parameters.acceptLanguage
336
- ],
337
687
  responses: {
338
688
  200: {
339
689
  bodyMapper: Mappers.PrivateCloudList
@@ -342,23 +692,15 @@ const listInSubscriptionOperationSpec: msRest.OperationSpec = {
342
692
  bodyMapper: Mappers.CloudError
343
693
  }
344
694
  },
695
+ queryParameters: [Parameters.apiVersion],
696
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
697
+ headerParameters: [Parameters.accept],
345
698
  serializer
346
699
  };
347
-
348
- const getOperationSpec: msRest.OperationSpec = {
700
+ const getOperationSpec: coreClient.OperationSpec = {
701
+ path:
702
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}",
349
703
  httpMethod: "GET",
350
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}",
351
- urlParameters: [
352
- Parameters.subscriptionId,
353
- Parameters.resourceGroupName,
354
- Parameters.privateCloudName
355
- ],
356
- queryParameters: [
357
- Parameters.apiVersion
358
- ],
359
- headerParameters: [
360
- Parameters.acceptLanguage
361
- ],
362
704
  responses: {
363
705
  200: {
364
706
  bodyMapper: Mappers.PrivateCloud
@@ -367,55 +709,53 @@ const getOperationSpec: msRest.OperationSpec = {
367
709
  bodyMapper: Mappers.CloudError
368
710
  }
369
711
  },
370
- serializer
371
- };
372
-
373
- const listAdminCredentialsOperationSpec: msRest.OperationSpec = {
374
- httpMethod: "POST",
375
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials",
712
+ queryParameters: [Parameters.apiVersion],
376
713
  urlParameters: [
714
+ Parameters.$host,
377
715
  Parameters.subscriptionId,
378
716
  Parameters.resourceGroupName,
379
717
  Parameters.privateCloudName
380
718
  ],
381
- queryParameters: [
382
- Parameters.apiVersion
383
- ],
384
- headerParameters: [
385
- Parameters.acceptLanguage
386
- ],
719
+ headerParameters: [Parameters.accept],
720
+ serializer
721
+ };
722
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
723
+ path:
724
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}",
725
+ httpMethod: "PUT",
387
726
  responses: {
388
727
  200: {
389
- bodyMapper: Mappers.AdminCredentials
728
+ bodyMapper: Mappers.PrivateCloud
729
+ },
730
+ 201: {
731
+ bodyMapper: Mappers.PrivateCloud
732
+ },
733
+ 202: {
734
+ bodyMapper: Mappers.PrivateCloud
735
+ },
736
+ 204: {
737
+ bodyMapper: Mappers.PrivateCloud
390
738
  },
391
739
  default: {
392
740
  bodyMapper: Mappers.CloudError
393
741
  }
394
742
  },
395
- serializer
396
- };
397
-
398
- const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
399
- httpMethod: "PUT",
400
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}",
743
+ requestBody: Parameters.privateCloud,
744
+ queryParameters: [Parameters.apiVersion],
401
745
  urlParameters: [
746
+ Parameters.$host,
402
747
  Parameters.subscriptionId,
403
748
  Parameters.resourceGroupName,
404
749
  Parameters.privateCloudName
405
750
  ],
406
- queryParameters: [
407
- Parameters.apiVersion
408
- ],
409
- headerParameters: [
410
- Parameters.acceptLanguage
411
- ],
412
- requestBody: {
413
- parameterPath: "privateCloud",
414
- mapper: {
415
- ...Mappers.PrivateCloud,
416
- required: true
417
- }
418
- },
751
+ headerParameters: [Parameters.accept, Parameters.contentType],
752
+ mediaType: "json",
753
+ serializer
754
+ };
755
+ const updateOperationSpec: coreClient.OperationSpec = {
756
+ path:
757
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}",
758
+ httpMethod: "PATCH",
419
759
  responses: {
420
760
  200: {
421
761
  bodyMapper: Mappers.PrivateCloud
@@ -423,83 +763,122 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
423
763
  201: {
424
764
  bodyMapper: Mappers.PrivateCloud
425
765
  },
766
+ 202: {
767
+ bodyMapper: Mappers.PrivateCloud
768
+ },
769
+ 204: {
770
+ bodyMapper: Mappers.PrivateCloud
771
+ },
426
772
  default: {
427
773
  bodyMapper: Mappers.CloudError
428
774
  }
429
775
  },
430
- serializer
431
- };
432
-
433
- const beginUpdateOperationSpec: msRest.OperationSpec = {
434
- httpMethod: "PATCH",
435
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}",
776
+ requestBody: Parameters.privateCloudUpdate,
777
+ queryParameters: [Parameters.apiVersion],
436
778
  urlParameters: [
779
+ Parameters.$host,
437
780
  Parameters.subscriptionId,
438
781
  Parameters.resourceGroupName,
439
782
  Parameters.privateCloudName
440
783
  ],
441
- queryParameters: [
442
- Parameters.apiVersion
443
- ],
444
- headerParameters: [
445
- Parameters.acceptLanguage
446
- ],
447
- requestBody: {
448
- parameterPath: "privateCloudUpdate",
449
- mapper: {
450
- ...Mappers.PrivateCloudUpdate,
451
- required: true
452
- }
453
- },
784
+ headerParameters: [Parameters.accept, Parameters.contentType],
785
+ mediaType: "json",
786
+ serializer
787
+ };
788
+ const deleteOperationSpec: coreClient.OperationSpec = {
789
+ path:
790
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}",
791
+ httpMethod: "DELETE",
454
792
  responses: {
455
- 200: {
456
- bodyMapper: Mappers.PrivateCloud
457
- },
458
- 201: {
459
- bodyMapper: Mappers.PrivateCloud
460
- },
793
+ 200: {},
794
+ 201: {},
795
+ 202: {},
796
+ 204: {},
461
797
  default: {
462
798
  bodyMapper: Mappers.CloudError
463
799
  }
464
800
  },
801
+ queryParameters: [Parameters.apiVersion],
802
+ urlParameters: [
803
+ Parameters.$host,
804
+ Parameters.subscriptionId,
805
+ Parameters.resourceGroupName,
806
+ Parameters.privateCloudName
807
+ ],
808
+ headerParameters: [Parameters.accept],
465
809
  serializer
466
810
  };
467
-
468
- const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
469
- httpMethod: "DELETE",
470
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}",
811
+ const rotateVcenterPasswordOperationSpec: coreClient.OperationSpec = {
812
+ path:
813
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword",
814
+ httpMethod: "POST",
815
+ responses: {
816
+ 200: {},
817
+ 201: {},
818
+ 202: {},
819
+ 204: {},
820
+ default: {
821
+ bodyMapper: Mappers.CloudError
822
+ }
823
+ },
824
+ queryParameters: [Parameters.apiVersion],
471
825
  urlParameters: [
826
+ Parameters.$host,
472
827
  Parameters.subscriptionId,
473
828
  Parameters.resourceGroupName,
474
829
  Parameters.privateCloudName
475
830
  ],
476
- queryParameters: [
477
- Parameters.apiVersion
478
- ],
479
- headerParameters: [
480
- Parameters.acceptLanguage
481
- ],
831
+ headerParameters: [Parameters.accept],
832
+ serializer
833
+ };
834
+ const rotateNsxtPasswordOperationSpec: coreClient.OperationSpec = {
835
+ path:
836
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateNsxtPassword",
837
+ httpMethod: "POST",
482
838
  responses: {
483
839
  200: {},
840
+ 201: {},
484
841
  202: {},
485
842
  204: {},
486
843
  default: {
487
844
  bodyMapper: Mappers.CloudError
488
845
  }
489
846
  },
847
+ queryParameters: [Parameters.apiVersion],
848
+ urlParameters: [
849
+ Parameters.$host,
850
+ Parameters.subscriptionId,
851
+ Parameters.resourceGroupName,
852
+ Parameters.privateCloudName
853
+ ],
854
+ headerParameters: [Parameters.accept],
490
855
  serializer
491
856
  };
492
-
493
- const listNextOperationSpec: msRest.OperationSpec = {
494
- httpMethod: "GET",
495
- baseUrl: "https://management.azure.com",
496
- path: "{nextLink}",
857
+ const listAdminCredentialsOperationSpec: coreClient.OperationSpec = {
858
+ path:
859
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials",
860
+ httpMethod: "POST",
861
+ responses: {
862
+ 200: {
863
+ bodyMapper: Mappers.AdminCredentials
864
+ },
865
+ default: {
866
+ bodyMapper: Mappers.CloudError
867
+ }
868
+ },
869
+ queryParameters: [Parameters.apiVersion],
497
870
  urlParameters: [
498
- Parameters.nextPageLink
499
- ],
500
- headerParameters: [
501
- Parameters.acceptLanguage
871
+ Parameters.$host,
872
+ Parameters.subscriptionId,
873
+ Parameters.resourceGroupName,
874
+ Parameters.privateCloudName
502
875
  ],
876
+ headerParameters: [Parameters.accept],
877
+ serializer
878
+ };
879
+ const listNextOperationSpec: coreClient.OperationSpec = {
880
+ path: "{nextLink}",
881
+ httpMethod: "GET",
503
882
  responses: {
504
883
  200: {
505
884
  bodyMapper: Mappers.PrivateCloudList
@@ -508,19 +887,19 @@ const listNextOperationSpec: msRest.OperationSpec = {
508
887
  bodyMapper: Mappers.CloudError
509
888
  }
510
889
  },
890
+ queryParameters: [Parameters.apiVersion],
891
+ urlParameters: [
892
+ Parameters.$host,
893
+ Parameters.nextLink,
894
+ Parameters.subscriptionId,
895
+ Parameters.resourceGroupName
896
+ ],
897
+ headerParameters: [Parameters.accept],
511
898
  serializer
512
899
  };
513
-
514
- const listInSubscriptionNextOperationSpec: msRest.OperationSpec = {
515
- httpMethod: "GET",
516
- baseUrl: "https://management.azure.com",
900
+ const listInSubscriptionNextOperationSpec: coreClient.OperationSpec = {
517
901
  path: "{nextLink}",
518
- urlParameters: [
519
- Parameters.nextPageLink
520
- ],
521
- headerParameters: [
522
- Parameters.acceptLanguage
523
- ],
902
+ httpMethod: "GET",
524
903
  responses: {
525
904
  200: {
526
905
  bodyMapper: Mappers.PrivateCloudList
@@ -529,5 +908,12 @@ const listInSubscriptionNextOperationSpec: msRest.OperationSpec = {
529
908
  bodyMapper: Mappers.CloudError
530
909
  }
531
910
  },
911
+ queryParameters: [Parameters.apiVersion],
912
+ urlParameters: [
913
+ Parameters.$host,
914
+ Parameters.nextLink,
915
+ Parameters.subscriptionId
916
+ ],
917
+ headerParameters: [Parameters.accept],
532
918
  serializer
533
919
  };