@azure/arm-storage 16.1.1 → 17.0.0-alpha.20211111.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 (388) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/{LICENSE.txt → LICENSE} +1 -1
  3. package/README.md +63 -80
  4. package/dist/index.js +10964 -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/esm/coreClientLro.d.ts +26 -0
  9. package/esm/coreClientLro.d.ts.map +1 -0
  10. package/esm/coreClientLro.js +186 -0
  11. package/esm/coreClientLro.js.map +1 -0
  12. package/esm/index.d.ts +5002 -0
  13. package/esm/index.d.ts.map +1 -0
  14. package/esm/index.js +13 -0
  15. package/esm/index.js.map +1 -0
  16. package/esm/lro/azureAsyncPolling.d.ts +3 -0
  17. package/esm/lro/azureAsyncPolling.d.ts.map +1 -0
  18. package/esm/lro/azureAsyncPolling.js +67 -0
  19. package/esm/lro/azureAsyncPolling.js.map +1 -0
  20. package/esm/lro/bodyPolling.d.ts +8 -0
  21. package/esm/lro/bodyPolling.d.ts.map +1 -0
  22. package/esm/lro/bodyPolling.js +37 -0
  23. package/esm/lro/bodyPolling.js.map +1 -0
  24. package/esm/lro/index.d.ts +4 -0
  25. package/esm/lro/index.d.ts.map +1 -0
  26. package/{src/models/operationsMappers.ts → esm/lro/index.js} +5 -10
  27. package/esm/lro/index.js.map +1 -0
  28. package/esm/lro/locationPolling.d.ts +3 -0
  29. package/esm/lro/locationPolling.d.ts.map +1 -0
  30. package/esm/lro/locationPolling.js +19 -0
  31. package/esm/lro/locationPolling.js.map +1 -0
  32. package/esm/lro/lroEngine.d.ts +14 -0
  33. package/esm/lro/lroEngine.d.ts.map +1 -0
  34. package/esm/lro/lroEngine.js +41 -0
  35. package/esm/lro/lroEngine.js.map +1 -0
  36. package/esm/lro/models.d.ts +138 -0
  37. package/esm/lro/models.d.ts.map +1 -0
  38. package/esm/lro/models.js +14 -0
  39. package/esm/lro/models.js.map +1 -0
  40. package/esm/lro/operation.d.ts +36 -0
  41. package/esm/lro/operation.d.ts.map +1 -0
  42. package/esm/lro/operation.js +82 -0
  43. package/esm/lro/operation.js.map +1 -0
  44. package/esm/lro/passthrough.d.ts +3 -0
  45. package/esm/lro/passthrough.d.ts.map +1 -0
  46. package/esm/{models/operationsMappers.js → lro/passthrough.js} +8 -2
  47. package/esm/lro/passthrough.js.map +1 -0
  48. package/esm/lro/requestUtils.d.ts +16 -0
  49. package/esm/lro/requestUtils.d.ts.map +1 -0
  50. package/esm/lro/requestUtils.js +73 -0
  51. package/esm/lro/requestUtils.js.map +1 -0
  52. package/esm/lro/stateMachine.d.ts +18 -0
  53. package/esm/lro/stateMachine.d.ts.map +1 -0
  54. package/esm/lro/stateMachine.js +84 -0
  55. package/esm/lro/stateMachine.js.map +1 -0
  56. package/esm/models/index.d.ts +2673 -4395
  57. package/esm/models/index.d.ts.map +1 -1
  58. package/esm/models/index.js +331 -0
  59. package/esm/models/index.js.map +1 -1
  60. package/esm/models/mappers.d.ts +146 -138
  61. package/esm/models/mappers.d.ts.map +1 -1
  62. package/esm/models/mappers.js +2734 -2563
  63. package/esm/models/mappers.js.map +1 -1
  64. package/esm/models/parameters.d.ts +59 -33
  65. package/esm/models/parameters.d.ts.map +1 -1
  66. package/esm/models/parameters.js +267 -159
  67. package/esm/models/parameters.js.map +1 -1
  68. package/esm/operations/blobContainers.d.ts +213 -561
  69. package/esm/operations/blobContainers.d.ts.map +1 -1
  70. package/esm/operations/blobContainers.js +578 -429
  71. package/esm/operations/blobContainers.js.map +1 -1
  72. package/esm/operations/blobInventoryPolicies.d.ts +47 -109
  73. package/esm/operations/blobInventoryPolicies.d.ts.map +1 -1
  74. package/esm/operations/blobInventoryPolicies.js +163 -105
  75. package/esm/operations/blobInventoryPolicies.js.map +1 -1
  76. package/esm/operations/blobServices.d.ts +39 -89
  77. package/esm/operations/blobServices.d.ts.map +1 -1
  78. package/esm/operations/blobServices.js +133 -89
  79. package/esm/operations/blobServices.js.map +1 -1
  80. package/esm/operations/deletedAccounts.d.ts +20 -47
  81. package/esm/operations/deletedAccounts.d.ts.map +1 -1
  82. package/esm/operations/deletedAccounts.js +111 -69
  83. package/esm/operations/deletedAccounts.js.map +1 -1
  84. package/esm/operations/encryptionScopes.d.ts +65 -166
  85. package/esm/operations/encryptionScopes.d.ts.map +1 -1
  86. package/esm/operations/encryptionScopes.js +211 -131
  87. package/esm/operations/encryptionScopes.js.map +1 -1
  88. package/esm/operations/fileServices.d.ts +25 -89
  89. package/esm/operations/fileServices.d.ts.map +1 -1
  90. package/esm/operations/fileServices.js +86 -83
  91. package/esm/operations/fileServices.js.map +1 -1
  92. package/esm/operations/fileShares.d.ts +100 -256
  93. package/esm/operations/fileShares.d.ts.map +1 -1
  94. package/esm/operations/fileShares.js +316 -164
  95. package/esm/operations/fileShares.js.map +1 -1
  96. package/esm/operations/index.d.ts.map +1 -1
  97. package/esm/operations/index.js +1 -2
  98. package/esm/operations/index.js.map +1 -1
  99. package/esm/operations/managementPolicies.d.ts +30 -89
  100. package/esm/operations/managementPolicies.d.ts.map +1 -1
  101. package/esm/operations/managementPolicies.js +89 -92
  102. package/esm/operations/managementPolicies.js.map +1 -1
  103. package/esm/operations/objectReplicationPoliciesOperations.d.ts +54 -130
  104. package/esm/operations/objectReplicationPoliciesOperations.d.ts.map +1 -1
  105. package/esm/operations/objectReplicationPoliciesOperations.js +170 -102
  106. package/esm/operations/objectReplicationPoliciesOperations.js.map +1 -1
  107. package/esm/operations/operations.d.ts +14 -15
  108. package/esm/operations/operations.d.ts.map +1 -1
  109. package/esm/operations/operations.js +67 -29
  110. package/esm/operations/operations.js.map +1 -1
  111. package/esm/operations/privateEndpointConnections.d.ts +46 -126
  112. package/esm/operations/privateEndpointConnections.d.ts.map +1 -1
  113. package/esm/operations/privateEndpointConnections.js +171 -103
  114. package/esm/operations/privateEndpointConnections.js.map +1 -1
  115. package/esm/operations/privateLinkResources.d.ts +11 -31
  116. package/esm/operations/privateLinkResources.d.ts.map +1 -1
  117. package/esm/operations/privateLinkResources.js +32 -36
  118. package/esm/operations/privateLinkResources.js.map +1 -1
  119. package/esm/operations/queue.d.ts +69 -196
  120. package/esm/operations/queue.d.ts.map +1 -1
  121. package/esm/operations/queue.js +230 -162
  122. package/esm/operations/queue.js.map +1 -1
  123. package/esm/operations/queueServices.d.ts +29 -87
  124. package/esm/operations/queueServices.d.ts.map +1 -1
  125. package/esm/operations/queueServices.js +86 -87
  126. package/esm/operations/queueServices.js.map +1 -1
  127. package/esm/operations/skus.d.ts +14 -15
  128. package/esm/operations/skus.d.ts.map +1 -1
  129. package/esm/operations/skus.js +67 -32
  130. package/esm/operations/skus.js.map +1 -1
  131. package/esm/operations/storageAccounts.d.ts +163 -381
  132. package/esm/operations/storageAccounts.d.ts.map +1 -1
  133. package/esm/operations/storageAccounts.js +605 -501
  134. package/esm/operations/storageAccounts.js.map +1 -1
  135. package/esm/operations/tableOperations.d.ts +67 -184
  136. package/esm/operations/tableOperations.d.ts.map +1 -1
  137. package/esm/operations/tableOperations.js +220 -143
  138. package/esm/operations/tableOperations.js.map +1 -1
  139. package/esm/operations/tableServices.d.ts +29 -87
  140. package/esm/operations/tableServices.d.ts.map +1 -1
  141. package/esm/operations/tableServices.js +86 -87
  142. package/esm/operations/tableServices.js.map +1 -1
  143. package/esm/operations/usages.d.ts +15 -18
  144. package/esm/operations/usages.d.ts.map +1 -1
  145. package/esm/operations/usages.js +73 -34
  146. package/esm/operations/usages.js.map +1 -1
  147. package/esm/operationsInterfaces/blobContainers.d.ts +247 -0
  148. package/esm/operationsInterfaces/blobContainers.d.ts.map +1 -0
  149. package/{src/models/usagesMappers.ts → esm/operationsInterfaces/blobContainers.js} +2 -7
  150. package/esm/operationsInterfaces/blobContainers.js.map +1 -0
  151. package/esm/operationsInterfaces/blobInventoryPolicies.d.ts +54 -0
  152. package/esm/operationsInterfaces/blobInventoryPolicies.d.ts.map +1 -0
  153. package/esm/{models/usagesMappers.js → operationsInterfaces/blobInventoryPolicies.js} +2 -2
  154. package/esm/operationsInterfaces/blobInventoryPolicies.js.map +1 -0
  155. package/esm/operationsInterfaces/blobServices.d.ts +41 -0
  156. package/esm/operationsInterfaces/blobServices.d.ts.map +1 -0
  157. package/{src/models/skusMappers.ts → esm/operationsInterfaces/blobServices.js} +2 -8
  158. package/esm/operationsInterfaces/blobServices.js.map +1 -0
  159. package/esm/operationsInterfaces/deletedAccounts.d.ts +19 -0
  160. package/esm/operationsInterfaces/deletedAccounts.d.ts.map +1 -0
  161. package/esm/{models/skusMappers.js → operationsInterfaces/deletedAccounts.js} +2 -2
  162. package/esm/operationsInterfaces/deletedAccounts.js.map +1 -0
  163. package/esm/operationsInterfaces/encryptionScopes.d.ts +64 -0
  164. package/esm/operationsInterfaces/encryptionScopes.d.ts.map +1 -0
  165. package/esm/operationsInterfaces/encryptionScopes.js +9 -0
  166. package/esm/operationsInterfaces/encryptionScopes.js.map +1 -0
  167. package/esm/operationsInterfaces/fileServices.d.ts +39 -0
  168. package/esm/operationsInterfaces/fileServices.d.ts.map +1 -0
  169. package/esm/operationsInterfaces/fileServices.js +9 -0
  170. package/esm/operationsInterfaces/fileServices.js.map +1 -0
  171. package/esm/operationsInterfaces/fileShares.d.ts +102 -0
  172. package/esm/operationsInterfaces/fileShares.d.ts.map +1 -0
  173. package/esm/operationsInterfaces/fileShares.js +9 -0
  174. package/esm/operationsInterfaces/fileShares.js.map +1 -0
  175. package/esm/operationsInterfaces/index.d.ts +20 -0
  176. package/esm/operationsInterfaces/index.d.ts.map +1 -0
  177. package/esm/operationsInterfaces/index.js +27 -0
  178. package/esm/operationsInterfaces/index.js.map +1 -0
  179. package/esm/operationsInterfaces/managementPolicies.d.ts +42 -0
  180. package/esm/operationsInterfaces/managementPolicies.d.ts.map +1 -0
  181. package/esm/operationsInterfaces/managementPolicies.js +9 -0
  182. package/esm/operationsInterfaces/managementPolicies.js.map +1 -0
  183. package/esm/operationsInterfaces/objectReplicationPoliciesOperations.d.ts +61 -0
  184. package/esm/operationsInterfaces/objectReplicationPoliciesOperations.d.ts.map +1 -0
  185. package/esm/operationsInterfaces/objectReplicationPoliciesOperations.js +9 -0
  186. package/esm/operationsInterfaces/objectReplicationPoliciesOperations.js.map +1 -0
  187. package/esm/operationsInterfaces/operations.d.ts +12 -0
  188. package/esm/operationsInterfaces/operations.d.ts.map +1 -0
  189. package/esm/operationsInterfaces/operations.js +9 -0
  190. package/esm/operationsInterfaces/operations.js.map +1 -0
  191. package/esm/operationsInterfaces/privateEndpointConnections.d.ts +54 -0
  192. package/esm/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  193. package/esm/operationsInterfaces/privateEndpointConnections.js +9 -0
  194. package/esm/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  195. package/esm/operationsInterfaces/privateLinkResources.d.ts +15 -0
  196. package/esm/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
  197. package/esm/operationsInterfaces/privateLinkResources.js +9 -0
  198. package/esm/operationsInterfaces/privateLinkResources.js.map +1 -0
  199. package/esm/operationsInterfaces/queue.d.ts +71 -0
  200. package/esm/operationsInterfaces/queue.d.ts.map +1 -0
  201. package/esm/operationsInterfaces/queue.js +9 -0
  202. package/esm/operationsInterfaces/queue.js.map +1 -0
  203. package/esm/operationsInterfaces/queueServices.d.ts +39 -0
  204. package/esm/operationsInterfaces/queueServices.d.ts.map +1 -0
  205. package/esm/operationsInterfaces/queueServices.js +9 -0
  206. package/esm/operationsInterfaces/queueServices.js.map +1 -0
  207. package/esm/operationsInterfaces/skus.d.ts +12 -0
  208. package/esm/operationsInterfaces/skus.d.ts.map +1 -0
  209. package/esm/operationsInterfaces/skus.js +9 -0
  210. package/esm/operationsInterfaces/skus.js.map +1 -0
  211. package/esm/operationsInterfaces/storageAccounts.d.ts +197 -0
  212. package/esm/operationsInterfaces/storageAccounts.d.ts.map +1 -0
  213. package/esm/operationsInterfaces/storageAccounts.js +9 -0
  214. package/esm/operationsInterfaces/storageAccounts.js.map +1 -0
  215. package/esm/operationsInterfaces/tableOperations.d.ts +69 -0
  216. package/esm/operationsInterfaces/tableOperations.d.ts.map +1 -0
  217. package/esm/operationsInterfaces/tableOperations.js +9 -0
  218. package/esm/operationsInterfaces/tableOperations.js.map +1 -0
  219. package/esm/operationsInterfaces/tableServices.d.ts +39 -0
  220. package/esm/operationsInterfaces/tableServices.d.ts.map +1 -0
  221. package/esm/operationsInterfaces/tableServices.js +9 -0
  222. package/esm/operationsInterfaces/tableServices.js.map +1 -0
  223. package/esm/operationsInterfaces/usages.d.ts +13 -0
  224. package/esm/operationsInterfaces/usages.d.ts.map +1 -0
  225. package/esm/operationsInterfaces/usages.js +9 -0
  226. package/esm/operationsInterfaces/usages.js.map +1 -0
  227. package/esm/storageManagementClient.d.ts +26 -35
  228. package/esm/storageManagementClient.d.ts.map +1 -1
  229. package/esm/storageManagementClient.js +27 -42
  230. package/esm/storageManagementClient.js.map +1 -1
  231. package/esm/storageManagementClientContext.d.ts +10 -16
  232. package/esm/storageManagementClientContext.d.ts.map +1 -1
  233. package/esm/storageManagementClientContext.js +32 -44
  234. package/esm/storageManagementClientContext.js.map +1 -1
  235. package/package.json +57 -18
  236. package/review/arm-storage.api.md +2659 -0
  237. package/rollup.config.js +181 -30
  238. package/src/coreClientLro.ts +323 -0
  239. package/src/index.ts +13 -0
  240. package/src/lro/azureAsyncPolling.ts +96 -0
  241. package/src/lro/bodyPolling.ts +54 -0
  242. package/src/lro/index.ts +26 -0
  243. package/src/lro/locationPolling.ts +30 -0
  244. package/src/lro/lroEngine.ts +61 -0
  245. package/src/lro/models.ts +173 -0
  246. package/src/lro/operation.ts +120 -0
  247. package/src/lro/passthrough.ts +23 -0
  248. package/src/lro/requestUtils.ts +105 -0
  249. package/src/lro/stateMachine.ts +138 -0
  250. package/src/models/index.ts +2813 -4492
  251. package/src/models/mappers.ts +2745 -2553
  252. package/src/models/parameters.ts +354 -160
  253. package/src/operations/blobContainers.ts +719 -1037
  254. package/src/operations/blobInventoryPolicies.ts +182 -211
  255. package/src/operations/blobServices.ts +150 -177
  256. package/src/operations/deletedAccounts.ts +111 -112
  257. package/src/operations/encryptionScopes.ts +233 -291
  258. package/src/operations/fileServices.ts +99 -171
  259. package/src/operations/fileShares.ts +335 -560
  260. package/src/operations/index.ts +1 -2
  261. package/src/operations/managementPolicies.ts +102 -175
  262. package/src/operations/objectReplicationPoliciesOperations.ts +187 -227
  263. package/src/operations/operations.ts +61 -38
  264. package/src/operations/privateEndpointConnections.ts +177 -214
  265. package/src/operations/privateLinkResources.ts +37 -60
  266. package/src/operations/queue.ts +269 -365
  267. package/src/operations/queueServices.ts +103 -173
  268. package/src/operations/skus.ts +59 -41
  269. package/src/operations/storageAccounts.ts +779 -872
  270. package/src/operations/tableOperations.ts +255 -328
  271. package/src/operations/tableServices.ts +103 -173
  272. package/src/operations/usages.ts +73 -45
  273. package/src/operationsInterfaces/blobContainers.ts +366 -0
  274. package/src/operationsInterfaces/blobInventoryPolicies.ts +92 -0
  275. package/src/operationsInterfaces/blobServices.ts +70 -0
  276. package/src/operationsInterfaces/deletedAccounts.ts +39 -0
  277. package/src/operationsInterfaces/encryptionScopes.ts +103 -0
  278. package/src/operationsInterfaces/fileServices.ts +68 -0
  279. package/src/operationsInterfaces/fileShares.ts +163 -0
  280. package/src/operationsInterfaces/index.ts +27 -0
  281. package/src/operationsInterfaces/managementPolicies.ts +74 -0
  282. package/src/operationsInterfaces/objectReplicationPoliciesOperations.ts +98 -0
  283. package/src/operationsInterfaces/operations.ts +23 -0
  284. package/src/operationsInterfaces/privateEndpointConnections.ts +91 -0
  285. package/src/operationsInterfaces/privateLinkResources.ts +30 -0
  286. package/src/operationsInterfaces/queue.ts +117 -0
  287. package/src/operationsInterfaces/queueServices.ts +68 -0
  288. package/src/operationsInterfaces/skus.ts +23 -0
  289. package/src/operationsInterfaces/storageAccounts.ts +320 -0
  290. package/src/operationsInterfaces/tableOperations.ts +112 -0
  291. package/src/operationsInterfaces/tableServices.ts +68 -0
  292. package/src/operationsInterfaces/usages.ts +25 -0
  293. package/src/storageManagementClient.ts +94 -67
  294. package/src/storageManagementClientContext.ts +42 -46
  295. package/tsconfig.json +2 -1
  296. package/dist/arm-storage.js +0 -10687
  297. package/dist/arm-storage.js.map +0 -1
  298. package/dist/arm-storage.min.js +0 -1
  299. package/dist/arm-storage.min.js.map +0 -1
  300. package/esm/models/blobContainersMappers.d.ts +0 -2
  301. package/esm/models/blobContainersMappers.d.ts.map +0 -1
  302. package/esm/models/blobContainersMappers.js +0 -9
  303. package/esm/models/blobContainersMappers.js.map +0 -1
  304. package/esm/models/blobInventoryPoliciesMappers.d.ts +0 -2
  305. package/esm/models/blobInventoryPoliciesMappers.d.ts.map +0 -1
  306. package/esm/models/blobInventoryPoliciesMappers.js +0 -9
  307. package/esm/models/blobInventoryPoliciesMappers.js.map +0 -1
  308. package/esm/models/blobServicesMappers.d.ts +0 -2
  309. package/esm/models/blobServicesMappers.d.ts.map +0 -1
  310. package/esm/models/blobServicesMappers.js +0 -9
  311. package/esm/models/blobServicesMappers.js.map +0 -1
  312. package/esm/models/deletedAccountsMappers.d.ts +0 -2
  313. package/esm/models/deletedAccountsMappers.d.ts.map +0 -1
  314. package/esm/models/deletedAccountsMappers.js +0 -9
  315. package/esm/models/deletedAccountsMappers.js.map +0 -1
  316. package/esm/models/encryptionScopesMappers.d.ts +0 -2
  317. package/esm/models/encryptionScopesMappers.d.ts.map +0 -1
  318. package/esm/models/encryptionScopesMappers.js +0 -9
  319. package/esm/models/encryptionScopesMappers.js.map +0 -1
  320. package/esm/models/fileServicesMappers.d.ts +0 -2
  321. package/esm/models/fileServicesMappers.d.ts.map +0 -1
  322. package/esm/models/fileServicesMappers.js +0 -9
  323. package/esm/models/fileServicesMappers.js.map +0 -1
  324. package/esm/models/fileSharesMappers.d.ts +0 -2
  325. package/esm/models/fileSharesMappers.d.ts.map +0 -1
  326. package/esm/models/fileSharesMappers.js +0 -9
  327. package/esm/models/fileSharesMappers.js.map +0 -1
  328. package/esm/models/managementPoliciesMappers.d.ts +0 -2
  329. package/esm/models/managementPoliciesMappers.d.ts.map +0 -1
  330. package/esm/models/managementPoliciesMappers.js +0 -9
  331. package/esm/models/managementPoliciesMappers.js.map +0 -1
  332. package/esm/models/objectReplicationPoliciesOperationsMappers.d.ts +0 -2
  333. package/esm/models/objectReplicationPoliciesOperationsMappers.d.ts.map +0 -1
  334. package/esm/models/objectReplicationPoliciesOperationsMappers.js +0 -9
  335. package/esm/models/objectReplicationPoliciesOperationsMappers.js.map +0 -1
  336. package/esm/models/operationsMappers.d.ts +0 -2
  337. package/esm/models/operationsMappers.d.ts.map +0 -1
  338. package/esm/models/operationsMappers.js.map +0 -1
  339. package/esm/models/privateEndpointConnectionsMappers.d.ts +0 -2
  340. package/esm/models/privateEndpointConnectionsMappers.d.ts.map +0 -1
  341. package/esm/models/privateEndpointConnectionsMappers.js +0 -9
  342. package/esm/models/privateEndpointConnectionsMappers.js.map +0 -1
  343. package/esm/models/privateLinkResourcesMappers.d.ts +0 -2
  344. package/esm/models/privateLinkResourcesMappers.d.ts.map +0 -1
  345. package/esm/models/privateLinkResourcesMappers.js +0 -9
  346. package/esm/models/privateLinkResourcesMappers.js.map +0 -1
  347. package/esm/models/queueMappers.d.ts +0 -2
  348. package/esm/models/queueMappers.d.ts.map +0 -1
  349. package/esm/models/queueMappers.js +0 -9
  350. package/esm/models/queueMappers.js.map +0 -1
  351. package/esm/models/queueServicesMappers.d.ts +0 -2
  352. package/esm/models/queueServicesMappers.d.ts.map +0 -1
  353. package/esm/models/queueServicesMappers.js +0 -9
  354. package/esm/models/queueServicesMappers.js.map +0 -1
  355. package/esm/models/skusMappers.d.ts +0 -2
  356. package/esm/models/skusMappers.d.ts.map +0 -1
  357. package/esm/models/skusMappers.js.map +0 -1
  358. package/esm/models/storageAccountsMappers.d.ts +0 -2
  359. package/esm/models/storageAccountsMappers.d.ts.map +0 -1
  360. package/esm/models/storageAccountsMappers.js +0 -9
  361. package/esm/models/storageAccountsMappers.js.map +0 -1
  362. package/esm/models/tableOperationsMappers.d.ts +0 -2
  363. package/esm/models/tableOperationsMappers.d.ts.map +0 -1
  364. package/esm/models/tableOperationsMappers.js +0 -9
  365. package/esm/models/tableOperationsMappers.js.map +0 -1
  366. package/esm/models/tableServicesMappers.d.ts +0 -2
  367. package/esm/models/tableServicesMappers.d.ts.map +0 -1
  368. package/esm/models/tableServicesMappers.js +0 -9
  369. package/esm/models/tableServicesMappers.js.map +0 -1
  370. package/esm/models/usagesMappers.d.ts +0 -2
  371. package/esm/models/usagesMappers.d.ts.map +0 -1
  372. package/esm/models/usagesMappers.js.map +0 -1
  373. package/src/models/blobContainersMappers.ts +0 -106
  374. package/src/models/blobInventoryPoliciesMappers.ts +0 -99
  375. package/src/models/blobServicesMappers.ts +0 -98
  376. package/src/models/deletedAccountsMappers.ts +0 -99
  377. package/src/models/encryptionScopesMappers.ts +0 -100
  378. package/src/models/fileServicesMappers.ts +0 -98
  379. package/src/models/fileSharesMappers.ts +0 -99
  380. package/src/models/managementPoliciesMappers.ts +0 -97
  381. package/src/models/objectReplicationPoliciesOperationsMappers.ts +0 -99
  382. package/src/models/privateEndpointConnectionsMappers.ts +0 -100
  383. package/src/models/privateLinkResourcesMappers.ts +0 -98
  384. package/src/models/queueMappers.ts +0 -98
  385. package/src/models/queueServicesMappers.ts +0 -98
  386. package/src/models/storageAccountsMappers.ts +0 -109
  387. package/src/models/tableOperationsMappers.ts +0 -98
  388. package/src/models/tableServicesMappers.ts +0 -98
@@ -3,1106 +3,1013 @@
3
3
  * Licensed under the MIT License.
4
4
  *
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is
7
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
7
  */
9
8
 
10
- import * as msRest from "@azure/ms-rest-js";
11
- import * as msRestAzure from "@azure/ms-rest-azure-js";
12
- import * as Models from "../models";
13
- import * as Mappers from "../models/storageAccountsMappers";
9
+ import "@azure/core-paging";
10
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
11
+ import { StorageAccounts } from "../operationsInterfaces";
12
+ import * as coreClient from "@azure/core-client";
13
+ import * as Mappers from "../models/mappers";
14
14
  import * as Parameters from "../models/parameters";
15
15
  import { StorageManagementClientContext } from "../storageManagementClientContext";
16
-
16
+ import { PollerLike, PollOperationState } from "@azure/core-lro";
17
+ import { LroEngine } from "../lro";
18
+ import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro";
19
+ import {
20
+ StorageAccount,
21
+ StorageAccountsListNextOptionalParams,
22
+ StorageAccountsListOptionalParams,
23
+ StorageAccountsListByResourceGroupNextOptionalParams,
24
+ StorageAccountsListByResourceGroupOptionalParams,
25
+ StorageAccountCheckNameAvailabilityParameters,
26
+ StorageAccountsCheckNameAvailabilityOptionalParams,
27
+ StorageAccountsCheckNameAvailabilityResponse,
28
+ StorageAccountCreateParameters,
29
+ StorageAccountsCreateOptionalParams,
30
+ StorageAccountsCreateResponse,
31
+ StorageAccountsDeleteOptionalParams,
32
+ StorageAccountsGetPropertiesOptionalParams,
33
+ StorageAccountsGetPropertiesResponse,
34
+ StorageAccountUpdateParameters,
35
+ StorageAccountsUpdateOptionalParams,
36
+ StorageAccountsUpdateResponse,
37
+ StorageAccountsListResponse,
38
+ StorageAccountsListByResourceGroupResponse,
39
+ StorageAccountsListKeysOptionalParams,
40
+ StorageAccountsListKeysResponse,
41
+ StorageAccountRegenerateKeyParameters,
42
+ StorageAccountsRegenerateKeyOptionalParams,
43
+ StorageAccountsRegenerateKeyResponse,
44
+ AccountSasParameters,
45
+ StorageAccountsListAccountSASOptionalParams,
46
+ StorageAccountsListAccountSASResponse,
47
+ ServiceSasParameters,
48
+ StorageAccountsListServiceSASOptionalParams,
49
+ StorageAccountsListServiceSASResponse,
50
+ StorageAccountsFailoverOptionalParams,
51
+ BlobRestoreParameters,
52
+ StorageAccountsRestoreBlobRangesOptionalParams,
53
+ StorageAccountsRestoreBlobRangesResponse,
54
+ StorageAccountsRevokeUserDelegationKeysOptionalParams,
55
+ StorageAccountsListNextResponse,
56
+ StorageAccountsListByResourceGroupNextResponse
57
+ } from "../models";
58
+
59
+ /// <reference lib="esnext.asynciterable" />
17
60
  /** Class representing a StorageAccounts. */
18
- export class StorageAccounts {
61
+ export class StorageAccountsImpl implements StorageAccounts {
19
62
  private readonly client: StorageManagementClientContext;
20
63
 
21
64
  /**
22
- * Create a StorageAccounts.
23
- * @param {StorageManagementClientContext} client Reference to the service client.
65
+ * Initialize a new instance of the class StorageAccounts class.
66
+ * @param client Reference to the service client
24
67
  */
25
68
  constructor(client: StorageManagementClientContext) {
26
69
  this.client = client;
27
70
  }
28
71
 
29
72
  /**
30
- * Checks that the storage account name is valid and is not already in use.
31
- * @param name The storage account name.
32
- * @param [options] The optional parameters
33
- * @returns Promise<Models.StorageAccountsCheckNameAvailabilityResponse>
34
- */
35
- checkNameAvailability(name: string, options?: msRest.RequestOptionsBase): Promise<Models.StorageAccountsCheckNameAvailabilityResponse>;
36
- /**
37
- * @param name The storage account name.
38
- * @param callback The callback
39
- */
40
- checkNameAvailability(name: string, callback: msRest.ServiceCallback<Models.CheckNameAvailabilityResult>): void;
73
+ * Lists all the storage accounts available under the subscription. Note that storage keys are not
74
+ * returned; use the ListKeys operation for this.
75
+ * @param options The options parameters.
76
+ */
77
+ public list(
78
+ options?: StorageAccountsListOptionalParams
79
+ ): PagedAsyncIterableIterator<StorageAccount> {
80
+ const iter = this.listPagingAll(options);
81
+ return {
82
+ next() {
83
+ return iter.next();
84
+ },
85
+ [Symbol.asyncIterator]() {
86
+ return this;
87
+ },
88
+ byPage: () => {
89
+ return this.listPagingPage(options);
90
+ }
91
+ };
92
+ }
93
+
94
+ private async *listPagingPage(
95
+ options?: StorageAccountsListOptionalParams
96
+ ): AsyncIterableIterator<StorageAccount[]> {
97
+ let result = await this._list(options);
98
+ yield result.value || [];
99
+ let continuationToken = result.nextLink;
100
+ while (continuationToken) {
101
+ result = await this._listNext(continuationToken, options);
102
+ continuationToken = result.nextLink;
103
+ yield result.value || [];
104
+ }
105
+ }
106
+
107
+ private async *listPagingAll(
108
+ options?: StorageAccountsListOptionalParams
109
+ ): AsyncIterableIterator<StorageAccount> {
110
+ for await (const page of this.listPagingPage(options)) {
111
+ yield* page;
112
+ }
113
+ }
114
+
41
115
  /**
42
- * @param name The storage account name.
43
- * @param options The optional parameters
44
- * @param callback The callback
45
- */
46
- checkNameAvailability(name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.CheckNameAvailabilityResult>): void;
47
- checkNameAvailability(name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.CheckNameAvailabilityResult>, callback?: msRest.ServiceCallback<Models.CheckNameAvailabilityResult>): Promise<Models.StorageAccountsCheckNameAvailabilityResponse> {
48
- return this.client.sendOperationRequest(
49
- {
50
- name,
51
- options
116
+ * Lists all the storage accounts available under the given resource group. Note that storage keys are
117
+ * not returned; use the ListKeys operation for this.
118
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
119
+ * case insensitive.
120
+ * @param options The options parameters.
121
+ */
122
+ public listByResourceGroup(
123
+ resourceGroupName: string,
124
+ options?: StorageAccountsListByResourceGroupOptionalParams
125
+ ): PagedAsyncIterableIterator<StorageAccount> {
126
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
127
+ return {
128
+ next() {
129
+ return iter.next();
130
+ },
131
+ [Symbol.asyncIterator]() {
132
+ return this;
52
133
  },
53
- checkNameAvailabilityOperationSpec,
54
- callback) as Promise<Models.StorageAccountsCheckNameAvailabilityResponse>;
134
+ byPage: () => {
135
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
136
+ }
137
+ };
138
+ }
139
+
140
+ private async *listByResourceGroupPagingPage(
141
+ resourceGroupName: string,
142
+ options?: StorageAccountsListByResourceGroupOptionalParams
143
+ ): AsyncIterableIterator<StorageAccount[]> {
144
+ let result = await this._listByResourceGroup(resourceGroupName, options);
145
+ yield result.value || [];
146
+ let continuationToken = result.nextLink;
147
+ while (continuationToken) {
148
+ result = await this._listByResourceGroupNext(
149
+ resourceGroupName,
150
+ continuationToken,
151
+ options
152
+ );
153
+ continuationToken = result.nextLink;
154
+ yield result.value || [];
155
+ }
156
+ }
157
+
158
+ private async *listByResourceGroupPagingAll(
159
+ resourceGroupName: string,
160
+ options?: StorageAccountsListByResourceGroupOptionalParams
161
+ ): AsyncIterableIterator<StorageAccount> {
162
+ for await (const page of this.listByResourceGroupPagingPage(
163
+ resourceGroupName,
164
+ options
165
+ )) {
166
+ yield* page;
167
+ }
55
168
  }
56
169
 
57
170
  /**
58
- * Asynchronously creates a new storage account with the specified parameters. If an account is
59
- * already created and a subsequent create request is issued with different properties, the account
60
- * properties will be updated. If an account is already created and a subsequent create or update
61
- * request is issued with the exact same set of properties, the request will succeed.
62
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
63
- * is case insensitive.
171
+ * Checks that the storage account name is valid and is not already in use.
64
172
  * @param accountName The name of the storage account within the specified resource group. Storage
65
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
66
- * letters only.
67
- * @param parameters The parameters to provide for the created account.
68
- * @param [options] The optional parameters
69
- * @returns Promise<Models.StorageAccountsCreateResponse>
70
- */
71
- create(resourceGroupName: string, accountName: string, parameters: Models.StorageAccountCreateParameters, options?: msRest.RequestOptionsBase): Promise<Models.StorageAccountsCreateResponse> {
72
- return this.beginCreate(resourceGroupName,accountName,parameters,options)
73
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.StorageAccountsCreateResponse>;
173
+ * account names must be between 3 and 24 characters in length and use numbers and lower-case letters
174
+ * only.
175
+ * @param options The options parameters.
176
+ */
177
+ checkNameAvailability(
178
+ accountName: StorageAccountCheckNameAvailabilityParameters,
179
+ options?: StorageAccountsCheckNameAvailabilityOptionalParams
180
+ ): Promise<StorageAccountsCheckNameAvailabilityResponse> {
181
+ return this.client.sendOperationRequest(
182
+ { accountName, options },
183
+ checkNameAvailabilityOperationSpec
184
+ );
74
185
  }
75
186
 
76
187
  /**
77
- * Deletes a storage account in Microsoft Azure.
78
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
79
- * is case insensitive.
188
+ * Asynchronously creates a new storage account with the specified parameters. If an account is already
189
+ * created and a subsequent create request is issued with different properties, the account properties
190
+ * will be updated. If an account is already created and a subsequent create or update request is
191
+ * issued with the exact same set of properties, the request will succeed.
192
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
193
+ * case insensitive.
80
194
  * @param accountName The name of the storage account within the specified resource group. Storage
81
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
82
- * letters only.
83
- * @param [options] The optional parameters
84
- * @returns Promise<msRest.RestResponse>
85
- */
86
- deleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse>;
195
+ * account names must be between 3 and 24 characters in length and use numbers and lower-case letters
196
+ * only.
197
+ * @param parameters The parameters to provide for the created account.
198
+ * @param options The options parameters.
199
+ */
200
+ async beginCreate(
201
+ resourceGroupName: string,
202
+ accountName: string,
203
+ parameters: StorageAccountCreateParameters,
204
+ options?: StorageAccountsCreateOptionalParams
205
+ ): Promise<
206
+ PollerLike<
207
+ PollOperationState<StorageAccountsCreateResponse>,
208
+ StorageAccountsCreateResponse
209
+ >
210
+ > {
211
+ const directSendOperation = async (
212
+ args: coreClient.OperationArguments,
213
+ spec: coreClient.OperationSpec
214
+ ): Promise<StorageAccountsCreateResponse> => {
215
+ return this.client.sendOperationRequest(args, spec);
216
+ };
217
+ const sendOperation = async (
218
+ args: coreClient.OperationArguments,
219
+ spec: coreClient.OperationSpec
220
+ ) => {
221
+ let currentRawResponse:
222
+ | coreClient.FullOperationResponse
223
+ | undefined = undefined;
224
+ const providedCallback = args.options?.onResponse;
225
+ const callback: coreClient.RawResponseCallback = (
226
+ rawResponse: coreClient.FullOperationResponse,
227
+ flatResponse: unknown
228
+ ) => {
229
+ currentRawResponse = rawResponse;
230
+ providedCallback?.(rawResponse, flatResponse);
231
+ };
232
+ const updatedArgs = {
233
+ ...args,
234
+ options: {
235
+ ...args.options,
236
+ onResponse: callback
237
+ }
238
+ };
239
+ const flatResponse = await directSendOperation(updatedArgs, spec);
240
+ return {
241
+ flatResponse,
242
+ rawResponse: {
243
+ statusCode: currentRawResponse!.status,
244
+ body: currentRawResponse!.parsedBody,
245
+ headers: currentRawResponse!.headers.toJSON()
246
+ }
247
+ };
248
+ };
249
+
250
+ const lro = new CoreClientLro(
251
+ sendOperation,
252
+ { resourceGroupName, accountName, parameters, options },
253
+ createOperationSpec
254
+ );
255
+ return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs });
256
+ }
257
+
87
258
  /**
88
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
89
- * is case insensitive.
259
+ * Asynchronously creates a new storage account with the specified parameters. If an account is already
260
+ * created and a subsequent create request is issued with different properties, the account properties
261
+ * will be updated. If an account is already created and a subsequent create or update request is
262
+ * issued with the exact same set of properties, the request will succeed.
263
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
264
+ * case insensitive.
90
265
  * @param accountName The name of the storage account within the specified resource group. Storage
91
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
92
- * letters only.
93
- * @param callback The callback
94
- */
95
- deleteMethod(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback<void>): void;
266
+ * account names must be between 3 and 24 characters in length and use numbers and lower-case letters
267
+ * only.
268
+ * @param parameters The parameters to provide for the created account.
269
+ * @param options The options parameters.
270
+ */
271
+ async beginCreateAndWait(
272
+ resourceGroupName: string,
273
+ accountName: string,
274
+ parameters: StorageAccountCreateParameters,
275
+ options?: StorageAccountsCreateOptionalParams
276
+ ): Promise<StorageAccountsCreateResponse> {
277
+ const poller = await this.beginCreate(
278
+ resourceGroupName,
279
+ accountName,
280
+ parameters,
281
+ options
282
+ );
283
+ return poller.pollUntilDone();
284
+ }
285
+
96
286
  /**
97
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
98
- * is case insensitive.
287
+ * Deletes a storage account in Microsoft Azure.
288
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
289
+ * case insensitive.
99
290
  * @param accountName The name of the storage account within the specified resource group. Storage
100
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
101
- * letters only.
102
- * @param options The optional parameters
103
- * @param callback The callback
104
- */
105
- deleteMethod(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
106
- deleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
291
+ * account names must be between 3 and 24 characters in length and use numbers and lower-case letters
292
+ * only.
293
+ * @param options The options parameters.
294
+ */
295
+ delete(
296
+ resourceGroupName: string,
297
+ accountName: string,
298
+ options?: StorageAccountsDeleteOptionalParams
299
+ ): Promise<void> {
107
300
  return this.client.sendOperationRequest(
108
- {
109
- resourceGroupName,
110
- accountName,
111
- options
112
- },
113
- deleteMethodOperationSpec,
114
- callback);
301
+ { resourceGroupName, accountName, options },
302
+ deleteOperationSpec
303
+ );
115
304
  }
116
305
 
117
306
  /**
118
307
  * Returns the properties for the specified storage account including but not limited to name, SKU
119
- * name, location, and account status. The ListKeys operation should be used to retrieve storage
120
- * keys.
121
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
122
- * is case insensitive.
123
- * @param accountName The name of the storage account within the specified resource group. Storage
124
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
125
- * letters only.
126
- * @param [options] The optional parameters
127
- * @returns Promise<Models.StorageAccountsGetPropertiesResponse>
128
- */
129
- getProperties(resourceGroupName: string, accountName: string, options?: Models.StorageAccountsGetPropertiesOptionalParams): Promise<Models.StorageAccountsGetPropertiesResponse>;
130
- /**
131
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
132
- * is case insensitive.
133
- * @param accountName The name of the storage account within the specified resource group. Storage
134
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
135
- * letters only.
136
- * @param callback The callback
137
- */
138
- getProperties(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback<Models.StorageAccount>): void;
139
- /**
140
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
141
- * is case insensitive.
308
+ * name, location, and account status. The ListKeys operation should be used to retrieve storage keys.
309
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
310
+ * case insensitive.
142
311
  * @param accountName The name of the storage account within the specified resource group. Storage
143
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
144
- * letters only.
145
- * @param options The optional parameters
146
- * @param callback The callback
147
- */
148
- getProperties(resourceGroupName: string, accountName: string, options: Models.StorageAccountsGetPropertiesOptionalParams, callback: msRest.ServiceCallback<Models.StorageAccount>): void;
149
- getProperties(resourceGroupName: string, accountName: string, options?: Models.StorageAccountsGetPropertiesOptionalParams | msRest.ServiceCallback<Models.StorageAccount>, callback?: msRest.ServiceCallback<Models.StorageAccount>): Promise<Models.StorageAccountsGetPropertiesResponse> {
312
+ * account names must be between 3 and 24 characters in length and use numbers and lower-case letters
313
+ * only.
314
+ * @param options The options parameters.
315
+ */
316
+ getProperties(
317
+ resourceGroupName: string,
318
+ accountName: string,
319
+ options?: StorageAccountsGetPropertiesOptionalParams
320
+ ): Promise<StorageAccountsGetPropertiesResponse> {
150
321
  return this.client.sendOperationRequest(
151
- {
152
- resourceGroupName,
153
- accountName,
154
- options
155
- },
156
- getPropertiesOperationSpec,
157
- callback) as Promise<Models.StorageAccountsGetPropertiesResponse>;
322
+ { resourceGroupName, accountName, options },
323
+ getPropertiesOperationSpec
324
+ );
158
325
  }
159
326
 
160
327
  /**
161
- * The update operation can be used to update the SKU, encryption, access tier, or tags for a
162
- * storage account. It can also be used to map the account to a custom domain. Only one custom
163
- * domain is supported per storage account; the replacement/change of custom domain is not
164
- * supported. In order to replace an old custom domain, the old value must be cleared/unregistered
165
- * before a new value can be set. The update of multiple properties is supported. This call does
166
- * not change the storage keys for the account. If you want to change the storage account keys, use
167
- * the regenerate keys operation. The location and name of the storage account cannot be changed
168
- * after creation.
169
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
170
- * is case insensitive.
328
+ * The update operation can be used to update the SKU, encryption, access tier, or tags for a storage
329
+ * account. It can also be used to map the account to a custom domain. Only one custom domain is
330
+ * supported per storage account; the replacement/change of custom domain is not supported. In order to
331
+ * replace an old custom domain, the old value must be cleared/unregistered before a new value can be
332
+ * set. The update of multiple properties is supported. This call does not change the storage keys for
333
+ * the account. If you want to change the storage account keys, use the regenerate keys operation. The
334
+ * location and name of the storage account cannot be changed after creation.
335
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
336
+ * case insensitive.
171
337
  * @param accountName The name of the storage account within the specified resource group. Storage
172
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
173
- * letters only.
338
+ * account names must be between 3 and 24 characters in length and use numbers and lower-case letters
339
+ * only.
174
340
  * @param parameters The parameters to provide for the updated account.
175
- * @param [options] The optional parameters
176
- * @returns Promise<Models.StorageAccountsUpdateResponse>
177
- */
178
- update(resourceGroupName: string, accountName: string, parameters: Models.StorageAccountUpdateParameters, options?: msRest.RequestOptionsBase): Promise<Models.StorageAccountsUpdateResponse>;
179
- /**
180
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
181
- * is case insensitive.
182
- * @param accountName The name of the storage account within the specified resource group. Storage
183
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
184
- * letters only.
185
- * @param parameters The parameters to provide for the updated account.
186
- * @param callback The callback
187
- */
188
- update(resourceGroupName: string, accountName: string, parameters: Models.StorageAccountUpdateParameters, callback: msRest.ServiceCallback<Models.StorageAccount>): void;
189
- /**
190
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
191
- * is case insensitive.
192
- * @param accountName The name of the storage account within the specified resource group. Storage
193
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
194
- * letters only.
195
- * @param parameters The parameters to provide for the updated account.
196
- * @param options The optional parameters
197
- * @param callback The callback
198
- */
199
- update(resourceGroupName: string, accountName: string, parameters: Models.StorageAccountUpdateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.StorageAccount>): void;
200
- update(resourceGroupName: string, accountName: string, parameters: Models.StorageAccountUpdateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.StorageAccount>, callback?: msRest.ServiceCallback<Models.StorageAccount>): Promise<Models.StorageAccountsUpdateResponse> {
341
+ * @param options The options parameters.
342
+ */
343
+ update(
344
+ resourceGroupName: string,
345
+ accountName: string,
346
+ parameters: StorageAccountUpdateParameters,
347
+ options?: StorageAccountsUpdateOptionalParams
348
+ ): Promise<StorageAccountsUpdateResponse> {
201
349
  return this.client.sendOperationRequest(
202
- {
203
- resourceGroupName,
204
- accountName,
205
- parameters,
206
- options
207
- },
208
- updateOperationSpec,
209
- callback) as Promise<Models.StorageAccountsUpdateResponse>;
350
+ { resourceGroupName, accountName, parameters, options },
351
+ updateOperationSpec
352
+ );
210
353
  }
211
354
 
212
355
  /**
213
356
  * Lists all the storage accounts available under the subscription. Note that storage keys are not
214
357
  * returned; use the ListKeys operation for this.
215
- * @param [options] The optional parameters
216
- * @returns Promise<Models.StorageAccountsListResponse>
217
- */
218
- list(options?: msRest.RequestOptionsBase): Promise<Models.StorageAccountsListResponse>;
219
- /**
220
- * @param callback The callback
358
+ * @param options The options parameters.
221
359
  */
222
- list(callback: msRest.ServiceCallback<Models.StorageAccountListResult>): void;
223
- /**
224
- * @param options The optional parameters
225
- * @param callback The callback
226
- */
227
- list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.StorageAccountListResult>): void;
228
- list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.StorageAccountListResult>, callback?: msRest.ServiceCallback<Models.StorageAccountListResult>): Promise<Models.StorageAccountsListResponse> {
229
- return this.client.sendOperationRequest(
230
- {
231
- options
232
- },
233
- listOperationSpec,
234
- callback) as Promise<Models.StorageAccountsListResponse>;
360
+ private _list(
361
+ options?: StorageAccountsListOptionalParams
362
+ ): Promise<StorageAccountsListResponse> {
363
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
235
364
  }
236
365
 
237
366
  /**
238
- * Lists all the storage accounts available under the given resource group. Note that storage keys
239
- * are not returned; use the ListKeys operation for this.
240
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
241
- * is case insensitive.
242
- * @param [options] The optional parameters
243
- * @returns Promise<Models.StorageAccountsListByResourceGroupResponse>
244
- */
245
- listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise<Models.StorageAccountsListByResourceGroupResponse>;
246
- /**
247
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
248
- * is case insensitive.
249
- * @param callback The callback
250
- */
251
- listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback<Models.StorageAccountListResult>): void;
252
- /**
253
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
254
- * is case insensitive.
255
- * @param options The optional parameters
256
- * @param callback The callback
367
+ * Lists all the storage accounts available under the given resource group. Note that storage keys are
368
+ * not returned; use the ListKeys operation for this.
369
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
370
+ * case insensitive.
371
+ * @param options The options parameters.
257
372
  */
258
- listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.StorageAccountListResult>): void;
259
- listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.StorageAccountListResult>, callback?: msRest.ServiceCallback<Models.StorageAccountListResult>): Promise<Models.StorageAccountsListByResourceGroupResponse> {
373
+ private _listByResourceGroup(
374
+ resourceGroupName: string,
375
+ options?: StorageAccountsListByResourceGroupOptionalParams
376
+ ): Promise<StorageAccountsListByResourceGroupResponse> {
260
377
  return this.client.sendOperationRequest(
261
- {
262
- resourceGroupName,
263
- options
264
- },
265
- listByResourceGroupOperationSpec,
266
- callback) as Promise<Models.StorageAccountsListByResourceGroupResponse>;
378
+ { resourceGroupName, options },
379
+ listByResourceGroupOperationSpec
380
+ );
267
381
  }
268
382
 
269
383
  /**
270
384
  * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage
271
385
  * account.
272
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
273
- * is case insensitive.
386
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
387
+ * case insensitive.
274
388
  * @param accountName The name of the storage account within the specified resource group. Storage
275
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
276
- * letters only.
277
- * @param [options] The optional parameters
278
- * @returns Promise<Models.StorageAccountsListKeysResponse>
279
- */
280
- listKeys(resourceGroupName: string, accountName: string, options?: Models.StorageAccountsListKeysOptionalParams): Promise<Models.StorageAccountsListKeysResponse>;
281
- /**
282
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
283
- * is case insensitive.
284
- * @param accountName The name of the storage account within the specified resource group. Storage
285
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
286
- * letters only.
287
- * @param callback The callback
288
- */
289
- listKeys(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback<Models.StorageAccountListKeysResult>): void;
290
- /**
291
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
292
- * is case insensitive.
293
- * @param accountName The name of the storage account within the specified resource group. Storage
294
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
295
- * letters only.
296
- * @param options The optional parameters
297
- * @param callback The callback
298
- */
299
- listKeys(resourceGroupName: string, accountName: string, options: Models.StorageAccountsListKeysOptionalParams, callback: msRest.ServiceCallback<Models.StorageAccountListKeysResult>): void;
300
- listKeys(resourceGroupName: string, accountName: string, options?: Models.StorageAccountsListKeysOptionalParams | msRest.ServiceCallback<Models.StorageAccountListKeysResult>, callback?: msRest.ServiceCallback<Models.StorageAccountListKeysResult>): Promise<Models.StorageAccountsListKeysResponse> {
389
+ * account names must be between 3 and 24 characters in length and use numbers and lower-case letters
390
+ * only.
391
+ * @param options The options parameters.
392
+ */
393
+ listKeys(
394
+ resourceGroupName: string,
395
+ accountName: string,
396
+ options?: StorageAccountsListKeysOptionalParams
397
+ ): Promise<StorageAccountsListKeysResponse> {
301
398
  return this.client.sendOperationRequest(
302
- {
303
- resourceGroupName,
304
- accountName,
305
- options
306
- },
307
- listKeysOperationSpec,
308
- callback) as Promise<Models.StorageAccountsListKeysResponse>;
399
+ { resourceGroupName, accountName, options },
400
+ listKeysOperationSpec
401
+ );
309
402
  }
310
403
 
311
404
  /**
312
405
  * Regenerates one of the access keys or Kerberos keys for the specified storage account.
313
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
314
- * is case insensitive.
315
- * @param accountName The name of the storage account within the specified resource group. Storage
316
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
317
- * letters only.
318
- * @param keyName The name of storage keys that want to be regenerated, possible values are key1,
319
- * key2, kerb1, kerb2.
320
- * @param [options] The optional parameters
321
- * @returns Promise<Models.StorageAccountsRegenerateKeyResponse>
322
- */
323
- regenerateKey(resourceGroupName: string, accountName: string, keyName: string, options?: msRest.RequestOptionsBase): Promise<Models.StorageAccountsRegenerateKeyResponse>;
324
- /**
325
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
326
- * is case insensitive.
406
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
407
+ * case insensitive.
327
408
  * @param accountName The name of the storage account within the specified resource group. Storage
328
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
329
- * letters only.
330
- * @param keyName The name of storage keys that want to be regenerated, possible values are key1,
331
- * key2, kerb1, kerb2.
332
- * @param callback The callback
333
- */
334
- regenerateKey(resourceGroupName: string, accountName: string, keyName: string, callback: msRest.ServiceCallback<Models.StorageAccountListKeysResult>): void;
335
- /**
336
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
337
- * is case insensitive.
338
- * @param accountName The name of the storage account within the specified resource group. Storage
339
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
340
- * letters only.
341
- * @param keyName The name of storage keys that want to be regenerated, possible values are key1,
342
- * key2, kerb1, kerb2.
343
- * @param options The optional parameters
344
- * @param callback The callback
345
- */
346
- regenerateKey(resourceGroupName: string, accountName: string, keyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.StorageAccountListKeysResult>): void;
347
- regenerateKey(resourceGroupName: string, accountName: string, keyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.StorageAccountListKeysResult>, callback?: msRest.ServiceCallback<Models.StorageAccountListKeysResult>): Promise<Models.StorageAccountsRegenerateKeyResponse> {
409
+ * account names must be between 3 and 24 characters in length and use numbers and lower-case letters
410
+ * only.
411
+ * @param regenerateKey Specifies name of the key which should be regenerated -- key1, key2, kerb1,
412
+ * kerb2.
413
+ * @param options The options parameters.
414
+ */
415
+ regenerateKey(
416
+ resourceGroupName: string,
417
+ accountName: string,
418
+ regenerateKey: StorageAccountRegenerateKeyParameters,
419
+ options?: StorageAccountsRegenerateKeyOptionalParams
420
+ ): Promise<StorageAccountsRegenerateKeyResponse> {
348
421
  return this.client.sendOperationRequest(
349
- {
350
- resourceGroupName,
351
- accountName,
352
- keyName,
353
- options
354
- },
355
- regenerateKeyOperationSpec,
356
- callback) as Promise<Models.StorageAccountsRegenerateKeyResponse>;
422
+ { resourceGroupName, accountName, regenerateKey, options },
423
+ regenerateKeyOperationSpec
424
+ );
357
425
  }
358
426
 
359
427
  /**
360
428
  * List SAS credentials of a storage account.
361
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
362
- * is case insensitive.
363
- * @param accountName The name of the storage account within the specified resource group. Storage
364
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
365
- * letters only.
366
- * @param parameters The parameters to provide to list SAS credentials for the storage account.
367
- * @param [options] The optional parameters
368
- * @returns Promise<Models.StorageAccountsListAccountSASResponse>
369
- */
370
- listAccountSAS(resourceGroupName: string, accountName: string, parameters: Models.AccountSasParameters, options?: msRest.RequestOptionsBase): Promise<Models.StorageAccountsListAccountSASResponse>;
371
- /**
372
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
373
- * is case insensitive.
429
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
430
+ * case insensitive.
374
431
  * @param accountName The name of the storage account within the specified resource group. Storage
375
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
376
- * letters only.
432
+ * account names must be between 3 and 24 characters in length and use numbers and lower-case letters
433
+ * only.
377
434
  * @param parameters The parameters to provide to list SAS credentials for the storage account.
378
- * @param callback The callback
379
- */
380
- listAccountSAS(resourceGroupName: string, accountName: string, parameters: Models.AccountSasParameters, callback: msRest.ServiceCallback<Models.ListAccountSasResponse>): void;
381
- /**
382
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
383
- * is case insensitive.
384
- * @param accountName The name of the storage account within the specified resource group. Storage
385
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
386
- * letters only.
387
- * @param parameters The parameters to provide to list SAS credentials for the storage account.
388
- * @param options The optional parameters
389
- * @param callback The callback
390
- */
391
- listAccountSAS(resourceGroupName: string, accountName: string, parameters: Models.AccountSasParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ListAccountSasResponse>): void;
392
- listAccountSAS(resourceGroupName: string, accountName: string, parameters: Models.AccountSasParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ListAccountSasResponse>, callback?: msRest.ServiceCallback<Models.ListAccountSasResponse>): Promise<Models.StorageAccountsListAccountSASResponse> {
435
+ * @param options The options parameters.
436
+ */
437
+ listAccountSAS(
438
+ resourceGroupName: string,
439
+ accountName: string,
440
+ parameters: AccountSasParameters,
441
+ options?: StorageAccountsListAccountSASOptionalParams
442
+ ): Promise<StorageAccountsListAccountSASResponse> {
393
443
  return this.client.sendOperationRequest(
394
- {
395
- resourceGroupName,
396
- accountName,
397
- parameters,
398
- options
399
- },
400
- listAccountSASOperationSpec,
401
- callback) as Promise<Models.StorageAccountsListAccountSASResponse>;
444
+ { resourceGroupName, accountName, parameters, options },
445
+ listAccountSASOperationSpec
446
+ );
402
447
  }
403
448
 
404
449
  /**
405
450
  * List service SAS credentials of a specific resource.
406
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
407
- * is case insensitive.
408
- * @param accountName The name of the storage account within the specified resource group. Storage
409
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
410
- * letters only.
411
- * @param parameters The parameters to provide to list service SAS credentials.
412
- * @param [options] The optional parameters
413
- * @returns Promise<Models.StorageAccountsListServiceSASResponse>
414
- */
415
- listServiceSAS(resourceGroupName: string, accountName: string, parameters: Models.ServiceSasParameters, options?: msRest.RequestOptionsBase): Promise<Models.StorageAccountsListServiceSASResponse>;
416
- /**
417
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
418
- * is case insensitive.
451
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
452
+ * case insensitive.
419
453
  * @param accountName The name of the storage account within the specified resource group. Storage
420
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
421
- * letters only.
454
+ * account names must be between 3 and 24 characters in length and use numbers and lower-case letters
455
+ * only.
422
456
  * @param parameters The parameters to provide to list service SAS credentials.
423
- * @param callback The callback
424
- */
425
- listServiceSAS(resourceGroupName: string, accountName: string, parameters: Models.ServiceSasParameters, callback: msRest.ServiceCallback<Models.ListServiceSasResponse>): void;
426
- /**
427
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
428
- * is case insensitive.
429
- * @param accountName The name of the storage account within the specified resource group. Storage
430
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
431
- * letters only.
432
- * @param parameters The parameters to provide to list service SAS credentials.
433
- * @param options The optional parameters
434
- * @param callback The callback
435
- */
436
- listServiceSAS(resourceGroupName: string, accountName: string, parameters: Models.ServiceSasParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ListServiceSasResponse>): void;
437
- listServiceSAS(resourceGroupName: string, accountName: string, parameters: Models.ServiceSasParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ListServiceSasResponse>, callback?: msRest.ServiceCallback<Models.ListServiceSasResponse>): Promise<Models.StorageAccountsListServiceSASResponse> {
457
+ * @param options The options parameters.
458
+ */
459
+ listServiceSAS(
460
+ resourceGroupName: string,
461
+ accountName: string,
462
+ parameters: ServiceSasParameters,
463
+ options?: StorageAccountsListServiceSASOptionalParams
464
+ ): Promise<StorageAccountsListServiceSASResponse> {
438
465
  return this.client.sendOperationRequest(
439
- {
440
- resourceGroupName,
441
- accountName,
442
- parameters,
443
- options
444
- },
445
- listServiceSASOperationSpec,
446
- callback) as Promise<Models.StorageAccountsListServiceSASResponse>;
466
+ { resourceGroupName, accountName, parameters, options },
467
+ listServiceSASOperationSpec
468
+ );
447
469
  }
448
470
 
449
471
  /**
450
- * Failover request can be triggered for a storage account in case of availability issues. The
451
- * failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS
452
- * accounts. The secondary cluster will become primary after failover.
453
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
454
- * is case insensitive.
472
+ * Failover request can be triggered for a storage account in case of availability issues. The failover
473
+ * occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The
474
+ * secondary cluster will become primary after failover.
475
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
476
+ * case insensitive.
455
477
  * @param accountName The name of the storage account within the specified resource group. Storage
456
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
457
- * letters only.
458
- * @param [options] The optional parameters
459
- * @returns Promise<msRest.RestResponse>
460
- */
461
- failover(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
462
- return this.beginFailover(resourceGroupName,accountName,options)
463
- .then(lroPoller => lroPoller.pollUntilFinished());
478
+ * account names must be between 3 and 24 characters in length and use numbers and lower-case letters
479
+ * only.
480
+ * @param options The options parameters.
481
+ */
482
+ async beginFailover(
483
+ resourceGroupName: string,
484
+ accountName: string,
485
+ options?: StorageAccountsFailoverOptionalParams
486
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
487
+ const directSendOperation = async (
488
+ args: coreClient.OperationArguments,
489
+ spec: coreClient.OperationSpec
490
+ ): Promise<void> => {
491
+ return this.client.sendOperationRequest(args, spec);
492
+ };
493
+ const sendOperation = async (
494
+ args: coreClient.OperationArguments,
495
+ spec: coreClient.OperationSpec
496
+ ) => {
497
+ let currentRawResponse:
498
+ | coreClient.FullOperationResponse
499
+ | undefined = undefined;
500
+ const providedCallback = args.options?.onResponse;
501
+ const callback: coreClient.RawResponseCallback = (
502
+ rawResponse: coreClient.FullOperationResponse,
503
+ flatResponse: unknown
504
+ ) => {
505
+ currentRawResponse = rawResponse;
506
+ providedCallback?.(rawResponse, flatResponse);
507
+ };
508
+ const updatedArgs = {
509
+ ...args,
510
+ options: {
511
+ ...args.options,
512
+ onResponse: callback
513
+ }
514
+ };
515
+ const flatResponse = await directSendOperation(updatedArgs, spec);
516
+ return {
517
+ flatResponse,
518
+ rawResponse: {
519
+ statusCode: currentRawResponse!.status,
520
+ body: currentRawResponse!.parsedBody,
521
+ headers: currentRawResponse!.headers.toJSON()
522
+ }
523
+ };
524
+ };
525
+
526
+ const lro = new CoreClientLro(
527
+ sendOperation,
528
+ { resourceGroupName, accountName, options },
529
+ failoverOperationSpec,
530
+ "location"
531
+ );
532
+ return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs });
464
533
  }
465
534
 
466
535
  /**
467
- * Restore blobs in the specified blob ranges
468
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
469
- * is case insensitive.
470
- * @param accountName The name of the storage account within the specified resource group. Storage
471
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
472
- * letters only.
473
- * @param timeToRestore Restore blob to the specified time.
474
- * @param blobRanges Blob ranges to restore.
475
- * @param [options] The optional parameters
476
- * @returns Promise<Models.StorageAccountsRestoreBlobRangesResponse>
477
- */
478
- restoreBlobRanges(resourceGroupName: string, accountName: string, timeToRestore: Date | string, blobRanges: Models.BlobRestoreRange[], options?: msRest.RequestOptionsBase): Promise<Models.StorageAccountsRestoreBlobRangesResponse> {
479
- return this.beginRestoreBlobRanges(resourceGroupName,accountName,timeToRestore,blobRanges,options)
480
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.StorageAccountsRestoreBlobRangesResponse>;
481
- }
482
-
483
- /**
484
- * Revoke user delegation keys.
485
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
486
- * is case insensitive.
487
- * @param accountName The name of the storage account within the specified resource group. Storage
488
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
489
- * letters only.
490
- * @param [options] The optional parameters
491
- * @returns Promise<msRest.RestResponse>
492
- */
493
- revokeUserDelegationKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse>;
494
- /**
495
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
496
- * is case insensitive.
497
- * @param accountName The name of the storage account within the specified resource group. Storage
498
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
499
- * letters only.
500
- * @param callback The callback
501
- */
502
- revokeUserDelegationKeys(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback<void>): void;
503
- /**
504
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
505
- * is case insensitive.
536
+ * Failover request can be triggered for a storage account in case of availability issues. The failover
537
+ * occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The
538
+ * secondary cluster will become primary after failover.
539
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
540
+ * case insensitive.
506
541
  * @param accountName The name of the storage account within the specified resource group. Storage
507
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
508
- * letters only.
509
- * @param options The optional parameters
510
- * @param callback The callback
511
- */
512
- revokeUserDelegationKeys(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
513
- revokeUserDelegationKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
514
- return this.client.sendOperationRequest(
515
- {
516
- resourceGroupName,
517
- accountName,
518
- options
519
- },
520
- revokeUserDelegationKeysOperationSpec,
521
- callback);
542
+ * account names must be between 3 and 24 characters in length and use numbers and lower-case letters
543
+ * only.
544
+ * @param options The options parameters.
545
+ */
546
+ async beginFailoverAndWait(
547
+ resourceGroupName: string,
548
+ accountName: string,
549
+ options?: StorageAccountsFailoverOptionalParams
550
+ ): Promise<void> {
551
+ const poller = await this.beginFailover(
552
+ resourceGroupName,
553
+ accountName,
554
+ options
555
+ );
556
+ return poller.pollUntilDone();
522
557
  }
523
558
 
524
559
  /**
525
- * Asynchronously creates a new storage account with the specified parameters. If an account is
526
- * already created and a subsequent create request is issued with different properties, the account
527
- * properties will be updated. If an account is already created and a subsequent create or update
528
- * request is issued with the exact same set of properties, the request will succeed.
529
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
530
- * is case insensitive.
560
+ * Restore blobs in the specified blob ranges
561
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
562
+ * case insensitive.
531
563
  * @param accountName The name of the storage account within the specified resource group. Storage
532
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
533
- * letters only.
534
- * @param parameters The parameters to provide for the created account.
535
- * @param [options] The optional parameters
536
- * @returns Promise<msRestAzure.LROPoller>
537
- */
538
- beginCreate(resourceGroupName: string, accountName: string, parameters: Models.StorageAccountCreateParameters, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
539
- return this.client.sendLRORequest(
540
- {
541
- resourceGroupName,
542
- accountName,
543
- parameters,
544
- options
545
- },
546
- beginCreateOperationSpec,
547
- options);
564
+ * account names must be between 3 and 24 characters in length and use numbers and lower-case letters
565
+ * only.
566
+ * @param parameters The parameters to provide for restore blob ranges.
567
+ * @param options The options parameters.
568
+ */
569
+ async beginRestoreBlobRanges(
570
+ resourceGroupName: string,
571
+ accountName: string,
572
+ parameters: BlobRestoreParameters,
573
+ options?: StorageAccountsRestoreBlobRangesOptionalParams
574
+ ): Promise<
575
+ PollerLike<
576
+ PollOperationState<StorageAccountsRestoreBlobRangesResponse>,
577
+ StorageAccountsRestoreBlobRangesResponse
578
+ >
579
+ > {
580
+ const directSendOperation = async (
581
+ args: coreClient.OperationArguments,
582
+ spec: coreClient.OperationSpec
583
+ ): Promise<StorageAccountsRestoreBlobRangesResponse> => {
584
+ return this.client.sendOperationRequest(args, spec);
585
+ };
586
+ const sendOperation = async (
587
+ args: coreClient.OperationArguments,
588
+ spec: coreClient.OperationSpec
589
+ ) => {
590
+ let currentRawResponse:
591
+ | coreClient.FullOperationResponse
592
+ | undefined = undefined;
593
+ const providedCallback = args.options?.onResponse;
594
+ const callback: coreClient.RawResponseCallback = (
595
+ rawResponse: coreClient.FullOperationResponse,
596
+ flatResponse: unknown
597
+ ) => {
598
+ currentRawResponse = rawResponse;
599
+ providedCallback?.(rawResponse, flatResponse);
600
+ };
601
+ const updatedArgs = {
602
+ ...args,
603
+ options: {
604
+ ...args.options,
605
+ onResponse: callback
606
+ }
607
+ };
608
+ const flatResponse = await directSendOperation(updatedArgs, spec);
609
+ return {
610
+ flatResponse,
611
+ rawResponse: {
612
+ statusCode: currentRawResponse!.status,
613
+ body: currentRawResponse!.parsedBody,
614
+ headers: currentRawResponse!.headers.toJSON()
615
+ }
616
+ };
617
+ };
618
+
619
+ const lro = new CoreClientLro(
620
+ sendOperation,
621
+ { resourceGroupName, accountName, parameters, options },
622
+ restoreBlobRangesOperationSpec,
623
+ "location"
624
+ );
625
+ return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs });
548
626
  }
549
627
 
550
628
  /**
551
- * Failover request can be triggered for a storage account in case of availability issues. The
552
- * failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS
553
- * accounts. The secondary cluster will become primary after failover.
554
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
555
- * is case insensitive.
629
+ * Restore blobs in the specified blob ranges
630
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
631
+ * case insensitive.
556
632
  * @param accountName The name of the storage account within the specified resource group. Storage
557
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
558
- * letters only.
559
- * @param [options] The optional parameters
560
- * @returns Promise<msRestAzure.LROPoller>
561
- */
562
- beginFailover(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
563
- return this.client.sendLRORequest(
564
- {
565
- resourceGroupName,
566
- accountName,
567
- options
568
- },
569
- beginFailoverOperationSpec,
570
- options);
633
+ * account names must be between 3 and 24 characters in length and use numbers and lower-case letters
634
+ * only.
635
+ * @param parameters The parameters to provide for restore blob ranges.
636
+ * @param options The options parameters.
637
+ */
638
+ async beginRestoreBlobRangesAndWait(
639
+ resourceGroupName: string,
640
+ accountName: string,
641
+ parameters: BlobRestoreParameters,
642
+ options?: StorageAccountsRestoreBlobRangesOptionalParams
643
+ ): Promise<StorageAccountsRestoreBlobRangesResponse> {
644
+ const poller = await this.beginRestoreBlobRanges(
645
+ resourceGroupName,
646
+ accountName,
647
+ parameters,
648
+ options
649
+ );
650
+ return poller.pollUntilDone();
571
651
  }
572
652
 
573
653
  /**
574
- * Restore blobs in the specified blob ranges
575
- * @param resourceGroupName The name of the resource group within the user's subscription. The name
576
- * is case insensitive.
654
+ * Revoke user delegation keys.
655
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
656
+ * case insensitive.
577
657
  * @param accountName The name of the storage account within the specified resource group. Storage
578
- * account names must be between 3 and 24 characters in length and use numbers and lower-case
579
- * letters only.
580
- * @param timeToRestore Restore blob to the specified time.
581
- * @param blobRanges Blob ranges to restore.
582
- * @param [options] The optional parameters
583
- * @returns Promise<msRestAzure.LROPoller>
584
- */
585
- beginRestoreBlobRanges(resourceGroupName: string, accountName: string, timeToRestore: Date | string, blobRanges: Models.BlobRestoreRange[], options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
586
- return this.client.sendLRORequest(
587
- {
588
- resourceGroupName,
589
- accountName,
590
- timeToRestore,
591
- blobRanges,
592
- options
593
- },
594
- beginRestoreBlobRangesOperationSpec,
595
- options);
658
+ * account names must be between 3 and 24 characters in length and use numbers and lower-case letters
659
+ * only.
660
+ * @param options The options parameters.
661
+ */
662
+ revokeUserDelegationKeys(
663
+ resourceGroupName: string,
664
+ accountName: string,
665
+ options?: StorageAccountsRevokeUserDelegationKeysOptionalParams
666
+ ): Promise<void> {
667
+ return this.client.sendOperationRequest(
668
+ { resourceGroupName, accountName, options },
669
+ revokeUserDelegationKeysOperationSpec
670
+ );
596
671
  }
597
672
 
598
673
  /**
599
- * Lists all the storage accounts available under the subscription. Note that storage keys are not
600
- * returned; use the ListKeys operation for this.
601
- * @param nextPageLink The NextLink from the previous successful call to List operation.
602
- * @param [options] The optional parameters
603
- * @returns Promise<Models.StorageAccountsListNextResponse>
604
- */
605
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.StorageAccountsListNextResponse>;
606
- /**
607
- * @param nextPageLink The NextLink from the previous successful call to List operation.
608
- * @param callback The callback
609
- */
610
- listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.StorageAccountListResult>): void;
611
- /**
612
- * @param nextPageLink The NextLink from the previous successful call to List operation.
613
- * @param options The optional parameters
614
- * @param callback The callback
674
+ * ListNext
675
+ * @param nextLink The nextLink from the previous successful call to the List method.
676
+ * @param options The options parameters.
615
677
  */
616
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.StorageAccountListResult>): void;
617
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.StorageAccountListResult>, callback?: msRest.ServiceCallback<Models.StorageAccountListResult>): Promise<Models.StorageAccountsListNextResponse> {
678
+ private _listNext(
679
+ nextLink: string,
680
+ options?: StorageAccountsListNextOptionalParams
681
+ ): Promise<StorageAccountsListNextResponse> {
618
682
  return this.client.sendOperationRequest(
619
- {
620
- nextPageLink,
621
- options
622
- },
623
- listNextOperationSpec,
624
- callback) as Promise<Models.StorageAccountsListNextResponse>;
683
+ { nextLink, options },
684
+ listNextOperationSpec
685
+ );
625
686
  }
626
687
 
627
688
  /**
628
- * Lists all the storage accounts available under the given resource group. Note that storage keys
629
- * are not returned; use the ListKeys operation for this.
630
- * @param nextPageLink The NextLink from the previous successful call to List operation.
631
- * @param [options] The optional parameters
632
- * @returns Promise<Models.StorageAccountsListByResourceGroupNextResponse>
689
+ * ListByResourceGroupNext
690
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
691
+ * case insensitive.
692
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
693
+ * @param options The options parameters.
633
694
  */
634
- listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.StorageAccountsListByResourceGroupNextResponse>;
635
- /**
636
- * @param nextPageLink The NextLink from the previous successful call to List operation.
637
- * @param callback The callback
638
- */
639
- listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.StorageAccountListResult>): void;
640
- /**
641
- * @param nextPageLink The NextLink from the previous successful call to List operation.
642
- * @param options The optional parameters
643
- * @param callback The callback
644
- */
645
- listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.StorageAccountListResult>): void;
646
- listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.StorageAccountListResult>, callback?: msRest.ServiceCallback<Models.StorageAccountListResult>): Promise<Models.StorageAccountsListByResourceGroupNextResponse> {
695
+ private _listByResourceGroupNext(
696
+ resourceGroupName: string,
697
+ nextLink: string,
698
+ options?: StorageAccountsListByResourceGroupNextOptionalParams
699
+ ): Promise<StorageAccountsListByResourceGroupNextResponse> {
647
700
  return this.client.sendOperationRequest(
648
- {
649
- nextPageLink,
650
- options
651
- },
652
- listByResourceGroupNextOperationSpec,
653
- callback) as Promise<Models.StorageAccountsListByResourceGroupNextResponse>;
701
+ { resourceGroupName, nextLink, options },
702
+ listByResourceGroupNextOperationSpec
703
+ );
654
704
  }
655
705
  }
656
-
657
706
  // Operation Specifications
658
- const serializer = new msRest.Serializer(Mappers);
659
- const checkNameAvailabilityOperationSpec: msRest.OperationSpec = {
707
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
708
+
709
+ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {
710
+ path:
711
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability",
660
712
  httpMethod: "POST",
661
- path: "subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability",
662
- urlParameters: [
663
- Parameters.subscriptionId
664
- ],
665
- queryParameters: [
666
- Parameters.apiVersion
667
- ],
668
- headerParameters: [
669
- Parameters.acceptLanguage
670
- ],
671
- requestBody: {
672
- parameterPath: {
673
- name: "name"
674
- },
675
- mapper: {
676
- ...Mappers.StorageAccountCheckNameAvailabilityParameters,
677
- required: true
713
+ responses: {
714
+ 200: {
715
+ bodyMapper: Mappers.CheckNameAvailabilityResult
678
716
  }
679
717
  },
718
+ requestBody: Parameters.accountName,
719
+ queryParameters: [Parameters.apiVersion],
720
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
721
+ headerParameters: [Parameters.accept, Parameters.contentType],
722
+ mediaType: "json",
723
+ serializer
724
+ };
725
+ const createOperationSpec: coreClient.OperationSpec = {
726
+ path:
727
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}",
728
+ httpMethod: "PUT",
680
729
  responses: {
681
730
  200: {
682
- bodyMapper: Mappers.CheckNameAvailabilityResult
731
+ bodyMapper: Mappers.StorageAccount
732
+ },
733
+ 201: {
734
+ bodyMapper: Mappers.StorageAccount
735
+ },
736
+ 202: {
737
+ bodyMapper: Mappers.StorageAccount
683
738
  },
684
- default: {
685
- bodyMapper: Mappers.CloudError
739
+ 204: {
740
+ bodyMapper: Mappers.StorageAccount
686
741
  }
687
742
  },
743
+ requestBody: Parameters.parameters,
744
+ queryParameters: [Parameters.apiVersion],
745
+ urlParameters: [
746
+ Parameters.$host,
747
+ Parameters.subscriptionId,
748
+ Parameters.resourceGroupName,
749
+ Parameters.accountName1
750
+ ],
751
+ headerParameters: [Parameters.accept, Parameters.contentType],
752
+ mediaType: "json",
688
753
  serializer
689
754
  };
690
-
691
- const deleteMethodOperationSpec: msRest.OperationSpec = {
755
+ const deleteOperationSpec: coreClient.OperationSpec = {
756
+ path:
757
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}",
692
758
  httpMethod: "DELETE",
693
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}",
759
+ responses: { 200: {}, 204: {} },
760
+ queryParameters: [Parameters.apiVersion],
694
761
  urlParameters: [
762
+ Parameters.$host,
763
+ Parameters.subscriptionId,
695
764
  Parameters.resourceGroupName,
696
- Parameters.accountName,
697
- Parameters.subscriptionId
765
+ Parameters.accountName1
698
766
  ],
699
- queryParameters: [
700
- Parameters.apiVersion
701
- ],
702
- headerParameters: [
703
- Parameters.acceptLanguage
704
- ],
705
- responses: {
706
- 200: {},
707
- 204: {},
708
- default: {
709
- bodyMapper: Mappers.CloudError
710
- }
711
- },
712
767
  serializer
713
768
  };
714
-
715
- const getPropertiesOperationSpec: msRest.OperationSpec = {
769
+ const getPropertiesOperationSpec: coreClient.OperationSpec = {
770
+ path:
771
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}",
716
772
  httpMethod: "GET",
717
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}",
718
- urlParameters: [
719
- Parameters.resourceGroupName,
720
- Parameters.accountName,
721
- Parameters.subscriptionId
722
- ],
723
- queryParameters: [
724
- Parameters.apiVersion,
725
- Parameters.expand0
726
- ],
727
- headerParameters: [
728
- Parameters.acceptLanguage
729
- ],
730
773
  responses: {
731
774
  200: {
732
775
  bodyMapper: Mappers.StorageAccount
733
- },
734
- default: {
735
- bodyMapper: Mappers.CloudError
736
776
  }
737
777
  },
738
- serializer
739
- };
740
-
741
- const updateOperationSpec: msRest.OperationSpec = {
742
- httpMethod: "PATCH",
743
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}",
778
+ queryParameters: [Parameters.apiVersion, Parameters.expand],
744
779
  urlParameters: [
780
+ Parameters.$host,
781
+ Parameters.subscriptionId,
745
782
  Parameters.resourceGroupName,
746
- Parameters.accountName,
747
- Parameters.subscriptionId
748
- ],
749
- queryParameters: [
750
- Parameters.apiVersion
783
+ Parameters.accountName1
751
784
  ],
752
- headerParameters: [
753
- Parameters.acceptLanguage
754
- ],
755
- requestBody: {
756
- parameterPath: "parameters",
757
- mapper: {
758
- ...Mappers.StorageAccountUpdateParameters,
759
- required: true
760
- }
761
- },
785
+ headerParameters: [Parameters.accept],
786
+ serializer
787
+ };
788
+ const updateOperationSpec: coreClient.OperationSpec = {
789
+ path:
790
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}",
791
+ httpMethod: "PATCH",
762
792
  responses: {
763
793
  200: {
764
794
  bodyMapper: Mappers.StorageAccount
765
- },
766
- default: {
767
- bodyMapper: Mappers.CloudError
768
795
  }
769
796
  },
797
+ requestBody: Parameters.parameters1,
798
+ queryParameters: [Parameters.apiVersion],
799
+ urlParameters: [
800
+ Parameters.$host,
801
+ Parameters.subscriptionId,
802
+ Parameters.resourceGroupName,
803
+ Parameters.accountName1
804
+ ],
805
+ headerParameters: [Parameters.accept, Parameters.contentType],
806
+ mediaType: "json",
770
807
  serializer
771
808
  };
772
-
773
- const listOperationSpec: msRest.OperationSpec = {
809
+ const listOperationSpec: coreClient.OperationSpec = {
810
+ path:
811
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts",
774
812
  httpMethod: "GET",
775
- path: "subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts",
776
- urlParameters: [
777
- Parameters.subscriptionId
778
- ],
779
- queryParameters: [
780
- Parameters.apiVersion
781
- ],
782
- headerParameters: [
783
- Parameters.acceptLanguage
784
- ],
785
813
  responses: {
786
814
  200: {
787
815
  bodyMapper: Mappers.StorageAccountListResult
788
- },
789
- default: {
790
- bodyMapper: Mappers.CloudError
791
816
  }
792
817
  },
818
+ queryParameters: [Parameters.apiVersion],
819
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
820
+ headerParameters: [Parameters.accept],
793
821
  serializer
794
822
  };
795
-
796
- const listByResourceGroupOperationSpec: msRest.OperationSpec = {
823
+ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
824
+ path:
825
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts",
797
826
  httpMethod: "GET",
798
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts",
799
- urlParameters: [
800
- Parameters.resourceGroupName,
801
- Parameters.subscriptionId
802
- ],
803
- queryParameters: [
804
- Parameters.apiVersion
805
- ],
806
- headerParameters: [
807
- Parameters.acceptLanguage
808
- ],
809
827
  responses: {
810
828
  200: {
811
829
  bodyMapper: Mappers.StorageAccountListResult
812
- },
813
- default: {
814
- bodyMapper: Mappers.CloudError
815
830
  }
816
831
  },
832
+ queryParameters: [Parameters.apiVersion],
833
+ urlParameters: [
834
+ Parameters.$host,
835
+ Parameters.subscriptionId,
836
+ Parameters.resourceGroupName
837
+ ],
838
+ headerParameters: [Parameters.accept],
817
839
  serializer
818
840
  };
819
-
820
- const listKeysOperationSpec: msRest.OperationSpec = {
841
+ const listKeysOperationSpec: coreClient.OperationSpec = {
842
+ path:
843
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listKeys",
821
844
  httpMethod: "POST",
822
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listKeys",
823
- urlParameters: [
824
- Parameters.resourceGroupName,
825
- Parameters.accountName,
826
- Parameters.subscriptionId
827
- ],
828
- queryParameters: [
829
- Parameters.apiVersion,
830
- Parameters.expand1
831
- ],
832
- headerParameters: [
833
- Parameters.acceptLanguage
834
- ],
835
845
  responses: {
836
846
  200: {
837
847
  bodyMapper: Mappers.StorageAccountListKeysResult
838
- },
839
- default: {
840
- bodyMapper: Mappers.CloudError
841
848
  }
842
849
  },
843
- serializer
844
- };
845
-
846
- const regenerateKeyOperationSpec: msRest.OperationSpec = {
847
- httpMethod: "POST",
848
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey",
850
+ queryParameters: [Parameters.apiVersion, Parameters.expand1],
849
851
  urlParameters: [
852
+ Parameters.$host,
853
+ Parameters.subscriptionId,
850
854
  Parameters.resourceGroupName,
851
- Parameters.accountName,
852
- Parameters.subscriptionId
853
- ],
854
- queryParameters: [
855
- Parameters.apiVersion
855
+ Parameters.accountName1
856
856
  ],
857
- headerParameters: [
858
- Parameters.acceptLanguage
859
- ],
860
- requestBody: {
861
- parameterPath: {
862
- keyName: "keyName"
863
- },
864
- mapper: {
865
- ...Mappers.StorageAccountRegenerateKeyParameters,
866
- required: true
867
- }
868
- },
857
+ headerParameters: [Parameters.accept],
858
+ serializer
859
+ };
860
+ const regenerateKeyOperationSpec: coreClient.OperationSpec = {
861
+ path:
862
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey",
863
+ httpMethod: "POST",
869
864
  responses: {
870
865
  200: {
871
866
  bodyMapper: Mappers.StorageAccountListKeysResult
872
- },
873
- default: {
874
- bodyMapper: Mappers.CloudError
875
867
  }
876
868
  },
877
- serializer
878
- };
879
-
880
- const listAccountSASOperationSpec: msRest.OperationSpec = {
881
- httpMethod: "POST",
882
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListAccountSas",
869
+ requestBody: Parameters.regenerateKey,
870
+ queryParameters: [Parameters.apiVersion],
883
871
  urlParameters: [
872
+ Parameters.$host,
873
+ Parameters.subscriptionId,
884
874
  Parameters.resourceGroupName,
885
- Parameters.accountName,
886
- Parameters.subscriptionId
887
- ],
888
- queryParameters: [
889
- Parameters.apiVersion
875
+ Parameters.accountName1
890
876
  ],
891
- headerParameters: [
892
- Parameters.acceptLanguage
893
- ],
894
- requestBody: {
895
- parameterPath: "parameters",
896
- mapper: {
897
- ...Mappers.AccountSasParameters,
898
- required: true
899
- }
900
- },
877
+ headerParameters: [Parameters.accept, Parameters.contentType],
878
+ mediaType: "json",
879
+ serializer
880
+ };
881
+ const listAccountSASOperationSpec: coreClient.OperationSpec = {
882
+ path:
883
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListAccountSas",
884
+ httpMethod: "POST",
901
885
  responses: {
902
886
  200: {
903
887
  bodyMapper: Mappers.ListAccountSasResponse
904
- },
905
- default: {
906
- bodyMapper: Mappers.CloudError
907
888
  }
908
889
  },
909
- serializer
910
- };
911
-
912
- const listServiceSASOperationSpec: msRest.OperationSpec = {
913
- httpMethod: "POST",
914
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListServiceSas",
890
+ requestBody: Parameters.parameters2,
891
+ queryParameters: [Parameters.apiVersion],
915
892
  urlParameters: [
893
+ Parameters.$host,
894
+ Parameters.subscriptionId,
916
895
  Parameters.resourceGroupName,
917
- Parameters.accountName,
918
- Parameters.subscriptionId
919
- ],
920
- queryParameters: [
921
- Parameters.apiVersion
896
+ Parameters.accountName1
922
897
  ],
923
- headerParameters: [
924
- Parameters.acceptLanguage
925
- ],
926
- requestBody: {
927
- parameterPath: "parameters",
928
- mapper: {
929
- ...Mappers.ServiceSasParameters,
930
- required: true
931
- }
932
- },
933
- responses: {
934
- 200: {
935
- bodyMapper: Mappers.ListServiceSasResponse
936
- },
937
- default: {
938
- bodyMapper: Mappers.CloudError
939
- }
940
- },
898
+ headerParameters: [Parameters.accept, Parameters.contentType],
899
+ mediaType: "json",
941
900
  serializer
942
901
  };
943
-
944
- const revokeUserDelegationKeysOperationSpec: msRest.OperationSpec = {
902
+ const listServiceSASOperationSpec: coreClient.OperationSpec = {
903
+ path:
904
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListServiceSas",
945
905
  httpMethod: "POST",
946
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/revokeUserDelegationKeys",
947
- urlParameters: [
948
- Parameters.resourceGroupName,
949
- Parameters.accountName,
950
- Parameters.subscriptionId
951
- ],
952
- queryParameters: [
953
- Parameters.apiVersion
954
- ],
955
- headerParameters: [
956
- Parameters.acceptLanguage
957
- ],
958
906
  responses: {
959
- 200: {},
960
- default: {
961
- bodyMapper: Mappers.CloudError
907
+ 200: {
908
+ bodyMapper: Mappers.ListServiceSasResponse
962
909
  }
963
910
  },
964
- serializer
965
- };
966
-
967
- const beginCreateOperationSpec: msRest.OperationSpec = {
968
- httpMethod: "PUT",
969
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}",
911
+ requestBody: Parameters.parameters3,
912
+ queryParameters: [Parameters.apiVersion],
970
913
  urlParameters: [
914
+ Parameters.$host,
915
+ Parameters.subscriptionId,
971
916
  Parameters.resourceGroupName,
972
- Parameters.accountName,
973
- Parameters.subscriptionId
974
- ],
975
- queryParameters: [
976
- Parameters.apiVersion
917
+ Parameters.accountName1
977
918
  ],
978
- headerParameters: [
979
- Parameters.acceptLanguage
980
- ],
981
- requestBody: {
982
- parameterPath: "parameters",
983
- mapper: {
984
- ...Mappers.StorageAccountCreateParameters,
985
- required: true
986
- }
987
- },
988
- responses: {
989
- 200: {
990
- bodyMapper: Mappers.StorageAccount
991
- },
992
- 202: {},
993
- default: {
994
- bodyMapper: Mappers.CloudError
995
- }
996
- },
919
+ headerParameters: [Parameters.accept, Parameters.contentType],
920
+ mediaType: "json",
997
921
  serializer
998
922
  };
999
-
1000
- const beginFailoverOperationSpec: msRest.OperationSpec = {
923
+ const failoverOperationSpec: coreClient.OperationSpec = {
924
+ path:
925
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/failover",
1001
926
  httpMethod: "POST",
1002
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/failover",
927
+ responses: { 200: {}, 201: {}, 202: {}, 204: {} },
928
+ queryParameters: [Parameters.apiVersion],
1003
929
  urlParameters: [
930
+ Parameters.$host,
931
+ Parameters.subscriptionId,
1004
932
  Parameters.resourceGroupName,
1005
- Parameters.accountName,
1006
- Parameters.subscriptionId
1007
- ],
1008
- queryParameters: [
1009
- Parameters.apiVersion
933
+ Parameters.accountName1
1010
934
  ],
1011
- headerParameters: [
1012
- Parameters.acceptLanguage
1013
- ],
1014
- responses: {
1015
- 200: {},
1016
- 202: {},
1017
- default: {
1018
- bodyMapper: Mappers.CloudError
1019
- }
1020
- },
1021
935
  serializer
1022
936
  };
1023
-
1024
- const beginRestoreBlobRangesOperationSpec: msRest.OperationSpec = {
937
+ const restoreBlobRangesOperationSpec: coreClient.OperationSpec = {
938
+ path:
939
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/restoreBlobRanges",
1025
940
  httpMethod: "POST",
1026
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/restoreBlobRanges",
1027
- urlParameters: [
1028
- Parameters.resourceGroupName,
1029
- Parameters.accountName,
1030
- Parameters.subscriptionId
1031
- ],
1032
- queryParameters: [
1033
- Parameters.apiVersion
1034
- ],
1035
- headerParameters: [
1036
- Parameters.acceptLanguage
1037
- ],
1038
- requestBody: {
1039
- parameterPath: {
1040
- timeToRestore: "timeToRestore",
1041
- blobRanges: "blobRanges"
1042
- },
1043
- mapper: {
1044
- ...Mappers.BlobRestoreParameters,
1045
- required: true
1046
- }
1047
- },
1048
941
  responses: {
1049
942
  200: {
1050
943
  bodyMapper: Mappers.BlobRestoreStatus
1051
944
  },
945
+ 201: {
946
+ bodyMapper: Mappers.BlobRestoreStatus
947
+ },
1052
948
  202: {
1053
949
  bodyMapper: Mappers.BlobRestoreStatus
1054
950
  },
1055
- default: {
1056
- bodyMapper: Mappers.CloudError
951
+ 204: {
952
+ bodyMapper: Mappers.BlobRestoreStatus
1057
953
  }
1058
954
  },
955
+ requestBody: Parameters.parameters4,
956
+ queryParameters: [Parameters.apiVersion],
957
+ urlParameters: [
958
+ Parameters.$host,
959
+ Parameters.subscriptionId,
960
+ Parameters.resourceGroupName,
961
+ Parameters.accountName1
962
+ ],
963
+ headerParameters: [Parameters.accept, Parameters.contentType],
964
+ mediaType: "json",
1059
965
  serializer
1060
966
  };
1061
-
1062
- const listNextOperationSpec: msRest.OperationSpec = {
1063
- httpMethod: "GET",
1064
- baseUrl: "https://management.azure.com",
1065
- path: "{nextLink}",
967
+ const revokeUserDelegationKeysOperationSpec: coreClient.OperationSpec = {
968
+ path:
969
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/revokeUserDelegationKeys",
970
+ httpMethod: "POST",
971
+ responses: { 200: {} },
972
+ queryParameters: [Parameters.apiVersion],
1066
973
  urlParameters: [
1067
- Parameters.nextPageLink
1068
- ],
1069
- queryParameters: [
1070
- Parameters.apiVersion
1071
- ],
1072
- headerParameters: [
1073
- Parameters.acceptLanguage
974
+ Parameters.$host,
975
+ Parameters.subscriptionId,
976
+ Parameters.resourceGroupName,
977
+ Parameters.accountName1
1074
978
  ],
979
+ serializer
980
+ };
981
+ const listNextOperationSpec: coreClient.OperationSpec = {
982
+ path: "{nextLink}",
983
+ httpMethod: "GET",
1075
984
  responses: {
1076
985
  200: {
1077
986
  bodyMapper: Mappers.StorageAccountListResult
1078
- },
1079
- default: {
1080
- bodyMapper: Mappers.CloudError
1081
987
  }
1082
988
  },
989
+ queryParameters: [Parameters.apiVersion],
990
+ urlParameters: [
991
+ Parameters.$host,
992
+ Parameters.subscriptionId,
993
+ Parameters.nextLink
994
+ ],
995
+ headerParameters: [Parameters.accept],
1083
996
  serializer
1084
997
  };
1085
-
1086
- const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
1087
- httpMethod: "GET",
1088
- baseUrl: "https://management.azure.com",
998
+ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
1089
999
  path: "{nextLink}",
1090
- urlParameters: [
1091
- Parameters.nextPageLink
1092
- ],
1093
- queryParameters: [
1094
- Parameters.apiVersion
1095
- ],
1096
- headerParameters: [
1097
- Parameters.acceptLanguage
1098
- ],
1000
+ httpMethod: "GET",
1099
1001
  responses: {
1100
1002
  200: {
1101
1003
  bodyMapper: Mappers.StorageAccountListResult
1102
- },
1103
- default: {
1104
- bodyMapper: Mappers.CloudError
1105
1004
  }
1106
1005
  },
1006
+ queryParameters: [Parameters.apiVersion],
1007
+ urlParameters: [
1008
+ Parameters.$host,
1009
+ Parameters.subscriptionId,
1010
+ Parameters.resourceGroupName,
1011
+ Parameters.nextLink
1012
+ ],
1013
+ headerParameters: [Parameters.accept],
1107
1014
  serializer
1108
1015
  };