KeyVault api-version parameter missing from get_certificates_as_lazy_async
jstange opened this issue · 3 comments
Discovered while testing #2826. The API call made in get_certificates_as_lazy_async
is missing api-version
, per the REST response:
{"error":{"code":"BadParameter","message":"api-version must be specified"}}
The other calls in this file all supply it, so the fix seems straightforward enough. The diff appended to this comment fixes get_certificates_as_lazy_async
for me. I should note that I'm interacting with Azure Gov, so if the commercial cloud behaves differently that could explain how nobody else has noticed.
Other get_*_as_lazy_async
methods (e.g. get_certificate_issuers_as_lazy_async
) also appear to be missing this parameter, and I suspect would need it as well. I haven't verified that, or looked at versions other than 7.1.
diff --git a/data/azure_key_vault/lib/7.1/generated/azure_key_vault/key_vault_client.rb b/data/azure_key_vault/lib/7.1/generated/azure_key_vault/key_vault_client.rb
index d6fe873..a3feff2 100644
--- a/data/azure_key_vault/lib/7.1/generated/azure_key_vault/key_vault_client.rb
+++ b/data/azure_key_vault/lib/7.1/generated/azure_key_vault/key_vault_client.rb
@@ -11169,7 +11169,7 @@ module Azure::KeyVault::V7_1
fail ArgumentError, 'vault_base_url is nil' if vault_base_url.nil?
fail ArgumentError, "'maxresults' should satisfy the constraint - 'InclusiveMaximum': '25'" if !maxresults.nil? && maxresults > 25
fail ArgumentError, "'maxresults' should satisfy the constraint - 'InclusiveMinimum': '1'" if !maxresults.nil? && maxresults < 1
-
+ fail ArgumentError, 'api_version is nil' if api_version.nil?
request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'
@@ -11180,7 +11180,7 @@ module Azure::KeyVault::V7_1
options = {
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
- query_params: {'maxresults' => maxresults,'includePending' => include_pending},
+ query_params: {'maxresults' => maxresults,'includePending' => include_pending, "api-version" => api_version},
headers: request_headers.merge(custom_headers || {}),
base_url: request_url
}
Can you try get_certificates_async
? This function has api-version. This part of code is autogenerated. So It has some issues now.
Yeah, calling the _async
version with a value!
appended is an ok workaround, I'll ride that for now.
I'm finding more stuff in this gem as I get closer to what I'm actually trying to do. Will file separate issues as I find them.
Thank you for your interest in Azure SDKs. As detailed in this retirement announcement, this repo is no longer supported as of December 31st 2021. Please find the up-to-date list of languages and services supported with Azure SDKs here: https://aka.ms/azsdk