Skip to content

Commit aa607b3

Browse files
mccoyppvaneck
andauthored
[Key Vault] Generate with 7.6 API version (#41149)
Regenerate and update API version for Administration, Certificates, Secrets, and Keys SDKs. Signed-off-by: Paul Van Eck <[email protected]> Co-authored-by: Paul Van Eck <[email protected]>
1 parent fb9f99e commit aa607b3

File tree

100 files changed

+11991
-1774
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+11991
-1774
lines changed

sdk/keyvault/azure-keyvault-administration/CHANGELOG.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
# Release History
22

3-
## 4.6.0b2 (Unreleased)
3+
## 4.6.0 (2025-06-10)
44

55
### Features Added
66

7-
### Breaking Changes
8-
9-
### Bugs Fixed
7+
- Added support for service API version `7.6`
8+
- (From 4.6.0b1) Added `KeyVaultBackupClient.begin_pre_backup` and `KeyVaultBackupClient.begin_pre_restore` methods for
9+
checking if it is possible to perform a full key backup or full key restore
10+
[#37507](https://github.com/Azure/azure-sdk-for-python/pull/37507)
1011

1112
### Other Changes
1213

14+
- Python 3.8 is no longer supported. Please use Python version 3.9 or later.
15+
- Key Vault API version `7.6` is now the default
16+
- (From 4.6.0b1) Updated minimum `typing-extensions` version to 4.6.0
17+
1318
## 4.6.0b1 (2025-03-20)
1419

1520
### Features Added
@@ -117,7 +122,7 @@
117122
## 4.1.1 (2022-08-11)
118123

119124
### Other Changes
120-
- Documentation improvements
125+
- Documentation improvements
121126
([#25039](https://github.com/Azure/azure-sdk-for-python/issues/25039))
122127

123128
## 4.1.0 (2022-03-28)
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
include *.md
22
include LICENSE
3+
include azure/keyvault/administration/py.typed
4+
recursive-include tests *.py
5+
recursive-include samples *.py *.md
36
include azure/__init__.py
47
include azure/keyvault/__init__.py
5-
recursive-include samples *.py
6-
recursive-include tests *.py
7-
include azure/keyvault/administration/py.typed

sdk/keyvault/azure-keyvault-administration/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "python",
44
"TagPrefix": "python/keyvault/azure-keyvault-administration",
5-
"Tag": "python/keyvault/azure-keyvault-administration_979123dade"
5+
"Tag": "python/keyvault/azure-keyvault-administration_ab4ab43926"
66
}

sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_client.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from azure.core.rest import HttpRequest, HttpResponse
1616

1717
from ._configuration import KeyVaultClientConfiguration
18-
from ._serialization import Deserializer, Serializer
18+
from ._utils.serialization import Deserializer, Serializer
1919
from .operations import KeyVaultClientOperationsMixin, RoleAssignmentsOperations, RoleDefinitionsOperations
2020

2121
if TYPE_CHECKING:
@@ -26,16 +26,18 @@ class KeyVaultClient(KeyVaultClientOperationsMixin):
2626
"""The key vault client performs cryptographic key operations and vault operations against the Key
2727
Vault service.
2828
29-
:ivar role_assignments: RoleAssignmentsOperations operations
30-
:vartype role_assignments: azure.keyvault.administration._generated.operations.RoleAssignmentsOperations
3129
:ivar role_definitions: RoleDefinitionsOperations operations
32-
:vartype role_definitions: azure.keyvault.administration._generated.operations.RoleDefinitionsOperations
30+
:vartype role_definitions:
31+
azure.keyvault.administration._generated.operations.RoleDefinitionsOperations
32+
:ivar role_assignments: RoleAssignmentsOperations operations
33+
:vartype role_assignments:
34+
azure.keyvault.administration._generated.operations.RoleAssignmentsOperations
3335
:param vault_base_url: Required.
3436
:type vault_base_url: str
3537
:param credential: Credential used to authenticate requests to the service. Required.
3638
:type credential: ~azure.core.credentials.TokenCredential
37-
:keyword api_version: The API version to use for this operation. Default value is
38-
"7.6-preview.2". Note that overriding this default value may result in unsupported behavior.
39+
:keyword api_version: The API version to use for this operation. Default value is "7.6". Note
40+
that overriding this default value may result in unsupported behavior.
3941
:paramtype api_version: str
4042
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
4143
Retry-After header is present.
@@ -44,6 +46,7 @@ class KeyVaultClient(KeyVaultClientOperationsMixin):
4446
def __init__(self, vault_base_url: str, credential: "TokenCredential", **kwargs: Any) -> None:
4547
_endpoint = "{vaultBaseUrl}"
4648
self._config = KeyVaultClientConfiguration(vault_base_url=vault_base_url, credential=credential, **kwargs)
49+
4750
_policies = kwargs.pop("policies", None)
4851
if _policies is None:
4952
_policies = [
@@ -66,10 +69,10 @@ def __init__(self, vault_base_url: str, credential: "TokenCredential", **kwargs:
6669
self._serialize = Serializer()
6770
self._deserialize = Deserializer()
6871
self._serialize.client_side_validation = False
69-
self.role_assignments = RoleAssignmentsOperations(
72+
self.role_definitions = RoleDefinitionsOperations(
7073
self._client, self._config, self._serialize, self._deserialize
7174
)
72-
self.role_definitions = RoleDefinitionsOperations(
75+
self.role_assignments = RoleAssignmentsOperations(
7376
self._client, self._config, self._serialize, self._deserialize
7477
)
7578

sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_configuration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ class KeyVaultClientConfiguration: # pylint: disable=too-many-instance-attribut
2626
:type vault_base_url: str
2727
:param credential: Credential used to authenticate requests to the service. Required.
2828
:type credential: ~azure.core.credentials.TokenCredential
29-
:keyword api_version: The API version to use for this operation. Default value is
30-
"7.6-preview.2". Note that overriding this default value may result in unsupported behavior.
29+
:keyword api_version: The API version to use for this operation. Default value is "7.6". Note
30+
that overriding this default value may result in unsupported behavior.
3131
:paramtype api_version: str
3232
"""
3333

3434
def __init__(self, vault_base_url: str, credential: "TokenCredential", **kwargs: Any) -> None:
35-
api_version: str = kwargs.pop("api_version", "7.6-preview.2")
35+
api_version: str = kwargs.pop("api_version", "7.6")
3636

3737
if vault_base_url is None:
3838
raise ValueError("Parameter 'vault_base_url' must not be None.")

sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_patch.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# ------------------------------------
2-
# Copyright (c) Microsoft Corporation.
3-
# Licensed under the MIT License.
4-
# ------------------------------------
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# --------------------------------------------------------------------------
56
"""Customize generated code here.
67
78
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Code generated by Microsoft (R) Python Code Generator.
5+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
6+
# --------------------------------------------------------------------------
Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
# coding=utf-8
33
# --------------------------------------------------------------------------
44
# Copyright (c) Microsoft Corporation. All rights reserved.
5-
# Licensed under the MIT License. See License.txt in the project root for
6-
# license information.
5+
# Licensed under the MIT License. See License.txt in the project root for license information.
6+
# Code generated by Microsoft (R) Python Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
78
# --------------------------------------------------------------------------
89
# pylint: disable=protected-access, broad-except
910

@@ -21,18 +22,14 @@
2122
from datetime import datetime, date, time, timedelta, timezone
2223
from json import JSONEncoder
2324
import xml.etree.ElementTree as ET
25+
from collections.abc import MutableMapping
2426
from typing_extensions import Self
2527
import isodate
2628
from azure.core.exceptions import DeserializationError
2729
from azure.core import CaseInsensitiveEnumMeta
2830
from azure.core.pipeline import PipelineResponse
2931
from azure.core.serialization import _Null
3032

31-
if sys.version_info >= (3, 9):
32-
from collections.abc import MutableMapping
33-
else:
34-
from typing import MutableMapping
35-
3633
_LOGGER = logging.getLogger(__name__)
3734

3835
__all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"]
@@ -347,7 +344,7 @@ def _get_model(module_name: str, model_name: str):
347344
_UNSET = object()
348345

349346

350-
class _MyMutableMapping(MutableMapping[str, typing.Any]): # pylint: disable=unsubscriptable-object
347+
class _MyMutableMapping(MutableMapping[str, typing.Any]):
351348
def __init__(self, data: typing.Dict[str, typing.Any]) -> None:
352349
self._data = data
353350

@@ -407,13 +404,13 @@ def get(self, key: str, default: typing.Any = None) -> typing.Any:
407404
return default
408405

409406
@typing.overload
410-
def pop(self, key: str) -> typing.Any: ...
407+
def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ
411408

412409
@typing.overload
413-
def pop(self, key: str, default: _T) -> _T: ...
410+
def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs
414411

415412
@typing.overload
416-
def pop(self, key: str, default: typing.Any) -> typing.Any: ...
413+
def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs
417414

418415
def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
419416
"""
@@ -443,7 +440,7 @@ def clear(self) -> None:
443440
"""
444441
self._data.clear()
445442

446-
def update(self, *args: typing.Any, **kwargs: typing.Any) -> None:
443+
def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ
447444
"""
448445
Updates D from mapping/iterable E and F.
449446
:param any args: Either a mapping object or an iterable of key-value pairs.
@@ -454,7 +451,7 @@ def update(self, *args: typing.Any, **kwargs: typing.Any) -> None:
454451
def setdefault(self, key: str, default: None = None) -> None: ...
455452

456453
@typing.overload
457-
def setdefault(self, key: str, default: typing.Any) -> typing.Any: ...
454+
def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs
458455

459456
def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
460457
"""
@@ -644,7 +641,7 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self:
644641
cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items())
645642
cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}")
646643

647-
return super().__new__(cls) # pylint: disable=no-value-for-parameter
644+
return super().__new__(cls)
648645

649646
def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None:
650647
for base in cls.__bases__:
@@ -680,7 +677,7 @@ def _deserialize(cls, data, exist_discriminators):
680677
discriminator_value = data.find(xml_name).text # pyright: ignore
681678
else:
682679
discriminator_value = data.get(discriminator._rest_name)
683-
mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore
680+
mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member
684681
return mapped_cls._deserialize(data, exist_discriminators)
685682

686683
def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]:
Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,10 @@
1-
# pylint: disable=too-many-lines
1+
# pylint: disable=line-too-long,useless-suppression,too-many-lines
2+
# coding=utf-8
23
# --------------------------------------------------------------------------
3-
#
44
# Copyright (c) Microsoft Corporation. All rights reserved.
5-
#
6-
# The MIT License (MIT)
7-
#
8-
# Permission is hereby granted, free of charge, to any person obtaining a copy
9-
# of this software and associated documentation files (the ""Software""), to
10-
# deal in the Software without restriction, including without limitation the
11-
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12-
# sell copies of the Software, and to permit persons to whom the Software is
13-
# furnished to do so, subject to the following conditions:
14-
#
15-
# The above copyright notice and this permission notice shall be included in
16-
# all copies or substantial portions of the Software.
17-
#
18-
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23-
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24-
# IN THE SOFTWARE.
25-
#
5+
# Licensed under the MIT License. See License.txt in the project root for license information.
6+
# Code generated by Microsoft (R) Python Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
268
# --------------------------------------------------------------------------
279

2810
# pyright: reportUnnecessaryTypeIgnoreComment=false
@@ -411,7 +393,7 @@ def from_dict(
411393
:param function key_extractors: A key extractor function.
412394
:param str content_type: JSON by default, set application/xml if XML.
413395
:returns: An instance of this model
414-
:raises: DeserializationError if something went wrong
396+
:raises DeserializationError: if something went wrong
415397
:rtype: Self
416398
"""
417399
deserializer = Deserializer(cls._infer_class_models())
@@ -1361,7 +1343,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument
13611343
# Iter and wrapped, should have found one node only (the wrap one)
13621344
if len(children) != 1:
13631345
raise DeserializationError(
1364-
"Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( # pylint: disable=line-too-long
1346+
"Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format(
13651347
xml_name
13661348
)
13671349
)
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66
# --------------------------------------------------------------------------
77

88
from abc import ABC
9-
from typing import TYPE_CHECKING
10-
11-
from ._configuration import KeyVaultClientConfiguration
9+
from typing import Generic, TYPE_CHECKING, TypeVar
1210

1311
if TYPE_CHECKING:
14-
from azure.core import PipelineClient
12+
from .serialization import Deserializer, Serializer
13+
1514

16-
from ._serialization import Deserializer, Serializer
15+
TClient = TypeVar("TClient")
16+
TConfig = TypeVar("TConfig")
1717

1818

19-
class KeyVaultClientMixinABC(ABC):
19+
class ClientMixinABC(ABC, Generic[TClient, TConfig]):
2020
"""DO NOT use this class. It is for internal typing use only."""
2121

22-
_client: "PipelineClient"
23-
_config: KeyVaultClientConfiguration
22+
_client: TClient
23+
_config: TConfig
2424
_serialize: "Serializer"
2525
_deserialize: "Deserializer"

0 commit comments

Comments
 (0)