Skip to content

Commit 9257b34

Browse files
changlong-liuSDK Automation
andauthored
Sdk automation/track2 azure mgmt keyvault (Azure#13662)
* Generated from c273efbfeb4c2c2e0729579114947c91ab747daa add tag * version and test Co-authored-by: SDK Automation <[email protected]>
1 parent b3b9c6a commit 9257b34

32 files changed

+8166
-936
lines changed

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

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

3+
## 7.0.0b3 (2020-09-09)
4+
5+
**Features**
6+
7+
- Added operation group ManagedHsmsOperations
8+
39
## 7.0.0b2 (2020-07-21)
410

511
**Bugfixes**

sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_key_vault_management_client.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
8686
* 2016-10-01: :mod:`v2016_10_01.models<azure.mgmt.keyvault.v2016_10_01.models>`
8787
* 2018-02-14: :mod:`v2018_02_14.models<azure.mgmt.keyvault.v2018_02_14.models>`
8888
* 2019-09-01: :mod:`v2019_09_01.models<azure.mgmt.keyvault.v2019_09_01.models>`
89+
* 2020-04-01-preview: :mod:`v2020_04_01_preview.models<azure.mgmt.keyvault.v2020_04_01_preview.models>`
8990
"""
9091
if api_version == '2016-10-01':
9192
from .v2016_10_01 import models
@@ -96,15 +97,32 @@ def models(cls, api_version=DEFAULT_API_VERSION):
9697
elif api_version == '2019-09-01':
9798
from .v2019_09_01 import models
9899
return models
100+
elif api_version == '2020-04-01-preview':
101+
from .v2020_04_01_preview import models
102+
return models
99103
raise NotImplementedError("APIVersion {} is not available".format(api_version))
100104

105+
@property
106+
def managed_hsms(self):
107+
"""Instance depends on the API version:
108+
109+
* 2020-04-01-preview: :class:`ManagedHsmsOperations<azure.mgmt.keyvault.v2020_04_01_preview.operations.ManagedHsmsOperations>`
110+
"""
111+
api_version = self._get_api_version('managed_hsms')
112+
if api_version == '2020-04-01-preview':
113+
from .v2020_04_01_preview.operations import ManagedHsmsOperations as OperationClass
114+
else:
115+
raise NotImplementedError("APIVersion {} is not available".format(api_version))
116+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
117+
101118
@property
102119
def operations(self):
103120
"""Instance depends on the API version:
104121
105122
* 2016-10-01: :class:`Operations<azure.mgmt.keyvault.v2016_10_01.operations.Operations>`
106123
* 2018-02-14: :class:`Operations<azure.mgmt.keyvault.v2018_02_14.operations.Operations>`
107124
* 2019-09-01: :class:`Operations<azure.mgmt.keyvault.v2019_09_01.operations.Operations>`
125+
* 2020-04-01-preview: :class:`Operations<azure.mgmt.keyvault.v2020_04_01_preview.operations.Operations>`
108126
"""
109127
api_version = self._get_api_version('operations')
110128
if api_version == '2016-10-01':
@@ -113,6 +131,8 @@ def operations(self):
113131
from .v2018_02_14.operations import Operations as OperationClass
114132
elif api_version == '2019-09-01':
115133
from .v2019_09_01.operations import Operations as OperationClass
134+
elif api_version == '2020-04-01-preview':
135+
from .v2020_04_01_preview.operations import Operations as OperationClass
116136
else:
117137
raise NotImplementedError("APIVersion {} is not available".format(api_version))
118138
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -123,12 +143,15 @@ def private_endpoint_connections(self):
123143
124144
* 2018-02-14: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2018_02_14.operations.PrivateEndpointConnectionsOperations>`
125145
* 2019-09-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2019_09_01.operations.PrivateEndpointConnectionsOperations>`
146+
* 2020-04-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2020_04_01_preview.operations.PrivateEndpointConnectionsOperations>`
126147
"""
127148
api_version = self._get_api_version('private_endpoint_connections')
128149
if api_version == '2018-02-14':
129150
from .v2018_02_14.operations import PrivateEndpointConnectionsOperations as OperationClass
130151
elif api_version == '2019-09-01':
131152
from .v2019_09_01.operations import PrivateEndpointConnectionsOperations as OperationClass
153+
elif api_version == '2020-04-01-preview':
154+
from .v2020_04_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
132155
else:
133156
raise NotImplementedError("APIVersion {} is not available".format(api_version))
134157
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -139,12 +162,15 @@ def private_link_resources(self):
139162
140163
* 2018-02-14: :class:`PrivateLinkResourcesOperations<azure.mgmt.keyvault.v2018_02_14.operations.PrivateLinkResourcesOperations>`
141164
* 2019-09-01: :class:`PrivateLinkResourcesOperations<azure.mgmt.keyvault.v2019_09_01.operations.PrivateLinkResourcesOperations>`
165+
* 2020-04-01-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.keyvault.v2020_04_01_preview.operations.PrivateLinkResourcesOperations>`
142166
"""
143167
api_version = self._get_api_version('private_link_resources')
144168
if api_version == '2018-02-14':
145169
from .v2018_02_14.operations import PrivateLinkResourcesOperations as OperationClass
146170
elif api_version == '2019-09-01':
147171
from .v2019_09_01.operations import PrivateLinkResourcesOperations as OperationClass
172+
elif api_version == '2020-04-01-preview':
173+
from .v2020_04_01_preview.operations import PrivateLinkResourcesOperations as OperationClass
148174
else:
149175
raise NotImplementedError("APIVersion {} is not available".format(api_version))
150176
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -156,6 +182,7 @@ def vaults(self):
156182
* 2016-10-01: :class:`VaultsOperations<azure.mgmt.keyvault.v2016_10_01.operations.VaultsOperations>`
157183
* 2018-02-14: :class:`VaultsOperations<azure.mgmt.keyvault.v2018_02_14.operations.VaultsOperations>`
158184
* 2019-09-01: :class:`VaultsOperations<azure.mgmt.keyvault.v2019_09_01.operations.VaultsOperations>`
185+
* 2020-04-01-preview: :class:`VaultsOperations<azure.mgmt.keyvault.v2020_04_01_preview.operations.VaultsOperations>`
159186
"""
160187
api_version = self._get_api_version('vaults')
161188
if api_version == '2016-10-01':
@@ -164,6 +191,8 @@ def vaults(self):
164191
from .v2018_02_14.operations import VaultsOperations as OperationClass
165192
elif api_version == '2019-09-01':
166193
from .v2019_09_01.operations import VaultsOperations as OperationClass
194+
elif api_version == '2020-04-01-preview':
195+
from .v2020_04_01_preview.operations import VaultsOperations as OperationClass
167196
else:
168197
raise NotImplementedError("APIVersion {} is not available".format(api_version))
169198
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# license information.
66
# --------------------------------------------------------------------------
77

8-
VERSION = "7.0.0b2"
8+
VERSION = "7.0.0b3"

sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_key_vault_management_client_async.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
8686
* 2016-10-01: :mod:`v2016_10_01.models<azure.mgmt.keyvault.v2016_10_01.models>`
8787
* 2018-02-14: :mod:`v2018_02_14.models<azure.mgmt.keyvault.v2018_02_14.models>`
8888
* 2019-09-01: :mod:`v2019_09_01.models<azure.mgmt.keyvault.v2019_09_01.models>`
89+
* 2020-04-01-preview: :mod:`v2020_04_01_preview.models<azure.mgmt.keyvault.v2020_04_01_preview.models>`
8990
"""
9091
if api_version == '2016-10-01':
9192
from ..v2016_10_01 import models
@@ -96,15 +97,32 @@ def models(cls, api_version=DEFAULT_API_VERSION):
9697
elif api_version == '2019-09-01':
9798
from ..v2019_09_01 import models
9899
return models
100+
elif api_version == '2020-04-01-preview':
101+
from ..v2020_04_01_preview import models
102+
return models
99103
raise NotImplementedError("APIVersion {} is not available".format(api_version))
100104

105+
@property
106+
def managed_hsms(self):
107+
"""Instance depends on the API version:
108+
109+
* 2020-04-01-preview: :class:`ManagedHsmsOperations<azure.mgmt.keyvault.v2020_04_01_preview.aio.operations_async.ManagedHsmsOperations>`
110+
"""
111+
api_version = self._get_api_version('managed_hsms')
112+
if api_version == '2020-04-01-preview':
113+
from ..v2020_04_01_preview.aio.operations_async import ManagedHsmsOperations as OperationClass
114+
else:
115+
raise NotImplementedError("APIVersion {} is not available".format(api_version))
116+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
117+
101118
@property
102119
def operations(self):
103120
"""Instance depends on the API version:
104121
105122
* 2016-10-01: :class:`Operations<azure.mgmt.keyvault.v2016_10_01.aio.operations_async.Operations>`
106123
* 2018-02-14: :class:`Operations<azure.mgmt.keyvault.v2018_02_14.aio.operations_async.Operations>`
107124
* 2019-09-01: :class:`Operations<azure.mgmt.keyvault.v2019_09_01.aio.operations_async.Operations>`
125+
* 2020-04-01-preview: :class:`Operations<azure.mgmt.keyvault.v2020_04_01_preview.aio.operations_async.Operations>`
108126
"""
109127
api_version = self._get_api_version('operations')
110128
if api_version == '2016-10-01':
@@ -113,6 +131,8 @@ def operations(self):
113131
from ..v2018_02_14.aio.operations_async import Operations as OperationClass
114132
elif api_version == '2019-09-01':
115133
from ..v2019_09_01.aio.operations_async import Operations as OperationClass
134+
elif api_version == '2020-04-01-preview':
135+
from ..v2020_04_01_preview.aio.operations_async import Operations as OperationClass
116136
else:
117137
raise NotImplementedError("APIVersion {} is not available".format(api_version))
118138
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -123,12 +143,15 @@ def private_endpoint_connections(self):
123143
124144
* 2018-02-14: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2018_02_14.aio.operations_async.PrivateEndpointConnectionsOperations>`
125145
* 2019-09-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2019_09_01.aio.operations_async.PrivateEndpointConnectionsOperations>`
146+
* 2020-04-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2020_04_01_preview.aio.operations_async.PrivateEndpointConnectionsOperations>`
126147
"""
127148
api_version = self._get_api_version('private_endpoint_connections')
128149
if api_version == '2018-02-14':
129150
from ..v2018_02_14.aio.operations_async import PrivateEndpointConnectionsOperations as OperationClass
130151
elif api_version == '2019-09-01':
131152
from ..v2019_09_01.aio.operations_async import PrivateEndpointConnectionsOperations as OperationClass
153+
elif api_version == '2020-04-01-preview':
154+
from ..v2020_04_01_preview.aio.operations_async import PrivateEndpointConnectionsOperations as OperationClass
132155
else:
133156
raise NotImplementedError("APIVersion {} is not available".format(api_version))
134157
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -139,12 +162,15 @@ def private_link_resources(self):
139162
140163
* 2018-02-14: :class:`PrivateLinkResourcesOperations<azure.mgmt.keyvault.v2018_02_14.aio.operations_async.PrivateLinkResourcesOperations>`
141164
* 2019-09-01: :class:`PrivateLinkResourcesOperations<azure.mgmt.keyvault.v2019_09_01.aio.operations_async.PrivateLinkResourcesOperations>`
165+
* 2020-04-01-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.keyvault.v2020_04_01_preview.aio.operations_async.PrivateLinkResourcesOperations>`
142166
"""
143167
api_version = self._get_api_version('private_link_resources')
144168
if api_version == '2018-02-14':
145169
from ..v2018_02_14.aio.operations_async import PrivateLinkResourcesOperations as OperationClass
146170
elif api_version == '2019-09-01':
147171
from ..v2019_09_01.aio.operations_async import PrivateLinkResourcesOperations as OperationClass
172+
elif api_version == '2020-04-01-preview':
173+
from ..v2020_04_01_preview.aio.operations_async import PrivateLinkResourcesOperations as OperationClass
148174
else:
149175
raise NotImplementedError("APIVersion {} is not available".format(api_version))
150176
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -156,6 +182,7 @@ def vaults(self):
156182
* 2016-10-01: :class:`VaultsOperations<azure.mgmt.keyvault.v2016_10_01.aio.operations_async.VaultsOperations>`
157183
* 2018-02-14: :class:`VaultsOperations<azure.mgmt.keyvault.v2018_02_14.aio.operations_async.VaultsOperations>`
158184
* 2019-09-01: :class:`VaultsOperations<azure.mgmt.keyvault.v2019_09_01.aio.operations_async.VaultsOperations>`
185+
* 2020-04-01-preview: :class:`VaultsOperations<azure.mgmt.keyvault.v2020_04_01_preview.aio.operations_async.VaultsOperations>`
159186
"""
160187
api_version = self._get_api_version('vaults')
161188
if api_version == '2016-10-01':
@@ -164,6 +191,8 @@ def vaults(self):
164191
from ..v2018_02_14.aio.operations_async import VaultsOperations as OperationClass
165192
elif api_version == '2019-09-01':
166193
from ..v2019_09_01.aio.operations_async import VaultsOperations as OperationClass
194+
elif api_version == '2020-04-01-preview':
195+
from ..v2020_04_01_preview.aio.operations_async import VaultsOperations as OperationClass
167196
else:
168197
raise NotImplementedError("APIVersion {} is not available".format(api_version))
169198
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ class VaultPatchProperties(msrest.serialization.Model):
10111011
:type tenant_id: str
10121012
:param sku: SKU details.
10131013
:type sku: ~azure.mgmt.keyvault.v2018_02_14.models.Sku
1014-
:param access_policies: An array of 0 to 16 identities that have access to the key vault. All
1014+
:param access_policies: An array of 0 to 1024 identities that have access to the key vault. All
10151015
identities in the array must use the same tenant ID as the key vault's tenant ID.
10161016
:type access_policies: list[~azure.mgmt.keyvault.v2018_02_14.models.AccessPolicyEntry]
10171017
:param enabled_for_deployment: Property to specify whether Azure Virtual Machines are permitted

sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/_models_py3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ class VaultPatchProperties(msrest.serialization.Model):
10981098
:type tenant_id: str
10991099
:param sku: SKU details.
11001100
:type sku: ~azure.mgmt.keyvault.v2018_02_14.models.Sku
1101-
:param access_policies: An array of 0 to 16 identities that have access to the key vault. All
1101+
:param access_policies: An array of 0 to 1024 identities that have access to the key vault. All
11021102
identities in the array must use the same tenant ID as the key vault's tenant ID.
11031103
:type access_policies: list[~azure.mgmt.keyvault.v2018_02_14.models.AccessPolicyEntry]
11041104
:param enabled_for_deployment: Property to specify whether Azure Virtual Machines are permitted
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from ._key_vault_management_client import KeyVaultManagementClient
10+
__all__ = ['KeyVaultManagementClient']
11+
12+
try:
13+
from ._patch import patch_sdk
14+
patch_sdk()
15+
except ImportError:
16+
pass
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from typing import TYPE_CHECKING
10+
11+
from azure.core.configuration import Configuration
12+
from azure.core.pipeline import policies
13+
14+
if TYPE_CHECKING:
15+
# pylint: disable=unused-import,ungrouped-imports
16+
from typing import Any
17+
18+
from azure.core.credentials import TokenCredential
19+
20+
VERSION = "unknown"
21+
22+
class KeyVaultManagementClientConfiguration(Configuration):
23+
"""Configuration for KeyVaultManagementClient.
24+
25+
Note that all parameters used to create this instance are saved as instance
26+
attributes.
27+
28+
:param credential: Credential needed for the client to connect to Azure.
29+
:type credential: ~azure.core.credentials.TokenCredential
30+
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
31+
:type subscription_id: str
32+
"""
33+
34+
def __init__(
35+
self,
36+
credential, # type: "TokenCredential"
37+
subscription_id, # type: str
38+
**kwargs # type: Any
39+
):
40+
# type: (...) -> None
41+
if credential is None:
42+
raise ValueError("Parameter 'credential' must not be None.")
43+
if subscription_id is None:
44+
raise ValueError("Parameter 'subscription_id' must not be None.")
45+
super(KeyVaultManagementClientConfiguration, self).__init__(**kwargs)
46+
47+
self.credential = credential
48+
self.subscription_id = subscription_id
49+
self.credential_scopes = ['https://management.azure.com/.default']
50+
self.credential_scopes.extend(kwargs.pop('credential_scopes', []))
51+
kwargs.setdefault('sdk_moniker', 'mgmt-keyvault/{}'.format(VERSION))
52+
self._configure(**kwargs)
53+
54+
def _configure(
55+
self,
56+
**kwargs # type: Any
57+
):
58+
# type: (...) -> None
59+
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
60+
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
61+
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
62+
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
63+
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
64+
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
65+
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
66+
self.authentication_policy = kwargs.get('authentication_policy')
67+
if self.credential and not self.authentication_policy:
68+
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)

0 commit comments

Comments
 (0)