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

Sdk automation/track2 azure mgmt keyvault #13662

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions sdk/keyvault/azure-mgmt-keyvault/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History

## 7.0.0b3 (2020-09-09)

**Features**

- Added operation group ManagedHsmsOperations

## 7.0.0b2 (2020-07-21)

**Bugfixes**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2016-10-01: :mod:`v2016_10_01.models<azure.mgmt.keyvault.v2016_10_01.models>`
* 2018-02-14: :mod:`v2018_02_14.models<azure.mgmt.keyvault.v2018_02_14.models>`
* 2019-09-01: :mod:`v2019_09_01.models<azure.mgmt.keyvault.v2019_09_01.models>`
* 2020-04-01-preview: :mod:`v2020_04_01_preview.models<azure.mgmt.keyvault.v2020_04_01_preview.models>`
"""
if api_version == '2016-10-01':
from .v2016_10_01 import models
Expand All @@ -96,15 +97,32 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2019-09-01':
from .v2019_09_01 import models
return models
elif api_version == '2020-04-01-preview':
from .v2020_04_01_preview import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
def managed_hsms(self):
"""Instance depends on the API version:

* 2020-04-01-preview: :class:`ManagedHsmsOperations<azure.mgmt.keyvault.v2020_04_01_preview.operations.ManagedHsmsOperations>`
"""
api_version = self._get_api_version('managed_hsms')
if api_version == '2020-04-01-preview':
from .v2020_04_01_preview.operations import ManagedHsmsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(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:

* 2016-10-01: :class:`Operations<azure.mgmt.keyvault.v2016_10_01.operations.Operations>`
* 2018-02-14: :class:`Operations<azure.mgmt.keyvault.v2018_02_14.operations.Operations>`
* 2019-09-01: :class:`Operations<azure.mgmt.keyvault.v2019_09_01.operations.Operations>`
* 2020-04-01-preview: :class:`Operations<azure.mgmt.keyvault.v2020_04_01_preview.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2016-10-01':
Expand All @@ -113,6 +131,8 @@ def operations(self):
from .v2018_02_14.operations import Operations as OperationClass
elif api_version == '2019-09-01':
from .v2019_09_01.operations import Operations as OperationClass
elif api_version == '2020-04-01-preview':
from .v2020_04_01_preview.operations import Operations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -123,12 +143,15 @@ def private_endpoint_connections(self):

* 2018-02-14: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2018_02_14.operations.PrivateEndpointConnectionsOperations>`
* 2019-09-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2019_09_01.operations.PrivateEndpointConnectionsOperations>`
* 2020-04-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2020_04_01_preview.operations.PrivateEndpointConnectionsOperations>`
"""
api_version = self._get_api_version('private_endpoint_connections')
if api_version == '2018-02-14':
from .v2018_02_14.operations import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2019-09-01':
from .v2019_09_01.operations import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2020-04-01-preview':
from .v2020_04_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -139,12 +162,15 @@ def private_link_resources(self):

* 2018-02-14: :class:`PrivateLinkResourcesOperations<azure.mgmt.keyvault.v2018_02_14.operations.PrivateLinkResourcesOperations>`
* 2019-09-01: :class:`PrivateLinkResourcesOperations<azure.mgmt.keyvault.v2019_09_01.operations.PrivateLinkResourcesOperations>`
* 2020-04-01-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.keyvault.v2020_04_01_preview.operations.PrivateLinkResourcesOperations>`
"""
api_version = self._get_api_version('private_link_resources')
if api_version == '2018-02-14':
from .v2018_02_14.operations import PrivateLinkResourcesOperations as OperationClass
elif api_version == '2019-09-01':
from .v2019_09_01.operations import PrivateLinkResourcesOperations as OperationClass
elif api_version == '2020-04-01-preview':
from .v2020_04_01_preview.operations import PrivateLinkResourcesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -156,6 +182,7 @@ def vaults(self):
* 2016-10-01: :class:`VaultsOperations<azure.mgmt.keyvault.v2016_10_01.operations.VaultsOperations>`
* 2018-02-14: :class:`VaultsOperations<azure.mgmt.keyvault.v2018_02_14.operations.VaultsOperations>`
* 2019-09-01: :class:`VaultsOperations<azure.mgmt.keyvault.v2019_09_01.operations.VaultsOperations>`
* 2020-04-01-preview: :class:`VaultsOperations<azure.mgmt.keyvault.v2020_04_01_preview.operations.VaultsOperations>`
"""
api_version = self._get_api_version('vaults')
if api_version == '2016-10-01':
Expand All @@ -164,6 +191,8 @@ def vaults(self):
from .v2018_02_14.operations import VaultsOperations as OperationClass
elif api_version == '2019-09-01':
from .v2019_09_01.operations import VaultsOperations as OperationClass
elif api_version == '2020-04-01-preview':
from .v2020_04_01_preview.operations import VaultsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".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 = "7.0.0b2"
VERSION = "7.0.0b3"
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2016-10-01: :mod:`v2016_10_01.models<azure.mgmt.keyvault.v2016_10_01.models>`
* 2018-02-14: :mod:`v2018_02_14.models<azure.mgmt.keyvault.v2018_02_14.models>`
* 2019-09-01: :mod:`v2019_09_01.models<azure.mgmt.keyvault.v2019_09_01.models>`
* 2020-04-01-preview: :mod:`v2020_04_01_preview.models<azure.mgmt.keyvault.v2020_04_01_preview.models>`
"""
if api_version == '2016-10-01':
from ..v2016_10_01 import models
Expand All @@ -96,15 +97,32 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2019-09-01':
from ..v2019_09_01 import models
return models
elif api_version == '2020-04-01-preview':
from ..v2020_04_01_preview import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
def managed_hsms(self):
"""Instance depends on the API version:

* 2020-04-01-preview: :class:`ManagedHsmsOperations<azure.mgmt.keyvault.v2020_04_01_preview.aio.operations_async.ManagedHsmsOperations>`
"""
api_version = self._get_api_version('managed_hsms')
if api_version == '2020-04-01-preview':
from ..v2020_04_01_preview.aio.operations_async import ManagedHsmsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(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:

* 2016-10-01: :class:`Operations<azure.mgmt.keyvault.v2016_10_01.aio.operations_async.Operations>`
* 2018-02-14: :class:`Operations<azure.mgmt.keyvault.v2018_02_14.aio.operations_async.Operations>`
* 2019-09-01: :class:`Operations<azure.mgmt.keyvault.v2019_09_01.aio.operations_async.Operations>`
* 2020-04-01-preview: :class:`Operations<azure.mgmt.keyvault.v2020_04_01_preview.aio.operations_async.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2016-10-01':
Expand All @@ -113,6 +131,8 @@ def operations(self):
from ..v2018_02_14.aio.operations_async import Operations as OperationClass
elif api_version == '2019-09-01':
from ..v2019_09_01.aio.operations_async import Operations as OperationClass
elif api_version == '2020-04-01-preview':
from ..v2020_04_01_preview.aio.operations_async import Operations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -123,12 +143,15 @@ def private_endpoint_connections(self):

* 2018-02-14: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2018_02_14.aio.operations_async.PrivateEndpointConnectionsOperations>`
* 2019-09-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2019_09_01.aio.operations_async.PrivateEndpointConnectionsOperations>`
* 2020-04-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.keyvault.v2020_04_01_preview.aio.operations_async.PrivateEndpointConnectionsOperations>`
"""
api_version = self._get_api_version('private_endpoint_connections')
if api_version == '2018-02-14':
from ..v2018_02_14.aio.operations_async import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2019-09-01':
from ..v2019_09_01.aio.operations_async import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2020-04-01-preview':
from ..v2020_04_01_preview.aio.operations_async import PrivateEndpointConnectionsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -139,12 +162,15 @@ def private_link_resources(self):

* 2018-02-14: :class:`PrivateLinkResourcesOperations<azure.mgmt.keyvault.v2018_02_14.aio.operations_async.PrivateLinkResourcesOperations>`
* 2019-09-01: :class:`PrivateLinkResourcesOperations<azure.mgmt.keyvault.v2019_09_01.aio.operations_async.PrivateLinkResourcesOperations>`
* 2020-04-01-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.keyvault.v2020_04_01_preview.aio.operations_async.PrivateLinkResourcesOperations>`
"""
api_version = self._get_api_version('private_link_resources')
if api_version == '2018-02-14':
from ..v2018_02_14.aio.operations_async import PrivateLinkResourcesOperations as OperationClass
elif api_version == '2019-09-01':
from ..v2019_09_01.aio.operations_async import PrivateLinkResourcesOperations as OperationClass
elif api_version == '2020-04-01-preview':
from ..v2020_04_01_preview.aio.operations_async import PrivateLinkResourcesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -156,6 +182,7 @@ def vaults(self):
* 2016-10-01: :class:`VaultsOperations<azure.mgmt.keyvault.v2016_10_01.aio.operations_async.VaultsOperations>`
* 2018-02-14: :class:`VaultsOperations<azure.mgmt.keyvault.v2018_02_14.aio.operations_async.VaultsOperations>`
* 2019-09-01: :class:`VaultsOperations<azure.mgmt.keyvault.v2019_09_01.aio.operations_async.VaultsOperations>`
* 2020-04-01-preview: :class:`VaultsOperations<azure.mgmt.keyvault.v2020_04_01_preview.aio.operations_async.VaultsOperations>`
"""
api_version = self._get_api_version('vaults')
if api_version == '2016-10-01':
Expand All @@ -164,6 +191,8 @@ def vaults(self):
from ..v2018_02_14.aio.operations_async import VaultsOperations as OperationClass
elif api_version == '2019-09-01':
from ..v2019_09_01.aio.operations_async import VaultsOperations as OperationClass
elif api_version == '2020-04-01-preview':
from ..v2020_04_01_preview.aio.operations_async import VaultsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".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 @@ -1011,7 +1011,7 @@ class VaultPatchProperties(msrest.serialization.Model):
:type tenant_id: str
:param sku: SKU details.
:type sku: ~azure.mgmt.keyvault.v2018_02_14.models.Sku
:param access_policies: An array of 0 to 16 identities that have access to the key vault. All
:param access_policies: An array of 0 to 1024 identities that have access to the key vault. All
identities in the array must use the same tenant ID as the key vault's tenant ID.
:type access_policies: list[~azure.mgmt.keyvault.v2018_02_14.models.AccessPolicyEntry]
:param enabled_for_deployment: Property to specify whether Azure Virtual Machines are permitted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ class VaultPatchProperties(msrest.serialization.Model):
:type tenant_id: str
:param sku: SKU details.
:type sku: ~azure.mgmt.keyvault.v2018_02_14.models.Sku
:param access_policies: An array of 0 to 16 identities that have access to the key vault. All
:param access_policies: An array of 0 to 1024 identities that have access to the key vault. All
identities in the array must use the same tenant ID as the key vault's tenant ID.
:type access_policies: list[~azure.mgmt.keyvault.v2018_02_14.models.AccessPolicyEntry]
:param enabled_for_deployment: Property to specify whether Azure Virtual Machines are permitted
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._key_vault_management_client import KeyVaultManagementClient
__all__ = ['KeyVaultManagementClient']

try:
from ._patch import patch_sdk
patch_sdk()
except ImportError:
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from typing import TYPE_CHECKING

from azure.core.configuration import Configuration
from azure.core.pipeline import policies

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any

from azure.core.credentials import TokenCredential

VERSION = "unknown"

class KeyVaultManagementClientConfiguration(Configuration):
"""Configuration for KeyVaultManagementClient.

Note that all parameters used to create this instance are saved as instance
attributes.

:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
:type subscription_id: str
"""

def __init__(
self,
credential, # type: "TokenCredential"
subscription_id, # type: str
**kwargs # type: Any
):
# type: (...) -> None
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(KeyVaultManagementClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
self.credential_scopes = ['https://management.azure.com/.default']
self.credential_scopes.extend(kwargs.pop('credential_scopes', []))
kwargs.setdefault('sdk_moniker', 'mgmt-keyvault/{}'.format(VERSION))
self._configure(**kwargs)

def _configure(
self,
**kwargs # type: Any
):
# type: (...) -> None
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
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)