azure-sdk-for-python icon indicating copy to clipboard operation
azure-sdk-for-python copied to clipboard

azure-mgmt-consumption is using the wrong API version

Open alk-jbrochet opened this issue 7 years ago • 8 comments

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'

alk-jbrochet avatar Jul 18 '19 10:07 alk-jbrochet

Thanks @alk-jbrochet for pointing out the version issue. I've labeled this issue to bring it to the attention of the team.

loarabia avatar Jul 19 '19 22:07 loarabia

Hello, some update on this? Thanks!

alk-jbrochet avatar Aug 05 '19 10:08 alk-jbrochet

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

tjsullivan1 avatar Jan 13 '20 22:01 tjsullivan1

The same for : consumption_client.price_sheet.api_version = '2019-10-01'

faisquinha avatar May 30 '20 02:05 faisquinha

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

RodgeFu avatar Jun 03 '20 07:06 RodgeFu

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ms-premp.

ghost avatar Jun 03 '20 07:06 ghost

Yes, we are ready and we have no concerns. Please release a new version.

ms-premp avatar Jun 28 '20 08:06 ms-premp

closing as per Prem's comments. thank you!

ramaganesan-rg avatar Jun 29 '20 17:06 ramaganesan-rg