Skip to content

Commit

Permalink
code and test (#29300)
Browse files Browse the repository at this point in the history
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
  • Loading branch information
azure-sdk authored Mar 17, 2023
1 parent 2e6e5b2 commit ef4c875
Show file tree
Hide file tree
Showing 241 changed files with 20,849 additions and 1,081 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.2.0 (2023-03-13)

### Features Added

- Added operation group MHSMRegionsOperations
- Added operation group ManagedHsmKeysOperations
- Model ManagedHsmProperties has a new parameter regions
- Model ManagedHsmProperties has a new parameter security_domain_properties

## 10.2.0b1 (2023-02-14)

### Features Added
Expand Down
5 changes: 3 additions & 2 deletions sdk/keyvault/azure-mgmt-keyvault/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ client = KeyVaultManagementClient(credential=DefaultAzureCredential(), subscript

## Examples


Code samples for this package can be found at [Key Vault Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com and [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
Code samples for this package can be found at:
- [Search Key Vault Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com
- [Azure Python Mgmt SDK Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)


## Troubleshooting
Expand Down
6 changes: 3 additions & 3 deletions sdk/keyvault/azure-mgmt-keyvault/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "2f17a9028f33fe80cf1ae62642fe9ed63c0a17f7",
"commit": "ee96574a6d4ed37a06883b8e3f8fd3adf4803b83",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/[email protected].0",
"@autorest/[email protected].3",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/keyvault/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected].0 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/keyvault/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected].3 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"readme": "specification/keyvault/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,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 = '2022-07-01'
DEFAULT_API_VERSION = '2023-02-01'
_PROFILE_TAG = "azure.mgmt.keyvault.KeyVaultManagementClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
Expand Down Expand Up @@ -94,6 +94,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 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>`
* 2022-07-01: :mod:`v2022_07_01.models<azure.mgmt.keyvault.v2022_07_01.models>`
* 2023-02-01: :mod:`v2023_02_01.models<azure.mgmt.keyvault.v2023_02_01.models>`
"""
if api_version == '2016-10-01':
from .v2016_10_01 import models
Expand All @@ -119,6 +120,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2022-07-01':
from .v2022_07_01 import models
return models
elif api_version == '2023-02-01':
from .v2023_02_01 import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
Expand All @@ -130,6 +134,7 @@ def keys(self):
* 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>`
* 2022-07-01: :class:`KeysOperations<azure.mgmt.keyvault.v2022_07_01.operations.KeysOperations>`
* 2023-02-01: :class:`KeysOperations<azure.mgmt.keyvault.v2023_02_01.operations.KeysOperations>`
"""
api_version = self._get_api_version('keys')
if api_version == '2019-09-01':
Expand All @@ -142,11 +147,27 @@ def keys(self):
from .v2021_10_01.operations import KeysOperations as OperationClass
elif api_version == '2022-07-01':
from .v2022_07_01.operations import KeysOperations as OperationClass
elif api_version == '2023-02-01':
from .v2023_02_01.operations import KeysOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'keys'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def managed_hsm_keys(self):
"""Instance depends on the API version:
* 2023-02-01: :class:`ManagedHsmKeysOperations<azure.mgmt.keyvault.v2023_02_01.operations.ManagedHsmKeysOperations>`
"""
api_version = self._get_api_version('managed_hsm_keys')
if api_version == '2023-02-01':
from .v2023_02_01.operations import ManagedHsmKeysOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'managed_hsm_keys'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def managed_hsms(self):
"""Instance depends on the API version:
Expand All @@ -156,6 +177,7 @@ def managed_hsms(self):
* 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>`
* 2022-07-01: :class:`ManagedHsmsOperations<azure.mgmt.keyvault.v2022_07_01.operations.ManagedHsmsOperations>`
* 2023-02-01: :class:`ManagedHsmsOperations<azure.mgmt.keyvault.v2023_02_01.operations.ManagedHsmsOperations>`
"""
api_version = self._get_api_version('managed_hsms')
if api_version == '2020-04-01-preview':
Expand All @@ -168,6 +190,8 @@ def managed_hsms(self):
from .v2021_10_01.operations import ManagedHsmsOperations as OperationClass
elif api_version == '2022-07-01':
from .v2022_07_01.operations import ManagedHsmsOperations as OperationClass
elif api_version == '2023-02-01':
from .v2023_02_01.operations import ManagedHsmsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'managed_hsms'".format(api_version))
self._config.api_version = api_version
Expand All @@ -181,6 +205,7 @@ def mhsm_private_endpoint_connections(self):
* 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>`
* 2022-07-01: :class:`MHSMPrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2022_07_01.operations.MHSMPrivateEndpointConnectionsOperations>`
* 2023-02-01: :class:`MHSMPrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2023_02_01.operations.MHSMPrivateEndpointConnectionsOperations>`
"""
api_version = self._get_api_version('mhsm_private_endpoint_connections')
if api_version == '2021-04-01-preview':
Expand All @@ -191,6 +216,8 @@ def mhsm_private_endpoint_connections(self):
from .v2021_10_01.operations import MHSMPrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2022-07-01':
from .v2022_07_01.operations import MHSMPrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2023-02-01':
from .v2023_02_01.operations import MHSMPrivateEndpointConnectionsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'mhsm_private_endpoint_connections'".format(api_version))
self._config.api_version = api_version
Expand All @@ -204,6 +231,7 @@ def mhsm_private_link_resources(self):
* 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>`
* 2022-07-01: :class:`MHSMPrivateLinkResourcesOperations<azure.mgmt.keyvault.v2022_07_01.operations.MHSMPrivateLinkResourcesOperations>`
* 2023-02-01: :class:`MHSMPrivateLinkResourcesOperations<azure.mgmt.keyvault.v2023_02_01.operations.MHSMPrivateLinkResourcesOperations>`
"""
api_version = self._get_api_version('mhsm_private_link_resources')
if api_version == '2021-04-01-preview':
Expand All @@ -214,11 +242,27 @@ def mhsm_private_link_resources(self):
from .v2021_10_01.operations import MHSMPrivateLinkResourcesOperations as OperationClass
elif api_version == '2022-07-01':
from .v2022_07_01.operations import MHSMPrivateLinkResourcesOperations as OperationClass
elif api_version == '2023-02-01':
from .v2023_02_01.operations import MHSMPrivateLinkResourcesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'mhsm_private_link_resources'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def mhsm_regions(self):
"""Instance depends on the API version:
* 2023-02-01: :class:`MHSMRegionsOperations<azure.mgmt.keyvault.v2023_02_01.operations.MHSMRegionsOperations>`
"""
api_version = self._get_api_version('mhsm_regions')
if api_version == '2023-02-01':
from .v2023_02_01.operations import MHSMRegionsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'mhsm_regions'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def operations(self):
"""Instance depends on the API version:
Expand All @@ -231,6 +275,7 @@ def operations(self):
* 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>`
* 2022-07-01: :class:`Operations<azure.mgmt.keyvault.v2022_07_01.operations.Operations>`
* 2023-02-01: :class:`Operations<azure.mgmt.keyvault.v2023_02_01.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2016-10-01':
Expand All @@ -249,6 +294,8 @@ def operations(self):
from .v2021_10_01.operations import Operations as OperationClass
elif api_version == '2022-07-01':
from .v2022_07_01.operations import Operations as OperationClass
elif api_version == '2023-02-01':
from .v2023_02_01.operations import Operations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
self._config.api_version = api_version
Expand All @@ -265,6 +312,7 @@ def private_endpoint_connections(self):
* 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>`
* 2022-07-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2022_07_01.operations.PrivateEndpointConnectionsOperations>`
* 2023-02-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2023_02_01.operations.PrivateEndpointConnectionsOperations>`
"""
api_version = self._get_api_version('private_endpoint_connections')
if api_version == '2018-02-14':
Expand All @@ -281,6 +329,8 @@ def private_endpoint_connections(self):
from .v2021_10_01.operations import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2022-07-01':
from .v2022_07_01.operations import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2023-02-01':
from .v2023_02_01.operations import PrivateEndpointConnectionsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version))
self._config.api_version = api_version
Expand All @@ -297,6 +347,7 @@ def private_link_resources(self):
* 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>`
* 2022-07-01: :class:`PrivateLinkResourcesOperations<azure.mgmt.keyvault.v2022_07_01.operations.PrivateLinkResourcesOperations>`
* 2023-02-01: :class:`PrivateLinkResourcesOperations<azure.mgmt.keyvault.v2023_02_01.operations.PrivateLinkResourcesOperations>`
"""
api_version = self._get_api_version('private_link_resources')
if api_version == '2018-02-14':
Expand All @@ -313,6 +364,8 @@ def private_link_resources(self):
from .v2021_10_01.operations import PrivateLinkResourcesOperations as OperationClass
elif api_version == '2022-07-01':
from .v2022_07_01.operations import PrivateLinkResourcesOperations as OperationClass
elif api_version == '2023-02-01':
from .v2023_02_01.operations import PrivateLinkResourcesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version))
self._config.api_version = api_version
Expand All @@ -326,6 +379,7 @@ def secrets(self):
* 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>`
* 2022-07-01: :class:`SecretsOperations<azure.mgmt.keyvault.v2022_07_01.operations.SecretsOperations>`
* 2023-02-01: :class:`SecretsOperations<azure.mgmt.keyvault.v2023_02_01.operations.SecretsOperations>`
"""
api_version = self._get_api_version('secrets')
if api_version == '2020-04-01-preview':
Expand All @@ -336,6 +390,8 @@ def secrets(self):
from .v2021_10_01.operations import SecretsOperations as OperationClass
elif api_version == '2022-07-01':
from .v2022_07_01.operations import SecretsOperations as OperationClass
elif api_version == '2023-02-01':
from .v2023_02_01.operations import SecretsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'secrets'".format(api_version))
self._config.api_version = api_version
Expand All @@ -353,6 +409,7 @@ def vaults(self):
* 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>`
* 2022-07-01: :class:`VaultsOperations<azure.mgmt.keyvault.v2022_07_01.operations.VaultsOperations>`
* 2023-02-01: :class:`VaultsOperations<azure.mgmt.keyvault.v2023_02_01.operations.VaultsOperations>`
"""
api_version = self._get_api_version('vaults')
if api_version == '2016-10-01':
Expand All @@ -371,6 +428,8 @@ def vaults(self):
from .v2021_10_01.operations import VaultsOperations as OperationClass
elif api_version == '2022-07-01':
from .v2022_07_01.operations import VaultsOperations as OperationClass
elif api_version == '2023-02-01':
from .v2023_02_01.operations import VaultsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'vaults'".format(api_version))
self._config.api_version = api_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "10.2.0b1"
VERSION = "10.2.0"
Loading

0 comments on commit ef4c875

Please sign in to comment.