azure-mgmt-consumption is using the wrong API version
Hello,
Using the following PIP packages.
azure-common (1.1.23)
azure-mgmt-compute (5.0.0)
azure-mgmt-consumption (3.0.0)
azure-mgmt-nspkg (3.0.2)
azure-mgmt-reservations (0.3.2)
azure-mgmt-resource (3.0.0)
azure-nspkg (3.0.2)
The azure-mgmt-consumption package is using the wrong API version right now.
With the following code,
reservation_client = AzureReservationAPI(credentials)
consumption_client = ConsumptionManagementClient(credentials, SUBSCRIPTION_ID)
reservation_summaries = consumption_client.reservations_summaries.list_by_reservation_order(reservation_order_id, 'daily', filter_query)
Will fail with the following error.
azure.mgmt.consumption.models.error_response.ErrorResponseException: (InvalidResourceType) The resource type 'reservationSummaries' could not be found in the namespace 'Microsoft.Consumption' for api version '2019-04-01-preview'. The supported api-versions are '2017-06-30-preview,2017-11-30,2018-01-31,2018-03-31,2018-06-30,2018-08-31,2018-10-01,2019-01-01-preview,2019-01-01,2019-05-01'.
It’s working if you update manually the API version to the latest
consumption_client.reservations_summaries.api_version = '2019-05-01'
Thanks @alk-jbrochet for pointing out the version issue. I've labeled this issue to bring it to the attention of the team.
Hello, some update on this? Thanks!
Similar to the example above, budgets has a hardcoded API value in the budgets_operations.py file that causes a non-EA offer subscription to be unable to create a budget via the API. Ideally, this could be passed to the ConsumptionManagementClient similarly to the implementation in AuthorizationManagementClient
The same for : consumption_client.price_sheet.api_version = '2019-10-01'
We need to release a new SDK version to fix this issue. Add "Service Attention" to include service team to confirm they are fine with the new release and their swgger are ready. thx
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ms-premp.
Yes, we are ready and we have no concerns. Please release a new version.
closing as per Prem's comments. thank you!