@azure/arm-hdinsight 0.23.1 → 1.1.1-alpha.20220105.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 (268) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/{LICENSE.txt → LICENSE} +1 -1
  3. package/README.md +70 -92
  4. package/dist/index.js +7702 -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/hDInsightManagementClient.d.ts +29 -0
  9. package/dist-esm/src/hDInsightManagementClient.d.ts.map +1 -0
  10. package/dist-esm/src/hDInsightManagementClient.js +62 -0
  11. package/dist-esm/src/hDInsightManagementClient.js.map +1 -0
  12. package/dist-esm/src/index.d.ts +5 -0
  13. package/dist-esm/src/index.d.ts.map +1 -0
  14. package/{esm/models/virtualMachinesMappers.js → dist-esm/src/index.js} +5 -2
  15. package/dist-esm/src/index.js.map +1 -0
  16. package/dist-esm/src/lroImpl.d.ts +16 -0
  17. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  18. package/dist-esm/src/lroImpl.js +29 -0
  19. package/dist-esm/src/lroImpl.js.map +1 -0
  20. package/dist-esm/src/models/index.d.ts +1966 -0
  21. package/dist-esm/src/models/index.d.ts.map +1 -0
  22. package/dist-esm/src/models/index.js +133 -0
  23. package/dist-esm/src/models/index.js.map +1 -0
  24. package/dist-esm/src/models/mappers.d.ts +111 -0
  25. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  26. package/{esm → dist-esm/src}/models/mappers.js +1608 -1482
  27. package/dist-esm/src/models/mappers.js.map +1 -0
  28. package/dist-esm/src/models/parameters.d.ts +37 -0
  29. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  30. package/dist-esm/src/models/parameters.js +280 -0
  31. package/dist-esm/src/models/parameters.js.map +1 -0
  32. package/dist-esm/src/operations/applications.d.ts +90 -0
  33. package/dist-esm/src/operations/applications.d.ts.map +1 -0
  34. package/dist-esm/src/operations/applications.js +367 -0
  35. package/dist-esm/src/operations/applications.js.map +1 -0
  36. package/dist-esm/src/operations/clusters.d.ts +214 -0
  37. package/dist-esm/src/operations/clusters.d.ts.map +1 -0
  38. package/dist-esm/src/operations/clusters.js +979 -0
  39. package/dist-esm/src/operations/clusters.js.map +1 -0
  40. package/dist-esm/src/operations/configurations.d.ts +54 -0
  41. package/dist-esm/src/operations/configurations.d.ts.map +1 -0
  42. package/dist-esm/src/operations/configurations.js +178 -0
  43. package/dist-esm/src/operations/configurations.js.map +1 -0
  44. package/dist-esm/src/operations/extensions.d.ts +139 -0
  45. package/dist-esm/src/operations/extensions.d.ts.map +1 -0
  46. package/dist-esm/src/operations/extensions.js +602 -0
  47. package/dist-esm/src/operations/extensions.js.map +1 -0
  48. package/{esm → dist-esm/src}/operations/index.d.ts +2 -0
  49. package/dist-esm/src/operations/index.d.ts.map +1 -0
  50. package/dist-esm/src/operations/index.js +19 -0
  51. package/dist-esm/src/operations/index.js.map +1 -0
  52. package/dist-esm/src/operations/locations.d.ts +52 -0
  53. package/dist-esm/src/operations/locations.d.ts.map +1 -0
  54. package/dist-esm/src/operations/locations.js +199 -0
  55. package/dist-esm/src/operations/locations.js.map +1 -0
  56. package/dist-esm/src/operations/operations.d.ts +32 -0
  57. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  58. package/dist-esm/src/operations/operations.js +120 -0
  59. package/dist-esm/src/operations/operations.js.map +1 -0
  60. package/dist-esm/src/operations/privateEndpointConnections.d.ts +81 -0
  61. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  62. package/dist-esm/src/operations/privateEndpointConnections.js +349 -0
  63. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  64. package/dist-esm/src/operations/privateLinkResources.d.ts +28 -0
  65. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
  66. package/dist-esm/src/operations/privateLinkResources.js +85 -0
  67. package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
  68. package/dist-esm/src/operations/scriptActions.d.ts +62 -0
  69. package/dist-esm/src/operations/scriptActions.d.ts.map +1 -0
  70. package/dist-esm/src/operations/scriptActions.js +232 -0
  71. package/dist-esm/src/operations/scriptActions.js.map +1 -0
  72. package/dist-esm/src/operations/scriptExecutionHistory.d.ts +46 -0
  73. package/dist-esm/src/operations/scriptExecutionHistory.d.ts.map +1 -0
  74. package/dist-esm/src/operations/scriptExecutionHistory.js +167 -0
  75. package/dist-esm/src/operations/scriptExecutionHistory.js.map +1 -0
  76. package/dist-esm/src/operations/virtualMachines.d.ts +45 -0
  77. package/dist-esm/src/operations/virtualMachines.d.ts.map +1 -0
  78. package/dist-esm/src/operations/virtualMachines.js +169 -0
  79. package/dist-esm/src/operations/virtualMachines.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/applications.d.ts +65 -0
  81. package/dist-esm/src/operationsInterfaces/applications.d.ts.map +1 -0
  82. package/{src/models/configurationsMappers.ts → dist-esm/src/operationsInterfaces/applications.js} +2 -5
  83. package/dist-esm/src/operationsInterfaces/applications.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/clusters.d.ts +178 -0
  85. package/dist-esm/src/operationsInterfaces/clusters.d.ts.map +1 -0
  86. package/{esm/models/index.js → dist-esm/src/operationsInterfaces/clusters.js} +2 -1
  87. package/dist-esm/src/operationsInterfaces/clusters.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/configurations.d.ts +46 -0
  89. package/dist-esm/src/operationsInterfaces/configurations.d.ts.map +1 -0
  90. package/{src/models/virtualMachinesMappers.ts → dist-esm/src/operationsInterfaces/configurations.js} +2 -2
  91. package/dist-esm/src/operationsInterfaces/configurations.js.map +1 -0
  92. package/dist-esm/src/operationsInterfaces/extensions.d.ts +131 -0
  93. package/dist-esm/src/operationsInterfaces/extensions.d.ts.map +1 -0
  94. package/{esm/models/configurationsMappers.js → dist-esm/src/operationsInterfaces/extensions.js} +2 -2
  95. package/dist-esm/src/operationsInterfaces/extensions.js.map +1 -0
  96. package/dist-esm/src/operationsInterfaces/index.d.ts +12 -0
  97. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  98. package/dist-esm/src/operationsInterfaces/index.js +19 -0
  99. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  100. package/dist-esm/src/operationsInterfaces/locations.d.ts +44 -0
  101. package/dist-esm/src/operationsInterfaces/locations.d.ts.map +1 -0
  102. package/dist-esm/src/operationsInterfaces/locations.js +9 -0
  103. package/dist-esm/src/operationsInterfaces/locations.js.map +1 -0
  104. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  105. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  106. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  107. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  108. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +56 -0
  109. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  110. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  111. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  112. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +20 -0
  113. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
  114. package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
  115. package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
  116. package/dist-esm/src/operationsInterfaces/scriptActions.d.ts +37 -0
  117. package/dist-esm/src/operationsInterfaces/scriptActions.d.ts.map +1 -0
  118. package/dist-esm/src/operationsInterfaces/scriptActions.js +9 -0
  119. package/dist-esm/src/operationsInterfaces/scriptActions.js.map +1 -0
  120. package/dist-esm/src/operationsInterfaces/scriptExecutionHistory.d.ts +21 -0
  121. package/dist-esm/src/operationsInterfaces/scriptExecutionHistory.d.ts.map +1 -0
  122. package/dist-esm/src/operationsInterfaces/scriptExecutionHistory.js +9 -0
  123. package/dist-esm/src/operationsInterfaces/scriptExecutionHistory.js.map +1 -0
  124. package/dist-esm/src/operationsInterfaces/virtualMachines.d.ts +37 -0
  125. package/dist-esm/src/operationsInterfaces/virtualMachines.d.ts.map +1 -0
  126. package/dist-esm/src/operationsInterfaces/virtualMachines.js +9 -0
  127. package/dist-esm/src/operationsInterfaces/virtualMachines.js.map +1 -0
  128. package/dist-esm/test/sampleTest.d.ts +2 -0
  129. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  130. package/dist-esm/test/sampleTest.js +40 -0
  131. package/dist-esm/test/sampleTest.js.map +1 -0
  132. package/package.json +65 -22
  133. package/review/arm-hdinsight.api.md +1678 -0
  134. package/rollup.config.js +181 -30
  135. package/src/hDInsightManagementClient.ts +102 -49
  136. package/src/{models/scriptExecutionHistoryMappers.ts → index.ts} +4 -7
  137. package/src/lroImpl.ts +34 -0
  138. package/src/models/index.ts +1734 -2505
  139. package/src/models/mappers.ts +1637 -1487
  140. package/src/models/parameters.ts +229 -47
  141. package/src/operations/applications.ts +341 -306
  142. package/src/operations/clusters.ts +990 -747
  143. package/src/operations/configurations.ts +162 -154
  144. package/src/operations/extensions.ts +599 -484
  145. package/src/operations/index.ts +3 -2
  146. package/src/operations/locations.ts +134 -295
  147. package/src/operations/operations.ts +85 -73
  148. package/src/operations/privateEndpointConnections.ts +495 -0
  149. package/src/operations/privateLinkResources.ts +116 -0
  150. package/src/operations/scriptActions.ts +184 -269
  151. package/src/operations/scriptExecutionHistory.ts +155 -123
  152. package/src/operations/virtualMachines.ts +142 -179
  153. package/src/operationsInterfaces/applications.ts +126 -0
  154. package/src/operationsInterfaces/clusters.ts +327 -0
  155. package/src/operationsInterfaces/configurations.ts +77 -0
  156. package/src/operationsInterfaces/extensions.ts +234 -0
  157. package/{esm/operations/index.js → src/operationsInterfaces/index.ts} +4 -3
  158. package/src/operationsInterfaces/locations.ts +88 -0
  159. package/src/operationsInterfaces/operations.ts +22 -0
  160. package/src/operationsInterfaces/privateEndpointConnections.ts +109 -0
  161. package/src/operationsInterfaces/privateLinkResources.ts +42 -0
  162. package/src/operationsInterfaces/scriptActions.ts +73 -0
  163. package/src/operationsInterfaces/scriptExecutionHistory.ts +43 -0
  164. package/src/operationsInterfaces/virtualMachines.ts +70 -0
  165. package/tsconfig.json +3 -3
  166. package/types/arm-hdinsight.d.ts +2866 -0
  167. package/types/tsdoc-metadata.json +11 -0
  168. package/dist/arm-hdinsight.js +0 -6382
  169. package/dist/arm-hdinsight.js.map +0 -1
  170. package/dist/arm-hdinsight.min.js +0 -1
  171. package/dist/arm-hdinsight.min.js.map +0 -1
  172. package/esm/hDInsightManagementClient.d.ts +0 -33
  173. package/esm/hDInsightManagementClient.d.ts.map +0 -1
  174. package/esm/hDInsightManagementClient.js +0 -46
  175. package/esm/hDInsightManagementClient.js.map +0 -1
  176. package/esm/hDInsightManagementClientContext.d.ts +0 -23
  177. package/esm/hDInsightManagementClientContext.d.ts.map +0 -1
  178. package/esm/hDInsightManagementClientContext.js +0 -62
  179. package/esm/hDInsightManagementClientContext.js.map +0 -1
  180. package/esm/models/applicationsMappers.d.ts +0 -2
  181. package/esm/models/applicationsMappers.d.ts.map +0 -1
  182. package/esm/models/applicationsMappers.js +0 -9
  183. package/esm/models/applicationsMappers.js.map +0 -1
  184. package/esm/models/clustersMappers.d.ts +0 -2
  185. package/esm/models/clustersMappers.d.ts.map +0 -1
  186. package/esm/models/clustersMappers.js +0 -9
  187. package/esm/models/clustersMappers.js.map +0 -1
  188. package/esm/models/configurationsMappers.d.ts +0 -2
  189. package/esm/models/configurationsMappers.d.ts.map +0 -1
  190. package/esm/models/configurationsMappers.js.map +0 -1
  191. package/esm/models/extensionsMappers.d.ts +0 -2
  192. package/esm/models/extensionsMappers.d.ts.map +0 -1
  193. package/esm/models/extensionsMappers.js +0 -9
  194. package/esm/models/extensionsMappers.js.map +0 -1
  195. package/esm/models/index.d.ts +0 -2804
  196. package/esm/models/index.d.ts.map +0 -1
  197. package/esm/models/index.js.map +0 -1
  198. package/esm/models/locationsMappers.d.ts +0 -2
  199. package/esm/models/locationsMappers.d.ts.map +0 -1
  200. package/esm/models/locationsMappers.js +0 -9
  201. package/esm/models/locationsMappers.js.map +0 -1
  202. package/esm/models/mappers.d.ts +0 -105
  203. package/esm/models/mappers.d.ts.map +0 -1
  204. package/esm/models/mappers.js.map +0 -1
  205. package/esm/models/operationsMappers.d.ts +0 -2
  206. package/esm/models/operationsMappers.d.ts.map +0 -1
  207. package/esm/models/operationsMappers.js +0 -9
  208. package/esm/models/operationsMappers.js.map +0 -1
  209. package/esm/models/parameters.d.ts +0 -16
  210. package/esm/models/parameters.d.ts.map +0 -1
  211. package/esm/models/parameters.js +0 -152
  212. package/esm/models/parameters.js.map +0 -1
  213. package/esm/models/scriptActionsMappers.d.ts +0 -2
  214. package/esm/models/scriptActionsMappers.d.ts.map +0 -1
  215. package/esm/models/scriptActionsMappers.js +0 -9
  216. package/esm/models/scriptActionsMappers.js.map +0 -1
  217. package/esm/models/scriptExecutionHistoryMappers.d.ts +0 -2
  218. package/esm/models/scriptExecutionHistoryMappers.d.ts.map +0 -1
  219. package/esm/models/scriptExecutionHistoryMappers.js +0 -9
  220. package/esm/models/scriptExecutionHistoryMappers.js.map +0 -1
  221. package/esm/models/virtualMachinesMappers.d.ts +0 -2
  222. package/esm/models/virtualMachinesMappers.d.ts.map +0 -1
  223. package/esm/models/virtualMachinesMappers.js.map +0 -1
  224. package/esm/operations/applications.d.ts +0 -142
  225. package/esm/operations/applications.d.ts.map +0 -1
  226. package/esm/operations/applications.js +0 -236
  227. package/esm/operations/applications.js.map +0 -1
  228. package/esm/operations/clusters.d.ts +0 -315
  229. package/esm/operations/clusters.d.ts.map +0 -1
  230. package/esm/operations/clusters.js +0 -599
  231. package/esm/operations/clusters.js.map +0 -1
  232. package/esm/operations/configurations.d.ts +0 -90
  233. package/esm/operations/configurations.d.ts.map +0 -1
  234. package/esm/operations/configurations.js +0 -173
  235. package/esm/operations/configurations.js.map +0 -1
  236. package/esm/operations/extensions.d.ts +0 -213
  237. package/esm/operations/extensions.d.ts.map +0 -1
  238. package/esm/operations/extensions.js +0 -409
  239. package/esm/operations/extensions.js.map +0 -1
  240. package/esm/operations/index.d.ts.map +0 -1
  241. package/esm/operations/index.js.map +0 -1
  242. package/esm/operations/locations.d.ts +0 -130
  243. package/esm/operations/locations.d.ts.map +0 -1
  244. package/esm/operations/locations.js +0 -170
  245. package/esm/operations/locations.js.map +0 -1
  246. package/esm/operations/operations.d.ts +0 -46
  247. package/esm/operations/operations.d.ts.map +0 -1
  248. package/esm/operations/operations.js +0 -79
  249. package/esm/operations/operations.js.map +0 -1
  250. package/esm/operations/scriptActions.d.ts +0 -124
  251. package/esm/operations/scriptActions.d.ts.map +0 -1
  252. package/esm/operations/scriptActions.js +0 -158
  253. package/esm/operations/scriptActions.js.map +0 -1
  254. package/esm/operations/scriptExecutionHistory.d.ts +0 -76
  255. package/esm/operations/scriptExecutionHistory.d.ts.map +0 -1
  256. package/esm/operations/scriptExecutionHistory.js +0 -117
  257. package/esm/operations/scriptExecutionHistory.js.map +0 -1
  258. package/esm/operations/virtualMachines.d.ts +0 -77
  259. package/esm/operations/virtualMachines.d.ts.map +0 -1
  260. package/esm/operations/virtualMachines.js +0 -146
  261. package/esm/operations/virtualMachines.js.map +0 -1
  262. package/src/hDInsightManagementClientContext.ts +0 -75
  263. package/src/models/applicationsMappers.ts +0 -57
  264. package/src/models/clustersMappers.ts +0 -68
  265. package/src/models/extensionsMappers.ts +0 -20
  266. package/src/models/locationsMappers.ts +0 -65
  267. package/src/models/operationsMappers.ts +0 -18
  268. package/src/models/scriptActionsMappers.ts +0 -17
package/CHANGELOG.md ADDED
@@ -0,0 +1,15 @@
1
+ # Release History
2
+
3
+ ## 1.1.1 (Unreleased)
4
+
5
+ ### Features Added
6
+
7
+ ### Breaking Changes
8
+
9
+ ### Bugs Fixed
10
+
11
+ ### Other Changes
12
+
13
+ ## 1.1.0 (2021-12-29)
14
+
15
+ The package of @azure/arm-hdinsight is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,120 +1,98 @@
1
- ## Azure HDInsightManagementClient SDK for JavaScript
1
+ # Azure HDInsightManagement client library for JavaScript
2
2
 
3
- This package contains an isomorphic SDK (runs both in node.js and in browsers) for HDInsightManagementClient.
3
+ This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure HDInsightManagement client.
4
4
 
5
- ### Currently supported environments
5
+ HDInsight Management Client
6
6
 
7
- - Node.js version 8.x.x or higher
8
- - Browser JavaScript
7
+ [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hdinsight/arm-hdinsight) |
8
+ [Package (NPM)](https://www.npmjs.com/package/@azure/arm-hdinsight) |
9
+ [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-hdinsight) |
10
+ [Samples](https://github.com/Azure-Samples/azure-samples-js-management)
9
11
 
10
- ### Prerequisites
12
+ ## Getting started
11
13
 
12
- You must have an [Azure subscription](https://azure.microsoft.com/free/).
14
+ ### Currently supported environments
13
15
 
14
- ### How to install
16
+ - [LTS versions of Node.js](https://nodejs.org/about/releases/)
17
+ - Latest versions of Safari, Chrome, Edge and Firefox.
15
18
 
16
- To use this SDK in your project, you will need to install two packages.
19
+ ### Prerequisites
17
20
 
18
- - `@azure/arm-hdinsight` that contains the client.
19
- - `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory.
21
+ - An [Azure subscription][azure_sub].
20
22
 
21
- Install both packages using the below command:
23
+ ### Install the `@azure/arm-hdinsight` package
24
+
25
+ Install the Azure HDInsightManagement client library for JavaScript with `npm`:
22
26
 
23
27
  ```bash
24
- npm install --save @azure/arm-hdinsight @azure/identity
28
+ npm install @azure/arm-hdinsight
25
29
  ```
26
30
 
27
- > **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.
28
- > 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.
31
+ ### Create and authenticate a `HDInsightManagementClient`
29
32
 
30
- ### How to use
33
+ To create a client object to access the Azure HDInsightManagement API, you will need the `endpoint` of your Azure HDInsightManagement resource and a `credential`. The Azure HDInsightManagement client can use Azure Active Directory credentials to authenticate.
34
+ You can find the endpoint for your Azure HDInsightManagement resource in the [Azure Portal][azure_portal].
31
35
 
32
- - If you are writing a client side browser application,
33
- - 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.
34
- - 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.
35
- - If you are writing a server side application,
36
- - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples)
37
- - Complete the set up steps required by the credential if any.
38
- - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below.
36
+ 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).
39
37
 
40
- In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
41
- 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.
38
+ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
42
39
 
43
- #### nodejs - Authentication, client creation, and get clusters as an example written in JavaScript.
40
+ ```bash
41
+ npm install @azure/identity
42
+ ```
44
43
 
45
- ##### Sample code
44
+ You will also need to **register a new AAD application and grant access to Azure HDInsightManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
45
+ 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`.
46
+
47
+ 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).
46
48
 
47
49
  ```javascript
48
- const { DefaultAzureCredential } = require("@azure/identity");
49
50
  const { HDInsightManagementClient } = require("@azure/arm-hdinsight");
50
- const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
51
-
52
- // Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples
53
- // Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead.
54
- const creds = new DefaultAzureCredential();
55
- const client = new HDInsightManagementClient(creds, subscriptionId);
56
- const resourceGroupName = "testresourceGroupName";
57
- const clusterName = "testclusterName";
58
- client.clusters
59
- .get(resourceGroupName, clusterName)
60
- .then((result) => {
61
- console.log("The result is:");
62
- console.log(result);
63
- })
64
- .catch((err) => {
65
- console.log("An error occurred:");
66
- console.error(err);
67
- });
51
+ const { DefaultAzureCredential } = require("@azure/identity");
52
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
53
+ const client = new HDInsightManagementClient(new DefaultAzureCredential(), subscriptionId);
68
54
  ```
69
55
 
70
- #### browser - Authentication, client creation, and get clusters as an example written in JavaScript.
71
-
72
- In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser.
73
-
74
- - 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.
75
- - Note down the client Id from the previous step and use it in the browser sample below.
76
-
77
- ##### Sample code
78
-
79
- - index.html
80
-
81
- ```html
82
- <!DOCTYPE html>
83
- <html lang="en">
84
- <head>
85
- <title>@azure/arm-hdinsight sample</title>
86
- <script src="node_modules/@azure/ms-rest-azure-js/dist/msRestAzure.js"></script>
87
- <script src="node_modules/@azure/identity/dist/index.js"></script>
88
- <script src="node_modules/@azure/arm-hdinsight/dist/arm-hdinsight.js"></script>
89
- <script type="text/javascript">
90
- const subscriptionId = "<Subscription_Id>";
91
- // Create credentials using the `@azure/identity` package.
92
- // Please note that you can also use credentials from the `@azure/ms-rest-browserauth` package instead.
93
- const credential = new InteractiveBrowserCredential({
94
- clientId: "<client id for your Azure AD app>",
95
- tenant: "<optional tenant for your organization>"
96
- });
97
- const client = new Azure.ArmHdinsight.HDInsightManagementClient(creds, subscriptionId);
98
- const resourceGroupName = "testresourceGroupName";
99
- const clusterName = "testclusterName";
100
- client.clusters
101
- .get(resourceGroupName, clusterName)
102
- .then((result) => {
103
- console.log("The result is:");
104
- console.log(result);
105
- })
106
- .catch((err) => {
107
- console.log("An error occurred:");
108
- console.error(err);
109
- });
110
- </script>
111
- </head>
112
- <body></body>
113
- </html>
56
+
57
+ ### JavaScript Bundle
58
+ 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).
59
+
60
+ ## Key concepts
61
+
62
+ ### HDInsightManagementClient
63
+
64
+ `HDInsightManagementClient` is the primary interface for developers using the Azure HDInsightManagement client library. Explore the methods on this client object to understand the different features of the Azure HDInsightManagement service that you can access.
65
+
66
+ ## Troubleshooting
67
+
68
+ ### Logging
69
+
70
+ 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`:
71
+
72
+ ```javascript
73
+ const { setLogLevel } = require("@azure/logger");
74
+ setLogLevel("info");
114
75
  ```
115
76
 
77
+ 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).
78
+
79
+ ## Next steps
80
+
81
+ 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.
82
+
83
+ ## Contributing
84
+
85
+ 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.
86
+
116
87
  ## Related projects
117
88
 
118
- - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
89
+ - [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
90
+
91
+ ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fhdinsight%2Farm-hdinsight%2FREADME.png)
119
92
 
120
- ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/hdinsight/arm-hdinsight/README.png)
93
+ [azure_cli]: https://docs.microsoft.com/cli/azure
94
+ [azure_sub]: https://azure.microsoft.com/free/
95
+ [azure_sub]: https://azure.microsoft.com/free/
96
+ [azure_portal]: https://portal.azure.com
97
+ [azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
98
+ [defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential