Disclaimer:
- There is a breaking change in all Client init methods. Configuration classes have disappeared.
Update this:
resource_client = ResourceManagementClient(
ResourceManagementClientConfiguration(
credentials,
subscription_id
)
)
to this:
resource_client = ResourceManagementClient(
credentials,
subscription_id
)
If you were using the Configuration class, it is still available using the config
attribute after Client creation:
resource_client.config.long_running_operation_timeout = 5
New:
- you can now simplify your call by passing a dict directly and not an instance. This removes the needs to import each model:
from azure.mgmt.resource.resources.models import ResourceGroup
resource_client.resource_groups.create_or_update(
group_name,
ResourceGroup(
location='westus',
)
)
can now be written directly:
resource_client.resource_groups.create_or_update(
group_name,
{
'location':'westus',
}
)
- All Resources clients have now alias in the azure.mgmt.resource namespace:
azure.mgmt.resource.FeatureClient
azure.mgmt.resource.ManagementLockClient
azure.mgmt.resource.PolicyClient
azure.mgmt.resource.ResourceManagementClient
azure.mgmt.resource.SubscriptionClient
- Enum refactoring. There are now two kinds of enum: "strict" and "soft".
- A "soft" enum can be substituted by any random string without risking a client-side exception. This is useful for services which might add new enum types frequently (e.g. VirtualMachine size). The server might decide to refuse your string and you might receive a
CloudError
exception. - A "strict" enum must follow one of the authorized enum values. Strings are still accepted, but if your value is not valid you will receive a
SerializationError
without a call to the REST API. Before, the call was made to the REST API and you received aCloudError
if the server refused the request.
- A "soft" enum can be substituted by any random string without risking a client-side exception. This is useful for services which might add new enum types frequently (e.g. VirtualMachine size). The server might decide to refuse your string and you might receive a
- Latest Swagger update for Redis (API-version 2016-04-01)
- Latest Swagger update for GraphRbac (API-version 1.6)
- Latest Swagger update for CDN (API-version 2016-04-02)
- New Resource Policy client
- New Compute Container client
- New azure-mgmt-commerce preview package for Billing API
Dependencies:
- msrest must be >= 0.4.0 (see their ChangeLog for details)
- msrestazure must be >= 0.4.0 (see their ChangeLog for details)
- azure-common[autorest] == 1.1.4, provides automatic autorest right dependencies
- azure-storage 0.32.0