@azure/arm-containerregistry 7.0.0 → 9.0.0-beta.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 (310) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +68 -76
  4. package/dist/index.js +12640 -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/containerRegistryManagementClient.d.ts +29 -0
  9. package/dist-esm/src/containerRegistryManagementClient.d.ts.map +1 -0
  10. package/dist-esm/src/containerRegistryManagementClient.js +36 -0
  11. package/dist-esm/src/containerRegistryManagementClient.js.map +1 -0
  12. package/dist-esm/src/containerRegistryManagementClientContext.d.ts +15 -0
  13. package/dist-esm/src/containerRegistryManagementClientContext.d.ts.map +1 -0
  14. package/dist-esm/src/containerRegistryManagementClientContext.js +48 -0
  15. package/dist-esm/src/containerRegistryManagementClientContext.js.map +1 -0
  16. package/dist-esm/src/index.d.ts +6 -0
  17. package/dist-esm/src/index.d.ts.map +1 -0
  18. package/dist-esm/src/index.js +13 -0
  19. package/dist-esm/src/index.js.map +1 -0
  20. package/dist-esm/src/lroImpl.d.ts +16 -0
  21. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  22. package/dist-esm/src/lroImpl.js +29 -0
  23. package/dist-esm/src/lroImpl.js.map +1 -0
  24. package/dist-esm/src/models/index.d.ts +3421 -0
  25. package/dist-esm/src/models/index.d.ts.map +1 -0
  26. package/dist-esm/src/models/index.js +339 -0
  27. package/dist-esm/src/models/index.js.map +1 -0
  28. package/dist-esm/src/models/mappers.d.ts +177 -0
  29. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  30. package/{esm → dist-esm/src}/models/mappers.js +3696 -2199
  31. package/dist-esm/src/models/mappers.js.map +1 -0
  32. package/dist-esm/src/models/parameters.d.ts +54 -0
  33. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  34. package/dist-esm/src/models/parameters.js +428 -0
  35. package/dist-esm/src/models/parameters.js.map +1 -0
  36. package/dist-esm/src/operations/agentPools.d.ts +107 -0
  37. package/dist-esm/src/operations/agentPools.d.ts.map +1 -0
  38. package/dist-esm/src/operations/agentPools.js +455 -0
  39. package/dist-esm/src/operations/agentPools.js.map +1 -0
  40. package/dist-esm/src/operations/connectedRegistries.d.ts +115 -0
  41. package/dist-esm/src/operations/connectedRegistries.d.ts.map +1 -0
  42. package/dist-esm/src/operations/connectedRegistries.js +503 -0
  43. package/dist-esm/src/operations/connectedRegistries.js.map +1 -0
  44. package/dist-esm/src/operations/exportPipelines.d.ts +81 -0
  45. package/dist-esm/src/operations/exportPipelines.d.ts.map +1 -0
  46. package/dist-esm/src/operations/exportPipelines.js +316 -0
  47. package/dist-esm/src/operations/exportPipelines.js.map +1 -0
  48. package/dist-esm/src/operations/importPipelines.d.ts +81 -0
  49. package/dist-esm/src/operations/importPipelines.d.ts.map +1 -0
  50. package/dist-esm/src/operations/importPipelines.js +316 -0
  51. package/dist-esm/src/operations/importPipelines.js.map +1 -0
  52. package/dist-esm/src/operations/index.d.ts +16 -0
  53. package/dist-esm/src/operations/index.d.ts.map +1 -0
  54. package/dist-esm/src/operations/index.js +23 -0
  55. package/dist-esm/src/operations/index.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 +114 -0
  59. package/dist-esm/src/operations/operations.js.map +1 -0
  60. package/dist-esm/src/operations/pipelineRuns.d.ts +81 -0
  61. package/dist-esm/src/operations/pipelineRuns.d.ts.map +1 -0
  62. package/dist-esm/src/operations/pipelineRuns.js +316 -0
  63. package/dist-esm/src/operations/pipelineRuns.js.map +1 -0
  64. package/dist-esm/src/operations/privateEndpointConnections.d.ts +81 -0
  65. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  66. package/dist-esm/src/operations/privateEndpointConnections.js +326 -0
  67. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  68. package/dist-esm/src/operations/registries.d.ts +217 -0
  69. package/dist-esm/src/operations/registries.d.ts.map +1 -0
  70. package/dist-esm/src/operations/registries.js +956 -0
  71. package/dist-esm/src/operations/registries.js.map +1 -0
  72. package/dist-esm/src/operations/replications.d.ts +99 -0
  73. package/dist-esm/src/operations/replications.d.ts.map +1 -0
  74. package/dist-esm/src/operations/replications.js +405 -0
  75. package/dist-esm/src/operations/replications.js.map +1 -0
  76. package/dist-esm/src/operations/runs.d.ts +89 -0
  77. package/dist-esm/src/operations/runs.d.ts.map +1 -0
  78. package/dist-esm/src/operations/runs.js +363 -0
  79. package/dist-esm/src/operations/runs.js.map +1 -0
  80. package/dist-esm/src/operations/scopeMaps.d.ts +99 -0
  81. package/dist-esm/src/operations/scopeMaps.d.ts.map +1 -0
  82. package/dist-esm/src/operations/scopeMaps.js +405 -0
  83. package/dist-esm/src/operations/scopeMaps.js.map +1 -0
  84. package/dist-esm/src/operations/taskRuns.d.ts +107 -0
  85. package/dist-esm/src/operations/taskRuns.d.ts.map +1 -0
  86. package/dist-esm/src/operations/taskRuns.js +455 -0
  87. package/dist-esm/src/operations/taskRuns.js.map +1 -0
  88. package/dist-esm/src/operations/tasks.d.ts +107 -0
  89. package/dist-esm/src/operations/tasks.d.ts.map +1 -0
  90. package/dist-esm/src/operations/tasks.js +461 -0
  91. package/dist-esm/src/operations/tasks.js.map +1 -0
  92. package/dist-esm/src/operations/tokens.d.ts +99 -0
  93. package/dist-esm/src/operations/tokens.d.ts.map +1 -0
  94. package/dist-esm/src/operations/tokens.js +405 -0
  95. package/dist-esm/src/operations/tokens.js.map +1 -0
  96. package/dist-esm/src/operations/webhooks.d.ts +142 -0
  97. package/dist-esm/src/operations/webhooks.d.ts.map +1 -0
  98. package/dist-esm/src/operations/webhooks.js +574 -0
  99. package/dist-esm/src/operations/webhooks.js.map +1 -0
  100. package/dist-esm/src/operationsInterfaces/agentPools.d.ts +82 -0
  101. package/dist-esm/src/operationsInterfaces/agentPools.d.ts.map +1 -0
  102. package/dist-esm/src/operationsInterfaces/agentPools.js +9 -0
  103. package/dist-esm/src/operationsInterfaces/agentPools.js.map +1 -0
  104. package/dist-esm/src/operationsInterfaces/connectedRegistries.d.ts +90 -0
  105. package/dist-esm/src/operationsInterfaces/connectedRegistries.d.ts.map +1 -0
  106. package/dist-esm/src/operationsInterfaces/connectedRegistries.js +9 -0
  107. package/dist-esm/src/operationsInterfaces/connectedRegistries.js.map +1 -0
  108. package/dist-esm/src/operationsInterfaces/exportPipelines.d.ts +56 -0
  109. package/dist-esm/src/operationsInterfaces/exportPipelines.d.ts.map +1 -0
  110. package/dist-esm/src/operationsInterfaces/exportPipelines.js +9 -0
  111. package/dist-esm/src/operationsInterfaces/exportPipelines.js.map +1 -0
  112. package/dist-esm/src/operationsInterfaces/importPipelines.d.ts +56 -0
  113. package/dist-esm/src/operationsInterfaces/importPipelines.d.ts.map +1 -0
  114. package/dist-esm/src/operationsInterfaces/importPipelines.js +9 -0
  115. package/dist-esm/src/operationsInterfaces/importPipelines.js.map +1 -0
  116. package/dist-esm/src/operationsInterfaces/index.d.ts +16 -0
  117. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  118. package/dist-esm/src/operationsInterfaces/index.js +23 -0
  119. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  120. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  121. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  122. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  123. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  124. package/dist-esm/src/operationsInterfaces/pipelineRuns.d.ts +56 -0
  125. package/dist-esm/src/operationsInterfaces/pipelineRuns.d.ts.map +1 -0
  126. package/dist-esm/src/operationsInterfaces/pipelineRuns.js +9 -0
  127. package/dist-esm/src/operationsInterfaces/pipelineRuns.js.map +1 -0
  128. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +56 -0
  129. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  130. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  131. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  132. package/dist-esm/src/operationsInterfaces/registries.d.ts +163 -0
  133. package/dist-esm/src/operationsInterfaces/registries.d.ts.map +1 -0
  134. package/dist-esm/src/operationsInterfaces/registries.js +9 -0
  135. package/dist-esm/src/operationsInterfaces/registries.js.map +1 -0
  136. package/dist-esm/src/operationsInterfaces/replications.d.ts +74 -0
  137. package/dist-esm/src/operationsInterfaces/replications.d.ts.map +1 -0
  138. package/dist-esm/src/operationsInterfaces/replications.js +9 -0
  139. package/dist-esm/src/operationsInterfaces/replications.js.map +1 -0
  140. package/dist-esm/src/operationsInterfaces/runs.d.ts +64 -0
  141. package/dist-esm/src/operationsInterfaces/runs.d.ts.map +1 -0
  142. package/dist-esm/src/operationsInterfaces/runs.js +9 -0
  143. package/dist-esm/src/operationsInterfaces/runs.js.map +1 -0
  144. package/dist-esm/src/operationsInterfaces/scopeMaps.d.ts +74 -0
  145. package/dist-esm/src/operationsInterfaces/scopeMaps.d.ts.map +1 -0
  146. package/dist-esm/src/operationsInterfaces/scopeMaps.js +9 -0
  147. package/dist-esm/src/operationsInterfaces/scopeMaps.js.map +1 -0
  148. package/dist-esm/src/operationsInterfaces/taskRuns.d.ts +82 -0
  149. package/dist-esm/src/operationsInterfaces/taskRuns.d.ts.map +1 -0
  150. package/dist-esm/src/operationsInterfaces/taskRuns.js +9 -0
  151. package/dist-esm/src/operationsInterfaces/taskRuns.js.map +1 -0
  152. package/dist-esm/src/operationsInterfaces/tasks.d.ts +82 -0
  153. package/dist-esm/src/operationsInterfaces/tasks.d.ts.map +1 -0
  154. package/dist-esm/src/operationsInterfaces/tasks.js +9 -0
  155. package/dist-esm/src/operationsInterfaces/tasks.js.map +1 -0
  156. package/dist-esm/src/operationsInterfaces/tokens.d.ts +74 -0
  157. package/dist-esm/src/operationsInterfaces/tokens.d.ts.map +1 -0
  158. package/dist-esm/src/operationsInterfaces/tokens.js +9 -0
  159. package/dist-esm/src/operationsInterfaces/tokens.js.map +1 -0
  160. package/dist-esm/src/operationsInterfaces/webhooks.d.ts +98 -0
  161. package/dist-esm/src/operationsInterfaces/webhooks.d.ts.map +1 -0
  162. package/dist-esm/src/operationsInterfaces/webhooks.js +9 -0
  163. package/dist-esm/src/operationsInterfaces/webhooks.js.map +1 -0
  164. package/dist-esm/test/containerregistry_examples.d.ts +2 -0
  165. package/dist-esm/test/containerregistry_examples.d.ts.map +1 -0
  166. package/dist-esm/test/containerregistry_examples.js +326 -0
  167. package/dist-esm/test/containerregistry_examples.js.map +1 -0
  168. package/package.json +65 -31
  169. package/review/arm-containerregistry.api.md +2912 -0
  170. package/rollup.config.js +181 -30
  171. package/src/containerRegistryManagementClient.ts +78 -42
  172. package/src/containerRegistryManagementClientContext.ts +45 -37
  173. package/src/index.ts +13 -0
  174. package/src/lroImpl.ts +34 -0
  175. package/src/models/index.ts +3217 -3457
  176. package/src/models/mappers.ts +3831 -2214
  177. package/src/models/parameters.ts +379 -81
  178. package/src/operations/agentPools.ts +646 -0
  179. package/src/operations/connectedRegistries.ts +718 -0
  180. package/src/operations/exportPipelines.ts +449 -0
  181. package/src/operations/importPipelines.ts +449 -0
  182. package/src/operations/index.ts +12 -7
  183. package/src/operations/operations.ts +84 -76
  184. package/src/operations/pipelineRuns.ts +449 -0
  185. package/src/operations/privateEndpointConnections.ts +460 -0
  186. package/src/operations/registries.ts +1031 -653
  187. package/src/operations/replications.ts +433 -251
  188. package/src/operations/runs.ts +356 -243
  189. package/src/operations/scopeMaps.ts +433 -251
  190. package/src/operations/taskRuns.ts +646 -0
  191. package/src/operations/tasks.ts +459 -277
  192. package/src/operations/tokens.ts +427 -251
  193. package/src/operations/webhooks.ts +614 -419
  194. package/src/operationsInterfaces/agentPools.ts +162 -0
  195. package/src/operationsInterfaces/connectedRegistries.ts +174 -0
  196. package/src/operationsInterfaces/exportPipelines.ts +109 -0
  197. package/src/operationsInterfaces/importPipelines.ts +109 -0
  198. package/{esm/operations/index.js → src/operationsInterfaces/index.ts} +13 -8
  199. package/src/operationsInterfaces/operations.ts +22 -0
  200. package/src/operationsInterfaces/pipelineRuns.ts +109 -0
  201. package/src/operationsInterfaces/privateEndpointConnections.ts +109 -0
  202. package/src/operationsInterfaces/registries.ts +317 -0
  203. package/src/operationsInterfaces/replications.ts +147 -0
  204. package/src/operationsInterfaces/runs.ts +122 -0
  205. package/src/operationsInterfaces/scopeMaps.ts +147 -0
  206. package/src/operationsInterfaces/taskRuns.ts +162 -0
  207. package/src/operationsInterfaces/tasks.ts +156 -0
  208. package/src/operationsInterfaces/tokens.ts +141 -0
  209. package/src/operationsInterfaces/webhooks.ts +193 -0
  210. package/tsconfig.json +4 -4
  211. package/types/arm-containerregistry.d.ts +4991 -0
  212. package/types/tsdoc-metadata.json +11 -0
  213. package/dist/arm-containerregistry.js +0 -7529
  214. package/dist/arm-containerregistry.js.map +0 -1
  215. package/dist/arm-containerregistry.min.js +0 -1
  216. package/dist/arm-containerregistry.min.js.map +0 -1
  217. package/esm/containerRegistryManagementClient.d.ts +0 -25
  218. package/esm/containerRegistryManagementClient.d.ts.map +0 -1
  219. package/esm/containerRegistryManagementClient.js +0 -40
  220. package/esm/containerRegistryManagementClient.js.map +0 -1
  221. package/esm/containerRegistryManagementClientContext.d.ts +0 -15
  222. package/esm/containerRegistryManagementClientContext.d.ts.map +0 -1
  223. package/esm/containerRegistryManagementClientContext.js +0 -55
  224. package/esm/containerRegistryManagementClientContext.js.map +0 -1
  225. package/esm/models/index.d.ts +0 -3884
  226. package/esm/models/index.d.ts.map +0 -1
  227. package/esm/models/index.js +0 -8
  228. package/esm/models/index.js.map +0 -1
  229. package/esm/models/mappers.d.ts +0 -129
  230. package/esm/models/mappers.d.ts.map +0 -1
  231. package/esm/models/mappers.js.map +0 -1
  232. package/esm/models/operationsMappers.d.ts +0 -2
  233. package/esm/models/operationsMappers.d.ts.map +0 -1
  234. package/esm/models/operationsMappers.js +0 -9
  235. package/esm/models/operationsMappers.js.map +0 -1
  236. package/esm/models/parameters.d.ts +0 -18
  237. package/esm/models/parameters.d.ts.map +0 -1
  238. package/esm/models/parameters.js +0 -214
  239. package/esm/models/parameters.js.map +0 -1
  240. package/esm/models/registriesMappers.d.ts +0 -2
  241. package/esm/models/registriesMappers.d.ts.map +0 -1
  242. package/esm/models/registriesMappers.js +0 -9
  243. package/esm/models/registriesMappers.js.map +0 -1
  244. package/esm/models/replicationsMappers.d.ts +0 -2
  245. package/esm/models/replicationsMappers.d.ts.map +0 -1
  246. package/esm/models/replicationsMappers.js +0 -9
  247. package/esm/models/replicationsMappers.js.map +0 -1
  248. package/esm/models/runsMappers.d.ts +0 -2
  249. package/esm/models/runsMappers.d.ts.map +0 -1
  250. package/esm/models/runsMappers.js +0 -9
  251. package/esm/models/runsMappers.js.map +0 -1
  252. package/esm/models/scopeMapsMappers.d.ts +0 -2
  253. package/esm/models/scopeMapsMappers.d.ts.map +0 -1
  254. package/esm/models/scopeMapsMappers.js +0 -9
  255. package/esm/models/scopeMapsMappers.js.map +0 -1
  256. package/esm/models/tasksMappers.d.ts +0 -2
  257. package/esm/models/tasksMappers.d.ts.map +0 -1
  258. package/esm/models/tasksMappers.js +0 -9
  259. package/esm/models/tasksMappers.js.map +0 -1
  260. package/esm/models/tokensMappers.d.ts +0 -2
  261. package/esm/models/tokensMappers.d.ts.map +0 -1
  262. package/esm/models/tokensMappers.js +0 -9
  263. package/esm/models/tokensMappers.js.map +0 -1
  264. package/esm/models/webhooksMappers.d.ts +0 -2
  265. package/esm/models/webhooksMappers.d.ts.map +0 -1
  266. package/esm/models/webhooksMappers.js +0 -9
  267. package/esm/models/webhooksMappers.js.map +0 -1
  268. package/esm/operations/index.d.ts +0 -9
  269. package/esm/operations/index.d.ts.map +0 -1
  270. package/esm/operations/index.js.map +0 -1
  271. package/esm/operations/operations.d.ts +0 -46
  272. package/esm/operations/operations.d.ts.map +0 -1
  273. package/esm/operations/operations.js +0 -77
  274. package/esm/operations/operations.js.map +0 -1
  275. package/esm/operations/registries.d.ts +0 -319
  276. package/esm/operations/registries.d.ts.map +0 -1
  277. package/esm/operations/registries.js +0 -664
  278. package/esm/operations/registries.js.map +0 -1
  279. package/esm/operations/replications.d.ts +0 -135
  280. package/esm/operations/replications.d.ts.map +0 -1
  281. package/esm/operations/replications.js +0 -297
  282. package/esm/operations/replications.js.map +0 -1
  283. package/esm/operations/runs.d.ts +0 -139
  284. package/esm/operations/runs.d.ts.map +0 -1
  285. package/esm/operations/runs.js +0 -268
  286. package/esm/operations/runs.js.map +0 -1
  287. package/esm/operations/scopeMaps.d.ts +0 -135
  288. package/esm/operations/scopeMaps.d.ts.map +0 -1
  289. package/esm/operations/scopeMaps.js +0 -297
  290. package/esm/operations/scopeMaps.js.map +0 -1
  291. package/esm/operations/tasks.d.ts +0 -159
  292. package/esm/operations/tasks.d.ts.map +0 -1
  293. package/esm/operations/tasks.js +0 -330
  294. package/esm/operations/tasks.js.map +0 -1
  295. package/esm/operations/tokens.d.ts +0 -135
  296. package/esm/operations/tokens.d.ts.map +0 -1
  297. package/esm/operations/tokens.js +0 -297
  298. package/esm/operations/tokens.js.map +0 -1
  299. package/esm/operations/webhooks.d.ts +0 -225
  300. package/esm/operations/webhooks.d.ts.map +0 -1
  301. package/esm/operations/webhooks.js +0 -422
  302. package/esm/operations/webhooks.js.map +0 -1
  303. package/src/models/operationsMappers.ts +0 -17
  304. package/src/models/registriesMappers.ts +0 -81
  305. package/src/models/replicationsMappers.ts +0 -62
  306. package/src/models/runsMappers.ts +0 -63
  307. package/src/models/scopeMapsMappers.ts +0 -62
  308. package/src/models/tasksMappers.ts +0 -73
  309. package/src/models/tokensMappers.ts +0 -62
  310. package/src/models/webhooksMappers.ts +0 -74
package/CHANGELOG.md ADDED
@@ -0,0 +1,14 @@
1
+ ## 9.0.0-beta.1 (2021-10-20)
2
+
3
+ This is the first preview for the new version of the `@azure/arm-containerregistry` package that follows the new [guidelines for TypeScript SDKs](https://azure.github.io/azure-sdk/typescript_introduction.html) for Azure services.
4
+
5
+ While this package remains auto generated, the SDK generator itself has undergone changes to comply with the above guidelines in order to generate packages that are idiomatic to the JavaScript/TypeScript ecosystem and consistent with other packages for Azure services. For more on this, please see [State of the Azure SDK 2021](https://devblogs.microsoft.com/azure-sdk/state-of-the-azure-sdk-2021/).
6
+
7
+ Please note that this version has breaking changes, all of which were made after careful consideration during the authoring of the guidelines and user studies.
8
+
9
+ **Noteworthy changes and features**
10
+ - Authentication: The packages `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` are no longer supported. Use package [@azure/identity](https://www.npmjs.com/package/@azure/identity) instead. Select a credential from Azure Identity examples based on the authentication method of your choice.
11
+ - Callbacks: Method overloads that used callbacks have been removed and the use of promises is encouraged instead.
12
+ - List operations now return an iterable result that follows the `PagedAsyncIterableIterator` interface as opposed to the previous model where you had to make a new request using the link to the next page.
13
+ - Long running operations i.e. the Lro related object returned by methods whose names started with `begin`, now uses `pollUntilDone` to check whether the request is finished, instead of `pollUntilFinished`. To get the final result, use the corresponding method that will have the suffix `AndWait`.
14
+ - The SDK only supports ECMAScript 2015 (ES6) and beyond, all projects that referenced this SDK should be upgraded to use ES6.
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2019 Microsoft
3
+ Copyright (c) 2021 Microsoft
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -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,102 +1,94 @@
1
- ## Azure ContainerRegistryManagementClient SDK for JavaScript
1
+ # Azure ContainerRegistryManagement client library for JavaScript
2
2
 
3
- This package contains an isomorphic SDK for ContainerRegistryManagementClient.
3
+ This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure ContainerRegistryManagement client.
4
+
5
+
6
+
7
+ [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerregistry/arm-containerregistry) |
8
+ [Package (NPM)](https://www.npmjs.com/package/@azure/arm-containerregistry) |
9
+ [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-containerregistry) |
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
- - Node.js version 6.x.x or higher
8
- - Browser JavaScript
16
+ - [LTS versions of Node.js](https://nodejs.org/about/releases/)
17
+ - Latest versions of Safari, Chrome, Edge and Firefox.
18
+
19
+ ### Prerequisites
20
+
21
+ - An [Azure subscription][azure_sub].
9
22
 
10
- ### How to Install
23
+ ### Install the `@azure/arm-containerregistry` package
24
+
25
+ Install the Azure ContainerRegistryManagement client library for JavaScript with `npm`:
11
26
 
12
27
  ```bash
13
28
  npm install @azure/arm-containerregistry
14
29
  ```
15
30
 
16
- ### How to use
31
+ ### Create and authenticate a `ContainerRegistryManagementClient`
32
+
33
+ To create a client object to access the Azure ContainerRegistryManagement API, you will need the `endpoint` of your Azure ContainerRegistryManagement resource and a `credential`. The Azure ContainerRegistryManagement client can use Azure Active Directory credentials to authenticate.
34
+ You can find the endpoint for your Azure ContainerRegistryManagement resource in the [Azure Portal][azure_portal].
17
35
 
18
- #### nodejs - Authentication, client creation and get registries as an example written in TypeScript.
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).
19
37
 
20
- ##### Install @azure/ms-rest-nodeauth
38
+ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
21
39
 
22
40
  ```bash
23
- npm install @azure/ms-rest-nodeauth
41
+ npm install @azure/identity
24
42
  ```
25
43
 
26
- ##### Sample code
27
-
28
- ```typescript
29
- import * as msRest from "@azure/ms-rest-js";
30
- import * as msRestAzure from "@azure/ms-rest-azure-js";
31
- import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
32
- import { ContainerRegistryManagementClient, ContainerRegistryManagementModels, ContainerRegistryManagementMappers } from "@azure/arm-containerregistry";
33
- const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
34
-
35
- msRestNodeAuth.interactiveLogin().then((creds) => {
36
- const client = new ContainerRegistryManagementClient(creds, subscriptionId);
37
- const resourceGroupName = "testresourceGroupName";
38
- const registryName = "testregistryName";
39
- client.registries.get(resourceGroupName, registryName).then((result) => {
40
- console.log("The result is:");
41
- console.log(result);
42
- });
43
- }).catch((err) => {
44
- console.error(err);
45
- });
44
+ You will also need to **register a new AAD application and grant access to Azure ContainerRegistryManagement** 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).
48
+
49
+ ```javascript
50
+ const { ContainerRegistryManagementClient } = require("@azure/arm-containerregistry");
51
+ const { DefaultAzureCredential } = require("@azure/identity");
52
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
53
+ const client = new ContainerRegistryManagementClient(new DefaultAzureCredential(), subscriptionId);
46
54
  ```
47
55
 
48
- #### browser - Authentication, client creation and get registries as an example written in JavaScript.
56
+ ## Key concepts
49
57
 
50
- ##### Install @azure/ms-rest-browserauth
58
+ ### ContainerRegistryManagementClient
51
59
 
52
- ```bash
53
- npm install @azure/ms-rest-browserauth
54
- ```
60
+ `ContainerRegistryManagementClient` is the primary interface for developers using the Azure ContainerRegistryManagement client library. Explore the methods on this client object to understand the different features of the Azure ContainerRegistryManagement service that you can access.
61
+
62
+ ## Troubleshooting
63
+
64
+ ### Logging
55
65
 
56
- ##### Sample code
57
-
58
- See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
59
-
60
- - index.html
61
- ```html
62
- <!DOCTYPE html>
63
- <html lang="en">
64
- <head>
65
- <title>@azure/arm-containerregistry sample</title>
66
- <script src="node_modules/@azure/ms-rest-js/dist/msRest.browser.js"></script>
67
- <script src="node_modules/@azure/ms-rest-azure-js/dist/msRestAzure.js"></script>
68
- <script src="node_modules/@azure/ms-rest-browserauth/dist/msAuth.js"></script>
69
- <script src="node_modules/@azure/arm-containerregistry/dist/arm-containerregistry.js"></script>
70
- <script type="text/javascript">
71
- const subscriptionId = "<Subscription_Id>";
72
- const authManager = new msAuth.AuthManager({
73
- clientId: "<client id for your Azure AD app>",
74
- tenant: "<optional tenant for your organization>"
75
- });
76
- authManager.finalizeLogin().then((res) => {
77
- if (!res.isLoggedIn) {
78
- // may cause redirects
79
- authManager.login();
80
- }
81
- const client = new Azure.ArmContainerregistry.ContainerRegistryManagementClient(res.creds, subscriptionId);
82
- const resourceGroupName = "testresourceGroupName";
83
- const registryName = "testregistryName";
84
- client.registries.get(resourceGroupName, registryName).then((result) => {
85
- console.log("The result is:");
86
- console.log(result);
87
- }).catch((err) => {
88
- console.log("An error occurred:");
89
- console.error(err);
90
- });
91
- });
92
- </script>
93
- </head>
94
- <body></body>
95
- </html>
66
+ 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`:
67
+
68
+ ```javascript
69
+ const { setLogLevel } = require("@azure/logger");
70
+ setLogLevel("info");
96
71
  ```
97
72
 
73
+ 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).
74
+
75
+ ## Next steps
76
+
77
+ 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.
78
+
79
+ ## Contributing
80
+
81
+ 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.
82
+
98
83
  ## Related projects
99
84
 
100
- - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
85
+ - [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
86
+
87
+ ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcontainerregistry%2Farm-containerregistry%2FREADME.png)
101
88
 
102
- ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/containerregistry/arm-containerregistry/README.png)
89
+ [azure_cli]: https://docs.microsoft.com/cli/azure
90
+ [azure_sub]: https://azure.microsoft.com/free/
91
+ [azure_sub]: https://azure.microsoft.com/free/
92
+ [azure_portal]: https://portal.azure.com
93
+ [azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
94
+ [defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential