Skip to content

azure-mgmt-apimanagement version 5.0.0 fails on creating or updating a product #34230

Open
@PottsSG

Description

@PottsSG
  • Package Name: azure-mgmt-apimanagement
  • Package Version: 5.0.0
  • Operating System: Ubuntu 22.04.5
  • Python Version: 3.13

Describe the bug
When calling the create_or_update method on azure.mgmt.apimanagement.operations.ProductOperations, in 4.0.1 of the SDK the call succeeds, but in 5.0.0 the call fails with an exception

To Reproduce
Steps to reproduce the behavior:
Register a product with APIM (Standard V2 SKU) using azure-mgmt-apimanagement==5.0.0

(code summarized and redacting values)
from azure.mgmt.apimanagement import ApiManagementClient
from azure.mgmt.apimanagement.models import ProductContract

client = ApiManagementClient(...)
client.product.create_or_update(
resource_group_name='...',
service_name='...',
product_id='...',
parameters=ProductContract(
description='...',
display_name='...'
)
)

The log shows an error:
[ERROR azure.identity] Could not create/update the Product
Traceback (most recent call last):
...
File "/mnt/vss/_work/1/s/registerapim/lib/python3.13/site-packages/azure/core/tracing/decorator.py", line 119, in wrapper_use_tracer
return func(*args, **kwargs)
File "/mnt/vss/_work/1/s/registerapim/lib/python3.13/site-packages/azure/mgmt/apimanagement/operations/_product_operations.py", line 797, in create_or_update
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
azure.core.exceptions.HttpResponseError: (MissingOrIncorrectVersionParameter) API version query parameter is not specified or was specified incorrectly. Supported versions: 2014-02-14-preview,2014-02-14,2015-09-15,2016-07-07,2016-10-10,2017-03-01,2018-01-01,2018-06-01-preview,2019-01-01,2019-12-01-preview,2019-12-01,2020-06-01-preview,2020-12-01,2021-01-01-preview,2021-04-01-preview,2021-08-01,2021-12-01-preview,2022-04-01-preview,2022-08-01,2022-09-01-preview,2023-03-01-preview,2023-05-01-preview,2023-09-01-preview,2024-06-01-preview Example query param format: api-version=SupportedVersion
Code: MissingOrIncorrectVersionParameter

Expected behavior
The product is created if it does not exist, or updated if it does exist. No error is logged.

Additional context
The APIM SKU is Standard V2

Metadata

Metadata

Assignees

No one assigned

    Labels

    API ManagementMgmtThis issue is related to a management-plane library.Service AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions