We’re excited to announce the stable release for JavaScript libraries that enable you to create and manage Azure resources via the Azure Resource Manager. These libraries have several new features that improve the Azure developer experience. Some important libraries that have been released are:
- @azure/arm-compute
- @azure/arm-network
- @azure/arm-storage
- @azure/arm-sql
- @azure/arm-resources
- @azure/arm-policy
- @azure/arm-managedapplications
- @azure/arm-links
- @azure/arm-locks
- @azure/arm-features
These libraries:
- Follow the new Azure library guidelines, which were written to provide an improved and consistent development experience across Azure services. The TypeScript/JavaScript-specific guidelines that are also followed ensure these libraries have an idiomatic feel to the JavaScript and TypeScript ecosystem.
- Have been generated using the new AutoRest TypeScript library generator.
- Provide new authentication mechanisms, better paging, and long-running operations.
We encourage you to try out the libraries and provide your feedback.
Key concepts
A detailed list and usage of the new features is found in the migration guide, and the quickstart guide can be used for first-time users. Below is an overview of major changes in the new libraries.
Authentication
Previously, the Azure management libraries required credential objects created via the packages @azure/ms-rest-nodeauth
or @azure/ms-rest-browserauth
that used the Azure Active Directory Authentication Library (ADAL). ADAL reaches end of support in June 2022. The new Azure management libraries require credential objects from the new @azure/identity package. The @azure/identity
package uses MSAL and has many more authentication options to support newer scenarios.
For the different authentication scenarios, see the Azure Identity examples. To update your existing app, see the migration guide to @azure/identity.
Promises vs. callbacks
Our new guidelines encourage the use of promises over callbacks to help with:
- Code readability
- Handling of deferred and asynchronous computations
- Error handling
Promises replace the overloads that accepted callbacks.
PagedAsyncIterableIterator interface
List operations now return a PagedAsyncIterableIterator
interface that can be used to iterate over the results. The result is a better user experience than before, where a new method call had to be made to access the next page. The List operations section in the migration guide provides more details.
ES6 support
The libraries have been changed to support ECMAScript 2015 (ES6) and beyond.
Long-running operations
The LROPoller
object, returned by the long-running operations, has been modified to the PollerLike
object. It can check the current status of the operation or access any partial results computed. The Long-running operations section in the migration guide provides more details.
What’s next
In the future, we plan to release the following things:
- Improved documentation on the usage of the libraries
- Increased coverage of Azure services
- Detailed, end-to-end examples for the libraries, including new features introduced with these releases
Feedback
We encourage you to try out the libraries. Provide feedback by opening an issue at Azure/azure-sdk-for-js.
Conclusion
We hope these changes make management of your Azure resources much easier with the JavaScript libraries.
0 comments