Skip to content
This repository was archived by the owner on May 22, 2026. It is now read-only.

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

readme.md

Migrating to Latest AutoRest

See the main docs for changes in versioning and flags, this section focuses on how the generated code differs.

Breaking Changes

  • The credential system has been completely revamped:
    • Previously we had used azure.common.credentials or msrestazure.azure_active_directory instances, which are no longer supported. We now use credentials from azure_identity and the AzureKeyCredential from azure-core.
    • The credentials parameter to the service client has been renamed to credential
  • The config attribute is no longer exposed on the client, and custom configurations should be passed as a kwarg. For example, we now have Client(credential, subscription_id, enable_logging=True). For a complete set of supported inputs to your client, see our list of acceptable initialization parameters in azure-core.
  • You can't import a version module anymore, use __version__ instead. Additionally, we only generate a version file if you specify a package version on the command line (--package-version), or you tell AutoRest during generation time to keep the current version file in the directory (--keep-version-file). See our flag index for more information on these 2 flags.
  • Long running operations that used to return a msrest.polling.LROPoller now return a azure.core.polling.LROPoller by default. These operations are also now prefixed with begin_.
  • The exception tree has been simplified, and now most exceptions are an azure.core.exceptions.HttpResponseError. CloudError has been removed.
  • Most of the operation kwargs have changed. The most noticeable are:

New Features

  • Type annotations using the standard typing library. SDKs are mypy ready!
  • This client has stable and official support for async. Look in the aio namespace of your generated package to find the async client.
  • The client now natively supports tracing with OpenTelemetry. Use the flag --trace to generate code for this, and you can see our tracing docs for more information.

Note: OpenCensus has been deprecated and is no longer supported. Please use OpenTelemetry instead.