Possible incorrect constant error in KeyVaultClient
scarfacedeb opened this issue · 3 comments
I'm trying to create new key in my Azure KeyVault and I keep getting the same NameError:
> client = Azure::KeyVault::Profiles::Latest::Client.new(options)
> client.create_key("https://secret.vault.azure.net/", "Testkey", "RSA-HSM")
NameError: uninitialized constant Azure::KeyVault::V7_0::KeyVaultClient::KeyCreateParameters
It's coming from KeyVaultClient#create_key_async.
I think that there're a couple of errors in that code: incorrect constant and camelCased method used, instead of snake_case.
Here's a quick fix that I applied to make it work again:
parameters = Azure::KeyVault::V7_0::Models::KeyCreateParameters.new
...
parameters.key_attributes = key_attributes
Furthermore, there're the same issues with import_key_async and update_key_async.
I tested KeyVaultClient#encrypt
and it didn't work either.
First of all, it has the same constant error as the methods mentioned earlier.
Next, its KeyOperationsParameters.mapper uses Base64Url
type for the value
parameter that isn't supported by MsRest::Serialization#serialize.
Am I doing something wrong? Is Key Vault SDK not finished yet?
@scarfacedeb Thanks for your feedback, I'll look into this next weekday.
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