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

[Key Vault] Add 7.3-preview support for certificates #20477

Merged
merged 4 commits into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Release History

## 4.3.1 (Unreleased)
## 4.4.0b1 (Unreleased)

### Features Added
- Key Vault API version 7.3-preview is now the default

### Breaking Changes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(
profile=KnownProfiles.default, # type: KnownProfiles
**kwargs # type: Any
):
if api_version == '2016-10-01' or api_version == '7.0' or api_version == '7.1' or api_version == '7.2':
if api_version == '2016-10-01' or api_version == '7.0' or api_version == '7.1' or api_version == '7.2' or api_version == '7.3-preview':
base_url = '{vaultBaseUrl}'
else:
raise ValueError("API version {} is not available".format(api_version))
Expand All @@ -86,6 +86,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 7.0: :mod:`v7_0.models<azure.keyvault.v7_0.models>`
* 7.1: :mod:`v7_1.models<azure.keyvault.v7_1.models>`
* 7.2: :mod:`v7_2.models<azure.keyvault.v7_2.models>`
* 7.3-preview: :mod:`v7_3_preview.models<azure.keyvault.v7_3_preview.models>`
"""
if api_version == '2016-10-01':
from .v2016_10_01 import models
Expand All @@ -99,6 +100,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '7.2':
from .v7_2 import models
return models
elif api_version == '7.3-preview':
from .v7_3_preview import models
return models
raise ValueError("API version {} is not available".format(api_version))

def close(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def backup_certificate(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'backup_certificate'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -206,6 +208,8 @@ def create_certificate(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'create_certificate'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -331,6 +335,8 @@ def delete_certificate(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'delete_certificate'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -367,6 +373,8 @@ def delete_certificate_contacts(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'delete_certificate_contacts'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -406,6 +414,8 @@ def delete_certificate_issuer(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'delete_certificate_issuer'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -446,6 +456,8 @@ def delete_certificate_operation(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'delete_certificate_operation'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -675,6 +687,8 @@ def get_certificate(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'get_certificate'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -711,6 +725,8 @@ def get_certificate_contacts(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'get_certificate_contacts'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -751,6 +767,8 @@ def get_certificate_issuer(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'get_certificate_issuer'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -792,6 +810,8 @@ def get_certificate_issuers(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'get_certificate_issuers'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -831,6 +851,8 @@ def get_certificate_operation(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'get_certificate_operation'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -870,6 +892,8 @@ def get_certificate_policy(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'get_certificate_policy'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -913,6 +937,8 @@ def get_certificate_versions(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'get_certificate_versions'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -953,6 +979,8 @@ def get_certificates(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'get_certificates'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -993,6 +1021,8 @@ def get_deleted_certificate(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'get_deleted_certificate'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -1035,6 +1065,8 @@ def get_deleted_certificates(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'get_deleted_certificates'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -1734,6 +1766,8 @@ def import_certificate(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'import_certificate'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -1816,6 +1850,8 @@ def merge_certificate(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'merge_certificate'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -1856,6 +1892,8 @@ def purge_deleted_certificate(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'purge_deleted_certificate'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -2003,6 +2041,8 @@ def recover_deleted_certificate(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'recover_deleted_certificate'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -2219,6 +2259,8 @@ def restore_certificate(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'restore_certificate'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -2369,6 +2411,8 @@ def set_certificate_contacts(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'set_certificate_contacts'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -2411,6 +2455,8 @@ def set_certificate_issuer(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'set_certificate_issuer'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -2655,6 +2701,8 @@ def update_certificate(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'update_certificate'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -2697,6 +2745,8 @@ def update_certificate_issuer(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'update_certificate_issuer'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -2739,6 +2789,8 @@ def update_certificate_operation(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'update_certificate_operation'".format(api_version))
mixin_instance = OperationClass()
Expand Down Expand Up @@ -2781,6 +2833,8 @@ def update_certificate_policy(
from .v7_1.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.2':
from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass
elif api_version == '7.3-preview':
from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'update_certificate_policy'".format(api_version))
mixin_instance = OperationClass()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(
profile: KnownProfiles = KnownProfiles.default,
**kwargs # type: Any
) -> None:
if api_version == '2016-10-01' or api_version == '7.0' or api_version == '7.1' or api_version == '7.2':
if api_version == '2016-10-01' or api_version == '7.0' or api_version == '7.1' or api_version == '7.2' or api_version == '7.3-preview':
base_url = '{vaultBaseUrl}'
else:
raise ValueError("API version {} is not available".format(api_version))
Expand All @@ -81,6 +81,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 7.0: :mod:`v7_0.models<azure.keyvault.v7_0.models>`
* 7.1: :mod:`v7_1.models<azure.keyvault.v7_1.models>`
* 7.2: :mod:`v7_2.models<azure.keyvault.v7_2.models>`
* 7.3-preview: :mod:`v7_3_preview.models<azure.keyvault.v7_3_preview.models>`
"""
if api_version == '2016-10-01':
from ..v2016_10_01 import models
Expand All @@ -94,6 +95,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '7.2':
from ..v7_2 import models
return models
elif api_version == '7.3-preview':
from ..v7_3_preview import models
return models
raise ValueError("API version {} is not available".format(api_version))

async def close(self):
Expand Down
Loading