Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CertificateClient list operations fail with 2016-10-01 client #13122

Closed
chlowell opened this issue Aug 14, 2020 · 0 comments · Fixed by #13161
Closed

CertificateClient list operations fail with 2016-10-01 client #13122

chlowell opened this issue Aug 14, 2020 · 0 comments · Fixed by #13161
Labels
Autorest Issue Client This issue points to a problem in the data-plane of the library. KeyVault
Milestone

Comments

@chlowell
Copy link
Contributor

from azure.identity import DefaultAzureCredential
from azure.keyvault.certificates import ApiVersion, CertificateClient

client = CertificateClient(VAULT_URL, DefaultAzureCredential(), api_version=ApiVersion.V2016_10_01)
[_ for _ in client.list_properties_of_certificates()]

Raises an error:

Traceback (most recent call last):
  File "C:\temp\kv\repro.py", line 13, in <module>
    props = [_ for _ in client.list_properties_of_certificates()]
  File "...\azure-core\azure\core\tracing\decorator.py", line 83, in wrapper_use_tracer
    return func(*args, **kwargs)
  File "...\azure-keyvault-certificates\azure\keyvault\certificates\_client.py", line 596, in list_properties_of_certificates
    **kwargs
  File "...\azure-keyvault-certificates\azure\keyvault\certificates\_generated\_operations_mixin.py", line 917, in get_certificates
    return mixin_instance.get_certificates(vault_base_url, maxresults, include_pending, **kwargs)
TypeError: get_certificates() takes from 2 to 3 positional arguments but 4 were given

The error occurs because the call uses positional arguments and the generated method for version 2016-10-01 doesn't have an include_pending parameter:

# 2016-10-01
def get_certificates(self, vault_base_url, maxresults=None, **kwargs)

# 7.0
def get_certificates(self, vault_base_url, maxresults=None, include_pending=None, **kwargs)

get_deleted_certificates has the same problem.

@chlowell chlowell added Autorest Issue KeyVault Client This issue points to a problem in the data-plane of the library. labels Aug 14, 2020
@chlowell chlowell added this to the Backlog milestone Aug 14, 2020
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this issue Mar 1, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Autorest Issue Client This issue points to a problem in the data-plane of the library. KeyVault
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant