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

ApiVersion field within client options for keyvault secret, key, and settings need to be settable.

Open ahsonkhan opened this issue 4 months ago • 5 comments

For some reason, these option fields are marked as const which means the user can't set them. They should likely be non-const. Making this change is non-breaking (unlike the other way around) https://github.com/Azure/azure-sdk-for-cpp/blob/22c52996f34099af7e1ef871cef45da29bc39c13/sdk/keyvault/azure-security-keyvault-secrets/inc/azure/keyvault/secrets/keyvault_options.hpp#L19-L26 https://github.com/Azure/azure-sdk-for-cpp/blob/22c52996f34099af7e1ef871cef45da29bc39c13/sdk/keyvault/azure-security-keyvault-keys/inc/azure/keyvault/keys/key_client_options.hpp#L56-L63 https://github.com/Azure/azure-sdk-for-cpp/blob/22c52996f34099af7e1ef871cef45da29bc39c13/sdk/keyvault/azure-security-keyvault-administration/inc/azure/keyvault/administration/settings_client_options.hpp#L24-L31

See other languages which allow setting this: https://github.com/Azure/azure-sdk-for-net/blob/e665cae9b336d64732a570d0deec209c5d3b7ddf/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretClientOptions.cs#L73

Other C++ SDK clients allow customizing the options: https://github.com/Azure/azure-sdk-for-cpp/blob/22c52996f34099af7e1ef871cef45da29bc39c13/sdk/attestation/azure-security-attestation/inc/azure/attestation/attestation_client_options.hpp#L94-L98 https://github.com/Azure/azure-sdk-for-cpp/blob/22c52996f34099af7e1ef871cef45da29bc39c13/sdk/keyvault/azure-security-keyvault-administration/inc/azure/keyvault/administration/backup_client.hpp#L29-L36

ahsonkhan avatar Oct 24 '24 01:10 ahsonkhan