-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Preview support for Key Vault 7.1 #10124
Conversation
Can one of the admins verify this patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed the non-test files. A couple of questions/comments, but otherwise LGTM.
@property | ||
def recoverable_days(self): | ||
# type: () -> Optional[int] | ||
"""The number of days the certificate is retained before being deleted from a soft-delete enabled Key Vault. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is consistent already, leave it. But it would really be "soft delete-enabled" when used as an adjective. I changed all these in .NET. Again, though, just leave it if this is consistent.
@@ -40,7 +40,8 @@ class CertificateClient(KeyVaultClientBase): | |||
:param str vault_url: URL of the vault the client will access. This is also called the vault's "DNS Name". | |||
:param credential: An object which can provide an access token for the vault, such as a credential from | |||
:mod:`azure.identity` | |||
:keyword str api_version: version of the Key Vault API to use. Defaults to the most recent. | |||
:keyword api_version: version of the Key Vault API to use. Defaults to the most recent. | |||
:paramtype api_version: ~azure.keyvault.certificates.ApiVersion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this include "or str" since it's an enum
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our other enums allow arbitrary string values because they subclass str
; that isn't a feature of Enum
. ApiVersion
subclasses only Enum
because it doesn't need to be forward compatible.
However, it's true a string works for api_version
here, provided that string is a valid ApiVersion
value. That's by design, to prevent a breaking change for anyone passing a string. I mention only ApiVersion
in the docstring to point everyone else at the type they should be using.
This adds support for Key Vault version 7.1-preview to azure-keyvault-* 4.2.0b1. This PR looks daunting but it's mostly yaml and duplicating shared code. The public API change is small:
import_key
toKeyOperation
enum (closes KeyOperations needs to support "import" for 7.1-preview #9930)recoverable_days
property to Properties classes (closes Add new Soft Delete properties to Key Vault data plane #9907)ApiVersion
enum