2.4 KiB
2.4 KiB
The next-generation Azure JavaScript libraries introduce a few important changes:
- Authentication: The packages
@azure/ms-rest-nodeauth
or@azure/ms-rest-browserauth
are no longer supported. Use package @azure/identity instead. Select a credential from Azure Identity examples based on the authentication method of your choice. You may find out the new authentication examples here - Callbacks: Method overloads that use callbacks have been removed and please use Promise instead. You may find out the examples here
- List operations now return an iterable result that follows the
PagedAsyncIterableIterator
interface as opposite to the previous model where you have to make a new request using the link to the next page. You may find out the new list examples here - Interface and API change for Long running operations: To check the final result of the Poller object returned by long running operations like
beginCreateOrUpdate
, please usepollUntilDone
instead ofpollUntilFinished
. To get the final result directly, use the method with the suffixAndWait
e.g.beginCreateOrUpdateAndWait
. You may find out the LRO examples here - The ClientContext class has been removed and all its properties could be found in Client class itself.
- The SDK only supports ECMAScript 2015 (ES6) and beyond, all projects that referenced this SDK should be upgraded to use ES6.
Tips:
- For more details on how to migrate the next-generation libraries, please visit the migration guide.
- To get started, please visit the quickstart guide.
- For more sample code, please visit our samples repo.