@azure/arm-storage-profile-2020-09-01-hybrid 1.1.1 → 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 +80 -80
  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 -23
  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 +104 -51
  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 -5027
  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 -32
  248. package/esm/storageManagementClient.d.ts.map +0 -1
  249. package/esm/storageManagementClient.js +0 -46
  250. package/esm/storageManagementClient.js.map +0 -1
  251. package/esm/storageManagementClientContext.d.ts +0 -22
  252. package/esm/storageManagementClientContext.d.ts.map +0 -1
  253. package/esm/storageManagementClientContext.js +0 -61
  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 -68
package/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Release History
2
+
3
+ ## 2.0.0 (2022-03-09)
4
+
5
+ The package of @azure/arm-storage-profile-2020-09-01-hybrid is using our next generation design principles since version 2.0.0, which contains breaking changes.
6
+
7
+ To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
8
+
9
+ To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).
10
+
11
+ To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Microsoft
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,109 +1,109 @@
1
- ## Azure StorageManagementClient SDK for JavaScript
1
+ # Azure StorageManagement client library for JavaScript
2
2
 
3
- This package contains an isomorphic SDK (runs both in Node.js and in browsers) for StorageManagementClient.
3
+ This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure StorageManagement client.
4
+
5
+ The Azure Storage Management API.
6
+
7
+ [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/arm-storage-profile-2020-09-01-hybrid) |
8
+ [Package (NPM)](https://www.npmjs.com/package/@azure/arm-storage-profile-2020-09-01-hybrid) |
9
+ [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-storage-profile-2020-09-01-hybrid) |
10
+ [Samples](https://github.com/Azure-Samples/azure-samples-js-management)
11
+
12
+ ## Getting started
4
13
 
5
14
  ### Currently supported environments
6
15
 
7
16
  - [LTS versions of Node.js](https://nodejs.org/about/releases/)
8
- - Latest versions of Safari, Chrome, Edge, and Firefox.
17
+ - Latest versions of Safari, Chrome, Edge and Firefox.
18
+
19
+ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
9
20
 
10
21
  ### Prerequisites
11
22
 
12
- You must have an [Azure subscription](https://azure.microsoft.com/free/).
23
+ - An [Azure subscription][azure_sub].
13
24
 
14
- ### How to install
25
+ ### Install the `@azure/arm-storage-profile-2020-09-01-hybrid` package
15
26
 
16
- To use this SDK in your project, you will need to install two packages.
17
- - `@azure/arm-storage-profile-2020-09-01-hybrid` that contains the client.
18
- - `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory.
27
+ Install the Azure StorageManagement client library for JavaScript with `npm`:
19
28
 
20
- Install both packages using the below command:
21
29
  ```bash
22
- npm install --save @azure/arm-storage-profile-2020-09-01-hybrid @azure/identity
30
+ npm install @azure/arm-storage-profile-2020-09-01-hybrid
23
31
  ```
24
32
 
25
- > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features.
26
- If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options.
33
+ ### Create and authenticate a `StorageManagementClient`
27
34
 
28
- ### How to use
35
+ To create a client object to access the Azure StorageManagement API, you will need the `endpoint` of your Azure StorageManagement resource and a `credential`. The Azure StorageManagement client can use Azure Active Directory credentials to authenticate.
36
+ You can find the endpoint for your Azure StorageManagement resource in the [Azure Portal][azure_portal].
29
37
 
30
- - If you are writing a client side browser application,
31
- - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions.
32
- - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below.
33
- - If you are writing a server side application,
34
- - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples)
35
- - Complete the set up steps required by the credential if any.
36
- - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below.
38
+ You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
37
39
 
38
- In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
39
- Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started.
40
+ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
41
+
42
+ ```bash
43
+ npm install @azure/identity
44
+ ```
40
45
 
41
- #### nodejs - Authentication, client creation, and list operations as an example written in JavaScript.
46
+ You will also need to **register a new AAD application and grant access to Azure StorageManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
47
+ Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
42
48
 
43
- ##### Sample code
49
+ For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
44
50
 
45
51
  ```javascript
46
- const { DefaultAzureCredential } = require("@azure/identity");
47
52
  const { StorageManagementClient } = require("@azure/arm-storage-profile-2020-09-01-hybrid");
48
- const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
49
-
50
- // Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples
51
- // Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead.
52
- const creds = new DefaultAzureCredential();
53
- const client = new StorageManagementClient(creds, subscriptionId);
54
-
55
- client.operations.list().then((result) => {
56
- console.log("The result is:");
57
- console.log(result);
58
- }).catch((err) => {
59
- console.log("An error occurred:");
60
- console.error(err);
61
- });
53
+ const { DefaultAzureCredential } = require("@azure/identity");
54
+ // For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
55
+
56
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
57
+ const client = new StorageManagementClient(new DefaultAzureCredential(), subscriptionId);
58
+
59
+ // For client-side applications running in the browser, use this code instead:
60
+ // const credential = new InteractiveBrowserCredential({
61
+ // tenantId: "<YOUR_TENANT_ID>",
62
+ // clientId: "<YOUR_CLIENT_ID>"
63
+ // });
64
+ // const client = new StorageManagementClient(credential, subscriptionId);
62
65
  ```
63
66
 
64
- #### browser - Authentication, client creation, and list operations as an example written in JavaScript.
65
-
66
- In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser.
67
- - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser.
68
- - Note down the client Id from the previous step and use it in the browser sample below.
69
-
70
- ##### Sample code
71
-
72
- - index.html
73
-
74
- ```html
75
- <!DOCTYPE html>
76
- <html lang="en">
77
- <head>
78
- <title>@azure/arm-storage-profile-2020-09-01-hybrid sample</title>
79
- <script src="node_modules/@azure/ms-rest-azure-js/dist/msRestAzure.js"></script>
80
- <script src="node_modules/@azure/identity/dist/index.js"></script>
81
- <script src="node_modules/@azure/arm-storage-profile-2020-09-01-hybrid/dist/arm-storage-profile-2020-09-01-hybrid.js"></script>
82
- <script type="text/javascript">
83
- const subscriptionId = "<Subscription_Id>";
84
- // Create credentials using the `@azure/identity` package.
85
- // Please note that you can also use credentials from the `@azure/ms-rest-browserauth` package instead.
86
- const credential = new InteractiveBrowserCredential(
87
- {
88
- clientId: "<client id for your Azure AD app>",
89
- tenantId: "<optional tenant for your organization>"
90
- });
91
- const client = new Azure.ArmStorageProfile20200901Hybrid.StorageManagementClient(creds, subscriptionId);
92
- client.operations.list().then((result) => {
93
- console.log("The result is:");
94
- console.log(result);
95
- }).catch((err) => {
96
- console.log("An error occurred:");
97
- console.error(err);
98
- });
99
- </script>
100
- </head>
101
- <body></body>
102
- </html>
67
+
68
+ ### JavaScript Bundle
69
+ To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
70
+
71
+ ## Key concepts
72
+
73
+ ### StorageManagementClient
74
+
75
+ `StorageManagementClient` is the primary interface for developers using the Azure StorageManagement client library. Explore the methods on this client object to understand the different features of the Azure StorageManagement service that you can access.
76
+
77
+ ## Troubleshooting
78
+
79
+ ### Logging
80
+
81
+ Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
82
+
83
+ ```javascript
84
+ const { setLogLevel } = require("@azure/logger");
85
+ setLogLevel("info");
103
86
  ```
104
87
 
88
+ For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
89
+
90
+ ## Next steps
91
+
92
+ Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.
93
+
94
+ ## Contributing
95
+
96
+ If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
97
+
105
98
  ## Related projects
106
99
 
107
- - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
100
+ - [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
101
+
102
+ ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fstorage%2Farm-storage-profile-2020-09-01-hybrid%2FREADME.png)
108
103
 
109
- ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/storage/arm-storage-profile-2020-09-01-hybrid/README.png)
104
+ [azure_cli]: https://docs.microsoft.com/cli/azure
105
+ [azure_sub]: https://azure.microsoft.com/free/
106
+ [azure_sub]: https://azure.microsoft.com/free/
107
+ [azure_portal]: https://portal.azure.com
108
+ [azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
109
+ [defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential