@azure/arm-storage-profile-2020-09-01-hybrid 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +83 -73
  4. package/dist/index.js +5576 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/src/index.d.ts +5 -0
  9. package/dist-esm/src/index.d.ts.map +1 -0
  10. package/dist-esm/src/index.js +12 -0
  11. package/dist-esm/src/index.js.map +1 -0
  12. package/dist-esm/src/lroImpl.d.ts +16 -0
  13. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  14. package/dist-esm/src/lroImpl.js +29 -0
  15. package/dist-esm/src/lroImpl.js.map +1 -0
  16. package/dist-esm/src/models/index.d.ts +1772 -0
  17. package/dist-esm/src/models/index.d.ts.map +1 -0
  18. package/dist-esm/src/models/index.js +185 -0
  19. package/dist-esm/src/models/index.js.map +1 -0
  20. package/dist-esm/src/models/mappers.d.ts +84 -0
  21. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  22. package/{esm → dist-esm/src}/models/mappers.js +1591 -1449
  23. package/dist-esm/src/models/mappers.js.map +1 -0
  24. package/dist-esm/src/models/parameters.d.ts +30 -0
  25. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  26. package/dist-esm/src/models/parameters.js +242 -0
  27. package/dist-esm/src/models/parameters.js.map +1 -0
  28. package/dist-esm/src/operations/blobInventoryPolicies.d.ts +73 -0
  29. package/dist-esm/src/operations/blobInventoryPolicies.d.ts.map +1 -0
  30. package/dist-esm/src/operations/blobInventoryPolicies.js +221 -0
  31. package/dist-esm/src/operations/blobInventoryPolicies.js.map +1 -0
  32. package/dist-esm/src/operations/encryptionScopes.d.ts +94 -0
  33. package/dist-esm/src/operations/encryptionScopes.d.ts.map +1 -0
  34. package/dist-esm/src/operations/encryptionScopes.js +278 -0
  35. package/dist-esm/src/operations/encryptionScopes.js.map +1 -0
  36. package/{esm → dist-esm/src}/operations/index.d.ts +1 -0
  37. package/dist-esm/src/operations/index.d.ts.map +1 -0
  38. package/{esm → dist-esm/src}/operations/index.js +4 -5
  39. package/dist-esm/src/operations/index.js.map +1 -0
  40. package/dist-esm/src/operations/managementPolicies.d.ts +50 -0
  41. package/dist-esm/src/operations/managementPolicies.d.ts.map +1 -0
  42. package/dist-esm/src/operations/managementPolicies.js +126 -0
  43. package/dist-esm/src/operations/managementPolicies.js.map +1 -0
  44. package/dist-esm/src/operations/objectReplicationPoliciesOperations.d.ts +74 -0
  45. package/dist-esm/src/operations/objectReplicationPoliciesOperations.d.ts.map +1 -0
  46. package/dist-esm/src/operations/objectReplicationPoliciesOperations.js +222 -0
  47. package/dist-esm/src/operations/objectReplicationPoliciesOperations.js.map +1 -0
  48. package/dist-esm/src/operations/operations.d.ts +26 -0
  49. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  50. package/dist-esm/src/operations/operations.js +87 -0
  51. package/dist-esm/src/operations/operations.js.map +1 -0
  52. package/dist-esm/src/operations/privateEndpointConnections.d.ts +73 -0
  53. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  54. package/dist-esm/src/operations/privateEndpointConnections.js +228 -0
  55. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  56. package/dist-esm/src/operations/privateLinkResources.d.ts +23 -0
  57. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
  58. package/dist-esm/src/operations/privateLinkResources.js +53 -0
  59. package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
  60. package/dist-esm/src/operations/skus.d.ts +26 -0
  61. package/dist-esm/src/operations/skus.d.ts.map +1 -0
  62. package/dist-esm/src/operations/skus.js +87 -0
  63. package/dist-esm/src/operations/skus.js.map +1 -0
  64. package/dist-esm/src/operations/storageAccounts.d.ts +228 -0
  65. package/dist-esm/src/operations/storageAccounts.d.ts.map +1 -0
  66. package/dist-esm/src/operations/storageAccounts.js +722 -0
  67. package/dist-esm/src/operations/storageAccounts.js.map +1 -0
  68. package/dist-esm/src/operations/usages.d.ts +28 -0
  69. package/dist-esm/src/operations/usages.d.ts.map +1 -0
  70. package/dist-esm/src/operations/usages.js +93 -0
  71. package/dist-esm/src/operations/usages.js.map +1 -0
  72. package/dist-esm/src/operationsInterfaces/blobInventoryPolicies.d.ts +53 -0
  73. package/dist-esm/src/operationsInterfaces/blobInventoryPolicies.d.ts.map +1 -0
  74. package/dist-esm/src/operationsInterfaces/blobInventoryPolicies.js +9 -0
  75. package/dist-esm/src/operationsInterfaces/blobInventoryPolicies.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/encryptionScopes.d.ts +63 -0
  77. package/dist-esm/src/operationsInterfaces/encryptionScopes.d.ts.map +1 -0
  78. package/dist-esm/src/operationsInterfaces/encryptionScopes.js +9 -0
  79. package/dist-esm/src/operationsInterfaces/encryptionScopes.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/index.d.ts +11 -0
  81. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  82. package/dist-esm/src/operationsInterfaces/index.js +18 -0
  83. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/managementPolicies.d.ts +42 -0
  85. package/dist-esm/src/operationsInterfaces/managementPolicies.d.ts.map +1 -0
  86. package/dist-esm/src/operationsInterfaces/managementPolicies.js +9 -0
  87. package/dist-esm/src/operationsInterfaces/managementPolicies.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/objectReplicationPoliciesOperations.d.ts +54 -0
  89. package/dist-esm/src/operationsInterfaces/objectReplicationPoliciesOperations.d.ts.map +1 -0
  90. package/dist-esm/src/operationsInterfaces/objectReplicationPoliciesOperations.js +9 -0
  91. package/dist-esm/src/operationsInterfaces/objectReplicationPoliciesOperations.js.map +1 -0
  92. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  93. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  94. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  95. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  96. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +53 -0
  97. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  98. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  99. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  100. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +15 -0
  101. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
  102. package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
  103. package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
  104. package/dist-esm/src/operationsInterfaces/skus.d.ts +11 -0
  105. package/dist-esm/src/operationsInterfaces/skus.d.ts.map +1 -0
  106. package/dist-esm/src/operationsInterfaces/skus.js +9 -0
  107. package/dist-esm/src/operationsInterfaces/skus.js.map +1 -0
  108. package/dist-esm/src/operationsInterfaces/storageAccounts.d.ts +196 -0
  109. package/dist-esm/src/operationsInterfaces/storageAccounts.d.ts.map +1 -0
  110. package/dist-esm/src/operationsInterfaces/storageAccounts.js +9 -0
  111. package/dist-esm/src/operationsInterfaces/storageAccounts.js.map +1 -0
  112. package/dist-esm/src/operationsInterfaces/usages.d.ts +12 -0
  113. package/dist-esm/src/operationsInterfaces/usages.d.ts.map +1 -0
  114. package/dist-esm/src/operationsInterfaces/usages.js +9 -0
  115. package/dist-esm/src/operationsInterfaces/usages.js.map +1 -0
  116. package/dist-esm/src/storageManagementClient.d.ts +27 -0
  117. package/dist-esm/src/storageManagementClient.d.ts.map +1 -0
  118. package/dist-esm/src/storageManagementClient.js +60 -0
  119. package/dist-esm/src/storageManagementClient.js.map +1 -0
  120. package/dist-esm/test/sampleTest.d.ts +2 -0
  121. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  122. package/dist-esm/test/sampleTest.js +40 -0
  123. package/dist-esm/test/sampleTest.js.map +1 -0
  124. package/package.json +74 -22
  125. package/review/arm-storage-profile-2020-09-01-hybrid.api.md +1396 -0
  126. package/rollup.config.js +115 -30
  127. package/src/index.ts +12 -0
  128. package/src/lroImpl.ts +34 -0
  129. package/src/models/index.ts +1411 -2087
  130. package/src/models/mappers.ts +1470 -1320
  131. package/src/models/parameters.ts +186 -76
  132. package/src/operations/blobInventoryPolicies.ts +282 -0
  133. package/src/operations/encryptionScopes.ts +238 -295
  134. package/src/operations/index.ts +4 -5
  135. package/src/operations/managementPolicies.ts +108 -182
  136. package/src/operations/objectReplicationPoliciesOperations.ts +186 -234
  137. package/src/operations/operations.ts +66 -45
  138. package/src/operations/privateEndpointConnections.ts +182 -221
  139. package/src/operations/privateLinkResources.ts +43 -67
  140. package/src/operations/skus.ts +64 -48
  141. package/src/operations/storageAccounts.ts +759 -838
  142. package/src/operations/usages.ts +78 -52
  143. package/src/operationsInterfaces/blobInventoryPolicies.ts +91 -0
  144. package/src/operationsInterfaces/encryptionScopes.ts +102 -0
  145. package/src/operationsInterfaces/index.ts +18 -0
  146. package/src/operationsInterfaces/managementPolicies.ts +74 -0
  147. package/src/operationsInterfaces/objectReplicationPoliciesOperations.ts +91 -0
  148. package/src/operationsInterfaces/operations.ts +22 -0
  149. package/src/operationsInterfaces/privateEndpointConnections.ts +90 -0
  150. package/src/operationsInterfaces/privateLinkResources.ts +30 -0
  151. package/src/operationsInterfaces/skus.ts +22 -0
  152. package/src/operationsInterfaces/storageAccounts.ts +319 -0
  153. package/src/operationsInterfaces/usages.ts +24 -0
  154. package/src/storageManagementClient.ts +105 -46
  155. package/tsconfig.json +14 -6
  156. package/types/arm-storage-profile-2020-09-01-hybrid.d.ts +2508 -0
  157. package/types/tsdoc-metadata.json +11 -0
  158. package/dist/arm-storage-profile-2020-09-01-hybrid.js +0 -5017
  159. package/dist/arm-storage-profile-2020-09-01-hybrid.js.map +0 -1
  160. package/dist/arm-storage-profile-2020-09-01-hybrid.min.js +0 -1
  161. package/dist/arm-storage-profile-2020-09-01-hybrid.min.js.map +0 -1
  162. package/esm/models/encryptionScopesMappers.d.ts +0 -2
  163. package/esm/models/encryptionScopesMappers.d.ts.map +0 -1
  164. package/esm/models/encryptionScopesMappers.js +0 -9
  165. package/esm/models/encryptionScopesMappers.js.map +0 -1
  166. package/esm/models/index.d.ts +0 -2493
  167. package/esm/models/index.d.ts.map +0 -1
  168. package/esm/models/index.js +0 -8
  169. package/esm/models/index.js.map +0 -1
  170. package/esm/models/managementPoliciesMappers.d.ts +0 -2
  171. package/esm/models/managementPoliciesMappers.d.ts.map +0 -1
  172. package/esm/models/managementPoliciesMappers.js +0 -9
  173. package/esm/models/managementPoliciesMappers.js.map +0 -1
  174. package/esm/models/mappers.d.ts +0 -79
  175. package/esm/models/mappers.d.ts.map +0 -1
  176. package/esm/models/mappers.js.map +0 -1
  177. package/esm/models/objectReplicationPoliciesOperationsMappers.d.ts +0 -2
  178. package/esm/models/objectReplicationPoliciesOperationsMappers.d.ts.map +0 -1
  179. package/esm/models/objectReplicationPoliciesOperationsMappers.js +0 -9
  180. package/esm/models/objectReplicationPoliciesOperationsMappers.js.map +0 -1
  181. package/esm/models/operationsMappers.d.ts +0 -2
  182. package/esm/models/operationsMappers.d.ts.map +0 -1
  183. package/esm/models/operationsMappers.js +0 -9
  184. package/esm/models/operationsMappers.js.map +0 -1
  185. package/esm/models/parameters.d.ts +0 -15
  186. package/esm/models/parameters.d.ts.map +0 -1
  187. package/esm/models/parameters.js +0 -176
  188. package/esm/models/parameters.js.map +0 -1
  189. package/esm/models/privateEndpointConnectionsMappers.d.ts +0 -2
  190. package/esm/models/privateEndpointConnectionsMappers.d.ts.map +0 -1
  191. package/esm/models/privateEndpointConnectionsMappers.js +0 -9
  192. package/esm/models/privateEndpointConnectionsMappers.js.map +0 -1
  193. package/esm/models/privateLinkResourcesMappers.d.ts +0 -2
  194. package/esm/models/privateLinkResourcesMappers.d.ts.map +0 -1
  195. package/esm/models/privateLinkResourcesMappers.js +0 -9
  196. package/esm/models/privateLinkResourcesMappers.js.map +0 -1
  197. package/esm/models/skusMappers.d.ts +0 -2
  198. package/esm/models/skusMappers.d.ts.map +0 -1
  199. package/esm/models/skusMappers.js +0 -9
  200. package/esm/models/skusMappers.js.map +0 -1
  201. package/esm/models/storageAccountsMappers.d.ts +0 -2
  202. package/esm/models/storageAccountsMappers.d.ts.map +0 -1
  203. package/esm/models/storageAccountsMappers.js +0 -9
  204. package/esm/models/storageAccountsMappers.js.map +0 -1
  205. package/esm/models/usagesMappers.d.ts +0 -2
  206. package/esm/models/usagesMappers.d.ts.map +0 -1
  207. package/esm/models/usagesMappers.js +0 -9
  208. package/esm/models/usagesMappers.js.map +0 -1
  209. package/esm/operations/encryptionScopes.d.ts +0 -196
  210. package/esm/operations/encryptionScopes.d.ts.map +0 -1
  211. package/esm/operations/encryptionScopes.js +0 -197
  212. package/esm/operations/encryptionScopes.js.map +0 -1
  213. package/esm/operations/index.d.ts.map +0 -1
  214. package/esm/operations/index.js.map +0 -1
  215. package/esm/operations/managementPolicies.d.ts +0 -109
  216. package/esm/operations/managementPolicies.d.ts.map +0 -1
  217. package/esm/operations/managementPolicies.js +0 -130
  218. package/esm/operations/managementPolicies.js.map +0 -1
  219. package/esm/operations/objectReplicationPoliciesOperations.d.ts +0 -157
  220. package/esm/operations/objectReplicationPoliciesOperations.d.ts.map +0 -1
  221. package/esm/operations/objectReplicationPoliciesOperations.js +0 -162
  222. package/esm/operations/objectReplicationPoliciesOperations.js.map +0 -1
  223. package/esm/operations/operations.d.ts +0 -28
  224. package/esm/operations/operations.d.ts.map +0 -1
  225. package/esm/operations/operations.js +0 -51
  226. package/esm/operations/operations.js.map +0 -1
  227. package/esm/operations/privateEndpointConnections.d.ts +0 -154
  228. package/esm/operations/privateEndpointConnections.d.ts.map +0 -1
  229. package/esm/operations/privateEndpointConnections.js +0 -162
  230. package/esm/operations/privateEndpointConnections.js.map +0 -1
  231. package/esm/operations/privateLinkResources.d.ts +0 -43
  232. package/esm/operations/privateLinkResources.d.ts.map +0 -1
  233. package/esm/operations/privateLinkResources.js +0 -58
  234. package/esm/operations/privateLinkResources.js.map +0 -1
  235. package/esm/operations/skus.d.ts +0 -28
  236. package/esm/operations/skus.d.ts.map +0 -1
  237. package/esm/operations/skus.js +0 -54
  238. package/esm/operations/skus.js.map +0 -1
  239. package/esm/operations/storageAccounts.d.ts +0 -436
  240. package/esm/operations/storageAccounts.d.ts.map +0 -1
  241. package/esm/operations/storageAccounts.js +0 -611
  242. package/esm/operations/storageAccounts.js.map +0 -1
  243. package/esm/operations/usages.d.ts +0 -32
  244. package/esm/operations/usages.d.ts.map +0 -1
  245. package/esm/operations/usages.js +0 -56
  246. package/esm/operations/usages.js.map +0 -1
  247. package/esm/storageManagementClient.d.ts +0 -26
  248. package/esm/storageManagementClient.d.ts.map +0 -1
  249. package/esm/storageManagementClient.js +0 -41
  250. package/esm/storageManagementClient.js.map +0 -1
  251. package/esm/storageManagementClientContext.d.ts +0 -16
  252. package/esm/storageManagementClientContext.d.ts.map +0 -1
  253. package/esm/storageManagementClientContext.js +0 -56
  254. package/esm/storageManagementClientContext.js.map +0 -1
  255. package/src/models/encryptionScopesMappers.ts +0 -59
  256. package/src/models/managementPoliciesMappers.ts +0 -57
  257. package/src/models/objectReplicationPoliciesOperationsMappers.ts +0 -58
  258. package/src/models/operationsMappers.ts +0 -17
  259. package/src/models/privateEndpointConnectionsMappers.ts +0 -59
  260. package/src/models/privateLinkResourcesMappers.ts +0 -58
  261. package/src/models/skusMappers.ts +0 -15
  262. package/src/models/storageAccountsMappers.ts +0 -69
  263. package/src/models/usagesMappers.ts +0 -14
  264. package/src/storageManagementClientContext.ts +0 -62
@@ -1,176 +1,286 @@
1
1
  /*
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for
4
- * license information.
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
5
4
  *
6
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is
8
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
9
7
  */
10
8
 
11
- import * as msRest from "@azure/ms-rest-js";
9
+ import {
10
+ OperationParameter,
11
+ OperationURLParameter,
12
+ OperationQueryParameter
13
+ } from "@azure/core-client";
14
+ import {
15
+ StorageAccountCheckNameAvailabilityParameters as StorageAccountCheckNameAvailabilityParametersMapper,
16
+ StorageAccountCreateParameters as StorageAccountCreateParametersMapper,
17
+ StorageAccountUpdateParameters as StorageAccountUpdateParametersMapper,
18
+ StorageAccountRegenerateKeyParameters as StorageAccountRegenerateKeyParametersMapper,
19
+ AccountSasParameters as AccountSasParametersMapper,
20
+ ServiceSasParameters as ServiceSasParametersMapper,
21
+ BlobRestoreParameters as BlobRestoreParametersMapper,
22
+ ManagementPolicy as ManagementPolicyMapper,
23
+ BlobInventoryPolicy as BlobInventoryPolicyMapper,
24
+ PrivateEndpointConnection as PrivateEndpointConnectionMapper,
25
+ ObjectReplicationPolicy as ObjectReplicationPolicyMapper,
26
+ EncryptionScope as EncryptionScopeMapper
27
+ } from "../models/mappers";
12
28
 
13
- export const acceptLanguage: msRest.OperationParameter = {
14
- parameterPath: "acceptLanguage",
29
+ export const accept: OperationParameter = {
30
+ parameterPath: "accept",
15
31
  mapper: {
16
- serializedName: "accept-language",
17
- defaultValue: 'en-US',
32
+ defaultValue: "application/json",
33
+ isConstant: true,
34
+ serializedName: "Accept",
18
35
  type: {
19
36
  name: "String"
20
37
  }
21
38
  }
22
39
  };
23
- export const accountName: msRest.OperationURLParameter = {
24
- parameterPath: "accountName",
40
+
41
+ export const $host: OperationURLParameter = {
42
+ parameterPath: "$host",
25
43
  mapper: {
44
+ serializedName: "$host",
26
45
  required: true,
27
- serializedName: "accountName",
28
- constraints: {
29
- MaxLength: 24,
30
- MinLength: 3
31
- },
32
46
  type: {
33
47
  name: "String"
34
48
  }
35
- }
49
+ },
50
+ skipEncoding: true
36
51
  };
37
- export const apiVersion: msRest.OperationQueryParameter = {
52
+
53
+ export const apiVersion: OperationQueryParameter = {
38
54
  parameterPath: "apiVersion",
39
55
  mapper: {
40
- required: true,
56
+ defaultValue: "2019-06-01",
57
+ isConstant: true,
41
58
  serializedName: "api-version",
59
+ type: {
60
+ name: "String"
61
+ }
62
+ }
63
+ };
64
+
65
+ export const subscriptionId: OperationURLParameter = {
66
+ parameterPath: "subscriptionId",
67
+ mapper: {
42
68
  constraints: {
43
69
  MinLength: 1
44
70
  },
71
+ serializedName: "subscriptionId",
72
+ required: true,
45
73
  type: {
46
74
  name: "String"
47
75
  }
48
76
  }
49
77
  };
50
- export const encryptionScopeName: msRest.OperationURLParameter = {
51
- parameterPath: "encryptionScopeName",
78
+
79
+ export const contentType: OperationParameter = {
80
+ parameterPath: ["options", "contentType"],
81
+ mapper: {
82
+ defaultValue: "application/json",
83
+ isConstant: true,
84
+ serializedName: "Content-Type",
85
+ type: {
86
+ name: "String"
87
+ }
88
+ }
89
+ };
90
+
91
+ export const accountName: OperationParameter = {
92
+ parameterPath: "accountName",
93
+ mapper: StorageAccountCheckNameAvailabilityParametersMapper
94
+ };
95
+
96
+ export const parameters: OperationParameter = {
97
+ parameterPath: "parameters",
98
+ mapper: StorageAccountCreateParametersMapper
99
+ };
100
+
101
+ export const resourceGroupName: OperationURLParameter = {
102
+ parameterPath: "resourceGroupName",
52
103
  mapper: {
104
+ constraints: {
105
+ Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"),
106
+ MaxLength: 90,
107
+ MinLength: 1
108
+ },
109
+ serializedName: "resourceGroupName",
53
110
  required: true,
54
- serializedName: "encryptionScopeName",
111
+ type: {
112
+ name: "String"
113
+ }
114
+ }
115
+ };
116
+
117
+ export const accountName1: OperationURLParameter = {
118
+ parameterPath: "accountName",
119
+ mapper: {
55
120
  constraints: {
56
- MaxLength: 63,
121
+ MaxLength: 24,
57
122
  MinLength: 3
58
123
  },
124
+ serializedName: "accountName",
125
+ required: true,
59
126
  type: {
60
127
  name: "String"
61
128
  }
62
129
  }
63
130
  };
64
- export const expand0: msRest.OperationQueryParameter = {
65
- parameterPath: [
66
- "options",
67
- "expand"
68
- ],
131
+
132
+ export const expand: OperationQueryParameter = {
133
+ parameterPath: ["options", "expand"],
69
134
  mapper: {
70
135
  serializedName: "$expand",
71
136
  type: {
72
137
  name: "Enum",
73
- allowedValues: [
74
- "geoReplicationStats",
75
- "blobRestoreStatus"
76
- ]
138
+ allowedValues: ["geoReplicationStats", "blobRestoreStatus"]
77
139
  }
78
140
  }
79
141
  };
80
- export const expand1: msRest.OperationQueryParameter = {
81
- parameterPath: [
82
- "options",
83
- "expand"
84
- ],
142
+
143
+ export const parameters1: OperationParameter = {
144
+ parameterPath: "parameters",
145
+ mapper: StorageAccountUpdateParametersMapper
146
+ };
147
+
148
+ export const expand1: OperationQueryParameter = {
149
+ parameterPath: ["options", "expand"],
85
150
  mapper: {
151
+ defaultValue: "kerb",
152
+ isConstant: true,
86
153
  serializedName: "$expand",
87
154
  type: {
88
- name: "Enum",
89
- allowedValues: [
90
- "kerb"
91
- ]
155
+ name: "String"
92
156
  }
93
157
  }
94
158
  };
95
- export const location: msRest.OperationURLParameter = {
96
- parameterPath: "location",
159
+
160
+ export const regenerateKey: OperationParameter = {
161
+ parameterPath: "regenerateKey",
162
+ mapper: StorageAccountRegenerateKeyParametersMapper
163
+ };
164
+
165
+ export const parameters2: OperationParameter = {
166
+ parameterPath: "parameters",
167
+ mapper: AccountSasParametersMapper
168
+ };
169
+
170
+ export const parameters3: OperationParameter = {
171
+ parameterPath: "parameters",
172
+ mapper: ServiceSasParametersMapper
173
+ };
174
+
175
+ export const parameters4: OperationParameter = {
176
+ parameterPath: "parameters",
177
+ mapper: BlobRestoreParametersMapper
178
+ };
179
+
180
+ export const nextLink: OperationURLParameter = {
181
+ parameterPath: "nextLink",
97
182
  mapper: {
183
+ serializedName: "nextLink",
98
184
  required: true,
99
- serializedName: "location",
100
185
  type: {
101
186
  name: "String"
102
187
  }
103
- }
188
+ },
189
+ skipEncoding: true
104
190
  };
105
- export const managementPolicyName: msRest.OperationURLParameter = {
106
- parameterPath: "managementPolicyName",
191
+
192
+ export const location: OperationURLParameter = {
193
+ parameterPath: "location",
107
194
  mapper: {
195
+ serializedName: "location",
108
196
  required: true,
109
- isConstant: true,
110
- serializedName: "managementPolicyName",
111
- defaultValue: 'default',
112
197
  type: {
113
198
  name: "String"
114
199
  }
115
200
  }
116
201
  };
117
- export const nextPageLink: msRest.OperationURLParameter = {
118
- parameterPath: "nextPageLink",
202
+
203
+ export const managementPolicyName: OperationURLParameter = {
204
+ parameterPath: "managementPolicyName",
119
205
  mapper: {
206
+ serializedName: "managementPolicyName",
120
207
  required: true,
121
- serializedName: "nextLink",
122
208
  type: {
123
209
  name: "String"
124
210
  }
125
- },
126
- skipEncoding: true
211
+ }
127
212
  };
128
- export const objectReplicationPolicyId: msRest.OperationURLParameter = {
129
- parameterPath: "objectReplicationPolicyId",
213
+
214
+ export const properties: OperationParameter = {
215
+ parameterPath: "properties",
216
+ mapper: ManagementPolicyMapper
217
+ };
218
+
219
+ export const blobInventoryPolicyName: OperationURLParameter = {
220
+ parameterPath: "blobInventoryPolicyName",
130
221
  mapper: {
222
+ serializedName: "blobInventoryPolicyName",
131
223
  required: true,
132
- serializedName: "objectReplicationPolicyId",
133
- constraints: {
134
- MinLength: 1
135
- },
136
224
  type: {
137
225
  name: "String"
138
226
  }
139
227
  }
140
228
  };
141
- export const privateEndpointConnectionName: msRest.OperationURLParameter = {
229
+
230
+ export const properties1: OperationParameter = {
231
+ parameterPath: "properties",
232
+ mapper: BlobInventoryPolicyMapper
233
+ };
234
+
235
+ export const privateEndpointConnectionName: OperationURLParameter = {
142
236
  parameterPath: "privateEndpointConnectionName",
143
237
  mapper: {
144
- required: true,
145
238
  serializedName: "privateEndpointConnectionName",
239
+ required: true,
146
240
  type: {
147
241
  name: "String"
148
242
  }
149
243
  }
150
244
  };
151
- export const resourceGroupName: msRest.OperationURLParameter = {
152
- parameterPath: "resourceGroupName",
245
+
246
+ export const properties2: OperationParameter = {
247
+ parameterPath: "properties",
248
+ mapper: PrivateEndpointConnectionMapper
249
+ };
250
+
251
+ export const objectReplicationPolicyId: OperationURLParameter = {
252
+ parameterPath: "objectReplicationPolicyId",
153
253
  mapper: {
154
- required: true,
155
- serializedName: "resourceGroupName",
156
254
  constraints: {
157
- MaxLength: 90,
158
- MinLength: 1,
159
- Pattern: /^[-\w\._\(\)]+$/
255
+ MinLength: 1
160
256
  },
257
+ serializedName: "objectReplicationPolicyId",
258
+ required: true,
161
259
  type: {
162
260
  name: "String"
163
261
  }
164
262
  }
165
263
  };
166
- export const subscriptionId: msRest.OperationURLParameter = {
167
- parameterPath: "subscriptionId",
264
+
265
+ export const properties3: OperationParameter = {
266
+ parameterPath: "properties",
267
+ mapper: ObjectReplicationPolicyMapper
268
+ };
269
+
270
+ export const encryptionScope: OperationParameter = {
271
+ parameterPath: "encryptionScope",
272
+ mapper: EncryptionScopeMapper
273
+ };
274
+
275
+ export const encryptionScopeName: OperationURLParameter = {
276
+ parameterPath: "encryptionScopeName",
168
277
  mapper: {
169
- required: true,
170
- serializedName: "subscriptionId",
171
278
  constraints: {
172
- MinLength: 1
279
+ MaxLength: 63,
280
+ MinLength: 3
173
281
  },
282
+ serializedName: "encryptionScopeName",
283
+ required: true,
174
284
  type: {
175
285
  name: "String"
176
286
  }
@@ -0,0 +1,282 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { BlobInventoryPolicies } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
+ import * as Parameters from "../models/parameters";
14
+ import { StorageManagementClient } from "../storageManagementClient";
15
+ import {
16
+ BlobInventoryPolicy,
17
+ BlobInventoryPoliciesListOptionalParams,
18
+ BlobInventoryPolicyName,
19
+ BlobInventoryPoliciesGetOptionalParams,
20
+ BlobInventoryPoliciesGetResponse,
21
+ BlobInventoryPoliciesCreateOrUpdateOptionalParams,
22
+ BlobInventoryPoliciesCreateOrUpdateResponse,
23
+ BlobInventoryPoliciesDeleteOptionalParams,
24
+ BlobInventoryPoliciesListResponse
25
+ } from "../models";
26
+
27
+ /// <reference lib="esnext.asynciterable" />
28
+ /** Class containing BlobInventoryPolicies operations. */
29
+ export class BlobInventoryPoliciesImpl implements BlobInventoryPolicies {
30
+ private readonly client: StorageManagementClient;
31
+
32
+ /**
33
+ * Initialize a new instance of the class BlobInventoryPolicies class.
34
+ * @param client Reference to the service client
35
+ */
36
+ constructor(client: StorageManagementClient) {
37
+ this.client = client;
38
+ }
39
+
40
+ /**
41
+ * Gets the blob inventory policy associated with the specified storage account.
42
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
43
+ * case insensitive.
44
+ * @param accountName The name of the storage account within the specified resource group. Storage
45
+ * account names must be between 3 and 24 characters in length and use numbers and lower-case letters
46
+ * only.
47
+ * @param options The options parameters.
48
+ */
49
+ public list(
50
+ resourceGroupName: string,
51
+ accountName: string,
52
+ options?: BlobInventoryPoliciesListOptionalParams
53
+ ): PagedAsyncIterableIterator<BlobInventoryPolicy> {
54
+ const iter = this.listPagingAll(resourceGroupName, accountName, options);
55
+ return {
56
+ next() {
57
+ return iter.next();
58
+ },
59
+ [Symbol.asyncIterator]() {
60
+ return this;
61
+ },
62
+ byPage: () => {
63
+ return this.listPagingPage(resourceGroupName, accountName, options);
64
+ }
65
+ };
66
+ }
67
+
68
+ private async *listPagingPage(
69
+ resourceGroupName: string,
70
+ accountName: string,
71
+ options?: BlobInventoryPoliciesListOptionalParams
72
+ ): AsyncIterableIterator<BlobInventoryPolicy[]> {
73
+ let result = await this._list(resourceGroupName, accountName, options);
74
+ yield result.value || [];
75
+ }
76
+
77
+ private async *listPagingAll(
78
+ resourceGroupName: string,
79
+ accountName: string,
80
+ options?: BlobInventoryPoliciesListOptionalParams
81
+ ): AsyncIterableIterator<BlobInventoryPolicy> {
82
+ for await (const page of this.listPagingPage(
83
+ resourceGroupName,
84
+ accountName,
85
+ options
86
+ )) {
87
+ yield* page;
88
+ }
89
+ }
90
+
91
+ /**
92
+ * Gets the blob inventory policy associated with the specified storage account.
93
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
94
+ * case insensitive.
95
+ * @param accountName The name of the storage account within the specified resource group. Storage
96
+ * account names must be between 3 and 24 characters in length and use numbers and lower-case letters
97
+ * only.
98
+ * @param blobInventoryPolicyName The name of the storage account blob inventory policy. It should
99
+ * always be 'default'
100
+ * @param options The options parameters.
101
+ */
102
+ get(
103
+ resourceGroupName: string,
104
+ accountName: string,
105
+ blobInventoryPolicyName: BlobInventoryPolicyName,
106
+ options?: BlobInventoryPoliciesGetOptionalParams
107
+ ): Promise<BlobInventoryPoliciesGetResponse> {
108
+ return this.client.sendOperationRequest(
109
+ { resourceGroupName, accountName, blobInventoryPolicyName, options },
110
+ getOperationSpec
111
+ );
112
+ }
113
+
114
+ /**
115
+ * Sets the blob inventory policy to the specified storage account.
116
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
117
+ * case insensitive.
118
+ * @param accountName The name of the storage account within the specified resource group. Storage
119
+ * account names must be between 3 and 24 characters in length and use numbers and lower-case letters
120
+ * only.
121
+ * @param blobInventoryPolicyName The name of the storage account blob inventory policy. It should
122
+ * always be 'default'
123
+ * @param properties The blob inventory policy set to a storage account.
124
+ * @param options The options parameters.
125
+ */
126
+ createOrUpdate(
127
+ resourceGroupName: string,
128
+ accountName: string,
129
+ blobInventoryPolicyName: BlobInventoryPolicyName,
130
+ properties: BlobInventoryPolicy,
131
+ options?: BlobInventoryPoliciesCreateOrUpdateOptionalParams
132
+ ): Promise<BlobInventoryPoliciesCreateOrUpdateResponse> {
133
+ return this.client.sendOperationRequest(
134
+ {
135
+ resourceGroupName,
136
+ accountName,
137
+ blobInventoryPolicyName,
138
+ properties,
139
+ options
140
+ },
141
+ createOrUpdateOperationSpec
142
+ );
143
+ }
144
+
145
+ /**
146
+ * Deletes the blob inventory policy associated with the specified storage account.
147
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
148
+ * case insensitive.
149
+ * @param accountName The name of the storage account within the specified resource group. Storage
150
+ * account names must be between 3 and 24 characters in length and use numbers and lower-case letters
151
+ * only.
152
+ * @param blobInventoryPolicyName The name of the storage account blob inventory policy. It should
153
+ * always be 'default'
154
+ * @param options The options parameters.
155
+ */
156
+ delete(
157
+ resourceGroupName: string,
158
+ accountName: string,
159
+ blobInventoryPolicyName: BlobInventoryPolicyName,
160
+ options?: BlobInventoryPoliciesDeleteOptionalParams
161
+ ): Promise<void> {
162
+ return this.client.sendOperationRequest(
163
+ { resourceGroupName, accountName, blobInventoryPolicyName, options },
164
+ deleteOperationSpec
165
+ );
166
+ }
167
+
168
+ /**
169
+ * Gets the blob inventory policy associated with the specified storage account.
170
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
171
+ * case insensitive.
172
+ * @param accountName The name of the storage account within the specified resource group. Storage
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
+ private _list(
178
+ resourceGroupName: string,
179
+ accountName: string,
180
+ options?: BlobInventoryPoliciesListOptionalParams
181
+ ): Promise<BlobInventoryPoliciesListResponse> {
182
+ return this.client.sendOperationRequest(
183
+ { resourceGroupName, accountName, options },
184
+ listOperationSpec
185
+ );
186
+ }
187
+ }
188
+ // Operation Specifications
189
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
190
+
191
+ const getOperationSpec: coreClient.OperationSpec = {
192
+ path:
193
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/inventoryPolicies/{blobInventoryPolicyName}",
194
+ httpMethod: "GET",
195
+ responses: {
196
+ 200: {
197
+ bodyMapper: Mappers.BlobInventoryPolicy
198
+ },
199
+ default: {
200
+ bodyMapper: Mappers.ErrorResponse
201
+ }
202
+ },
203
+ queryParameters: [Parameters.apiVersion],
204
+ urlParameters: [
205
+ Parameters.$host,
206
+ Parameters.subscriptionId,
207
+ Parameters.resourceGroupName,
208
+ Parameters.accountName1,
209
+ Parameters.blobInventoryPolicyName
210
+ ],
211
+ headerParameters: [Parameters.accept],
212
+ serializer
213
+ };
214
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
215
+ path:
216
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/inventoryPolicies/{blobInventoryPolicyName}",
217
+ httpMethod: "PUT",
218
+ responses: {
219
+ 200: {
220
+ bodyMapper: Mappers.BlobInventoryPolicy
221
+ },
222
+ default: {
223
+ bodyMapper: Mappers.ErrorResponse
224
+ }
225
+ },
226
+ requestBody: Parameters.properties1,
227
+ queryParameters: [Parameters.apiVersion],
228
+ urlParameters: [
229
+ Parameters.$host,
230
+ Parameters.subscriptionId,
231
+ Parameters.resourceGroupName,
232
+ Parameters.accountName1,
233
+ Parameters.blobInventoryPolicyName
234
+ ],
235
+ headerParameters: [Parameters.accept, Parameters.contentType],
236
+ mediaType: "json",
237
+ serializer
238
+ };
239
+ const deleteOperationSpec: coreClient.OperationSpec = {
240
+ path:
241
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/inventoryPolicies/{blobInventoryPolicyName}",
242
+ httpMethod: "DELETE",
243
+ responses: {
244
+ 200: {},
245
+ 204: {},
246
+ default: {
247
+ bodyMapper: Mappers.ErrorResponse
248
+ }
249
+ },
250
+ queryParameters: [Parameters.apiVersion],
251
+ urlParameters: [
252
+ Parameters.$host,
253
+ Parameters.subscriptionId,
254
+ Parameters.resourceGroupName,
255
+ Parameters.accountName1,
256
+ Parameters.blobInventoryPolicyName
257
+ ],
258
+ headerParameters: [Parameters.accept],
259
+ serializer
260
+ };
261
+ const listOperationSpec: coreClient.OperationSpec = {
262
+ path:
263
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/inventoryPolicies",
264
+ httpMethod: "GET",
265
+ responses: {
266
+ 200: {
267
+ bodyMapper: Mappers.ListBlobInventoryPolicy
268
+ },
269
+ default: {
270
+ bodyMapper: Mappers.ErrorResponse
271
+ }
272
+ },
273
+ queryParameters: [Parameters.apiVersion],
274
+ urlParameters: [
275
+ Parameters.$host,
276
+ Parameters.subscriptionId,
277
+ Parameters.resourceGroupName,
278
+ Parameters.accountName1
279
+ ],
280
+ headerParameters: [Parameters.accept],
281
+ serializer
282
+ };