Skip to content

Commit

Permalink
[AutoRelease] t2-keyvault-2022-05-19-66553(Do not merge) (Azure#24520)
Browse files Browse the repository at this point in the history
* code and test

* Update CHANGELOG.md

Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
Co-authored-by: Yuchao Yan <[email protected]>
  • Loading branch information
azclibot and msyyc authored May 24, 2022
1 parent 9c7becd commit f8d8757
Show file tree
Hide file tree
Showing 205 changed files with 37,731 additions and 24,677 deletions.
9 changes: 9 additions & 0 deletions sdk/keyvault/azure-mgmt-keyvault/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Release History

## 10.0.0 (2022-05-24)

**Breaking changes**

- Model Key no longer has parameter release_policy
- Model Key no longer has parameter rotation_policy
- Model KeyProperties no longer has parameter release_policy
- Model KeyProperties no longer has parameter rotation_policy

## 9.3.0 (2021-11-11)

**Features**
Expand Down
1 change: 1 addition & 0 deletions sdk/keyvault/azure-mgmt-keyvault/MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ include *.md
include azure/__init__.py
include azure/mgmt/__init__.py
include LICENSE
include azure/mgmt/keyvault/py.typed
10 changes: 5 additions & 5 deletions sdk/keyvault/azure-mgmt-keyvault/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.4.5",
"autorest": "3.7.2",
"use": [
"@autorest/python@5.8.4",
"@autorest/[email protected].2"
"@autorest/python@5.13.0",
"@autorest/[email protected].3"
],
"commit": "f2aaaa76e3853dbfbee6558a29cee9b7c66798dc",
"commit": "61001b68a8aa743f0dd890224c6b5cb130ef006e",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/keyvault/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/[email protected].2 --version=3.4.5",
"autorest_command": "autorest specification/keyvault/resource-manager/readme.md --multiapi --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.13.0 --use=@autorest/[email protected].3 --version=3.7.2",
"readme": "specification/keyvault/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

from ._version import VERSION

Expand Down Expand Up @@ -68,4 +68,4 @@ def _configure(
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@

from typing import TYPE_CHECKING

from msrest import Deserializer, Serializer

from azure.mgmt.core import ARMPipelineClient
from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin
from msrest import Deserializer, Serializer

from ._configuration import KeyVaultManagementClientConfiguration

Expand All @@ -23,7 +24,6 @@
from typing import Any, Optional

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

class _SDKClient(object):
def __init__(self, *args, **kwargs):
Expand Down Expand Up @@ -56,7 +56,7 @@ class KeyVaultManagementClient(MultiApiClientMixin, _SDKClient):
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
"""

DEFAULT_API_VERSION = '2019-09-01'
DEFAULT_API_VERSION = '2021-10-01'
_PROFILE_TAG = "azure.mgmt.keyvault.KeyVaultManagementClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
Expand All @@ -70,12 +70,10 @@ def __init__(
credential, # type: "TokenCredential"
subscription_id, # type: str
api_version=None, # type: Optional[str]
base_url=None, # type: Optional[str]
base_url="https://management.azure.com", # type: str
profile=KnownProfiles.default, # type: KnownProfiles
**kwargs # type: Any
):
if not base_url:
base_url = 'https://management.azure.com'
self._config = KeyVaultManagementClientConfiguration(credential, subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
super(KeyVaultManagementClient, self).__init__(
Expand All @@ -97,6 +95,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2020-04-01-preview: :mod:`v2020_04_01_preview.models<azure.mgmt.keyvault.v2020_04_01_preview.models>`
* 2021-04-01-preview: :mod:`v2021_04_01_preview.models<azure.mgmt.keyvault.v2021_04_01_preview.models>`
* 2021-06-01-preview: :mod:`v2021_06_01_preview.models<azure.mgmt.keyvault.v2021_06_01_preview.models>`
* 2021-10-01: :mod:`v2021_10_01.models<azure.mgmt.keyvault.v2021_10_01.models>`
"""
if api_version == '2016-10-01':
from .v2016_10_01 import models
Expand All @@ -116,6 +115,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2021-06-01-preview':
from .v2021_06_01_preview import models
return models
elif api_version == '2021-10-01':
from .v2021_10_01 import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
Expand All @@ -125,6 +127,7 @@ def keys(self):
* 2019-09-01: :class:`KeysOperations<azure.mgmt.keyvault.v2019_09_01.operations.KeysOperations>`
* 2020-04-01-preview: :class:`KeysOperations<azure.mgmt.keyvault.v2020_04_01_preview.operations.KeysOperations>`
* 2021-06-01-preview: :class:`KeysOperations<azure.mgmt.keyvault.v2021_06_01_preview.operations.KeysOperations>`
* 2021-10-01: :class:`KeysOperations<azure.mgmt.keyvault.v2021_10_01.operations.KeysOperations>`
"""
api_version = self._get_api_version('keys')
if api_version == '2019-09-01':
Expand All @@ -133,6 +136,8 @@ def keys(self):
from .v2020_04_01_preview.operations import KeysOperations as OperationClass
elif api_version == '2021-06-01-preview':
from .v2021_06_01_preview.operations import KeysOperations as OperationClass
elif api_version == '2021-10-01':
from .v2021_10_01.operations import KeysOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'keys'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -144,6 +149,7 @@ def managed_hsms(self):
* 2020-04-01-preview: :class:`ManagedHsmsOperations<azure.mgmt.keyvault.v2020_04_01_preview.operations.ManagedHsmsOperations>`
* 2021-04-01-preview: :class:`ManagedHsmsOperations<azure.mgmt.keyvault.v2021_04_01_preview.operations.ManagedHsmsOperations>`
* 2021-06-01-preview: :class:`ManagedHsmsOperations<azure.mgmt.keyvault.v2021_06_01_preview.operations.ManagedHsmsOperations>`
* 2021-10-01: :class:`ManagedHsmsOperations<azure.mgmt.keyvault.v2021_10_01.operations.ManagedHsmsOperations>`
"""
api_version = self._get_api_version('managed_hsms')
if api_version == '2020-04-01-preview':
Expand All @@ -152,6 +158,8 @@ def managed_hsms(self):
from .v2021_04_01_preview.operations import ManagedHsmsOperations as OperationClass
elif api_version == '2021-06-01-preview':
from .v2021_06_01_preview.operations import ManagedHsmsOperations as OperationClass
elif api_version == '2021-10-01':
from .v2021_10_01.operations import ManagedHsmsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'managed_hsms'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -162,12 +170,15 @@ def mhsm_private_endpoint_connections(self):
* 2021-04-01-preview: :class:`MHSMPrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2021_04_01_preview.operations.MHSMPrivateEndpointConnectionsOperations>`
* 2021-06-01-preview: :class:`MHSMPrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2021_06_01_preview.operations.MHSMPrivateEndpointConnectionsOperations>`
* 2021-10-01: :class:`MHSMPrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2021_10_01.operations.MHSMPrivateEndpointConnectionsOperations>`
"""
api_version = self._get_api_version('mhsm_private_endpoint_connections')
if api_version == '2021-04-01-preview':
from .v2021_04_01_preview.operations import MHSMPrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2021-06-01-preview':
from .v2021_06_01_preview.operations import MHSMPrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2021-10-01':
from .v2021_10_01.operations import MHSMPrivateEndpointConnectionsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'mhsm_private_endpoint_connections'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -178,12 +189,15 @@ def mhsm_private_link_resources(self):
* 2021-04-01-preview: :class:`MHSMPrivateLinkResourcesOperations<azure.mgmt.keyvault.v2021_04_01_preview.operations.MHSMPrivateLinkResourcesOperations>`
* 2021-06-01-preview: :class:`MHSMPrivateLinkResourcesOperations<azure.mgmt.keyvault.v2021_06_01_preview.operations.MHSMPrivateLinkResourcesOperations>`
* 2021-10-01: :class:`MHSMPrivateLinkResourcesOperations<azure.mgmt.keyvault.v2021_10_01.operations.MHSMPrivateLinkResourcesOperations>`
"""
api_version = self._get_api_version('mhsm_private_link_resources')
if api_version == '2021-04-01-preview':
from .v2021_04_01_preview.operations import MHSMPrivateLinkResourcesOperations as OperationClass
elif api_version == '2021-06-01-preview':
from .v2021_06_01_preview.operations import MHSMPrivateLinkResourcesOperations as OperationClass
elif api_version == '2021-10-01':
from .v2021_10_01.operations import MHSMPrivateLinkResourcesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'mhsm_private_link_resources'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -198,6 +212,7 @@ def operations(self):
* 2020-04-01-preview: :class:`Operations<azure.mgmt.keyvault.v2020_04_01_preview.operations.Operations>`
* 2021-04-01-preview: :class:`Operations<azure.mgmt.keyvault.v2021_04_01_preview.operations.Operations>`
* 2021-06-01-preview: :class:`Operations<azure.mgmt.keyvault.v2021_06_01_preview.operations.Operations>`
* 2021-10-01: :class:`Operations<azure.mgmt.keyvault.v2021_10_01.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2016-10-01':
Expand All @@ -212,6 +227,8 @@ def operations(self):
from .v2021_04_01_preview.operations import Operations as OperationClass
elif api_version == '2021-06-01-preview':
from .v2021_06_01_preview.operations import Operations as OperationClass
elif api_version == '2021-10-01':
from .v2021_10_01.operations import Operations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -225,6 +242,7 @@ def private_endpoint_connections(self):
* 2020-04-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2020_04_01_preview.operations.PrivateEndpointConnectionsOperations>`
* 2021-04-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2021_04_01_preview.operations.PrivateEndpointConnectionsOperations>`
* 2021-06-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2021_06_01_preview.operations.PrivateEndpointConnectionsOperations>`
* 2021-10-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2021_10_01.operations.PrivateEndpointConnectionsOperations>`
"""
api_version = self._get_api_version('private_endpoint_connections')
if api_version == '2018-02-14':
Expand All @@ -237,6 +255,8 @@ def private_endpoint_connections(self):
from .v2021_04_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2021-06-01-preview':
from .v2021_06_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2021-10-01':
from .v2021_10_01.operations import PrivateEndpointConnectionsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -250,6 +270,7 @@ def private_link_resources(self):
* 2020-04-01-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.keyvault.v2020_04_01_preview.operations.PrivateLinkResourcesOperations>`
* 2021-04-01-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.keyvault.v2021_04_01_preview.operations.PrivateLinkResourcesOperations>`
* 2021-06-01-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.keyvault.v2021_06_01_preview.operations.PrivateLinkResourcesOperations>`
* 2021-10-01: :class:`PrivateLinkResourcesOperations<azure.mgmt.keyvault.v2021_10_01.operations.PrivateLinkResourcesOperations>`
"""
api_version = self._get_api_version('private_link_resources')
if api_version == '2018-02-14':
Expand All @@ -262,6 +283,8 @@ def private_link_resources(self):
from .v2021_04_01_preview.operations import PrivateLinkResourcesOperations as OperationClass
elif api_version == '2021-06-01-preview':
from .v2021_06_01_preview.operations import PrivateLinkResourcesOperations as OperationClass
elif api_version == '2021-10-01':
from .v2021_10_01.operations import PrivateLinkResourcesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -272,12 +295,15 @@ def secrets(self):
* 2020-04-01-preview: :class:`SecretsOperations<azure.mgmt.keyvault.v2020_04_01_preview.operations.SecretsOperations>`
* 2021-06-01-preview: :class:`SecretsOperations<azure.mgmt.keyvault.v2021_06_01_preview.operations.SecretsOperations>`
* 2021-10-01: :class:`SecretsOperations<azure.mgmt.keyvault.v2021_10_01.operations.SecretsOperations>`
"""
api_version = self._get_api_version('secrets')
if api_version == '2020-04-01-preview':
from .v2020_04_01_preview.operations import SecretsOperations as OperationClass
elif api_version == '2021-06-01-preview':
from .v2021_06_01_preview.operations import SecretsOperations as OperationClass
elif api_version == '2021-10-01':
from .v2021_10_01.operations import SecretsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'secrets'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -292,6 +318,7 @@ def vaults(self):
* 2020-04-01-preview: :class:`VaultsOperations<azure.mgmt.keyvault.v2020_04_01_preview.operations.VaultsOperations>`
* 2021-04-01-preview: :class:`VaultsOperations<azure.mgmt.keyvault.v2021_04_01_preview.operations.VaultsOperations>`
* 2021-06-01-preview: :class:`VaultsOperations<azure.mgmt.keyvault.v2021_06_01_preview.operations.VaultsOperations>`
* 2021-10-01: :class:`VaultsOperations<azure.mgmt.keyvault.v2021_10_01.operations.VaultsOperations>`
"""
api_version = self._get_api_version('vaults')
if api_version == '2016-10-01':
Expand All @@ -306,6 +333,8 @@ def vaults(self):
from .v2021_04_01_preview.operations import VaultsOperations as OperationClass
elif api_version == '2021-06-01-preview':
from .v2021_06_01_preview.operations import VaultsOperations as OperationClass
elif api_version == '2021-10-01':
from .v2021_10_01.operations import VaultsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'vaults'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "9.3.0"
VERSION = "10.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy

from .._version import VERSION

Expand Down Expand Up @@ -64,4 +64,4 @@ def _configure(
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Loading

0 comments on commit f8d8757

Please sign in to comment.