-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated Key Vault 7.1-preview client (#10037)
- Loading branch information
Showing
45 changed files
with
52,809 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
...ault-certificates/azure/keyvault/certificates/_shared/_generated/v7_1_preview/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# 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_client import KeyVaultClient | ||
__all__ = ['KeyVaultClient'] | ||
|
||
from .version import VERSION | ||
|
||
__version__ = VERSION | ||
|
47 changes: 47 additions & 0 deletions
47
...ertificates/azure/keyvault/certificates/_shared/_generated/v7_1_preview/_configuration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# 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 azure.core.configuration import Configuration | ||
from azure.core.pipeline import policies | ||
|
||
from .version import VERSION | ||
|
||
|
||
class KeyVaultClientConfiguration(Configuration): | ||
"""Configuration for KeyVaultClient | ||
Note that all parameters used to create this instance are saved as instance | ||
attributes. | ||
:param credentials: Credentials needed for the client to connect to Azure. | ||
:type credentials: :mod:`A msrestazure Credentials | ||
object<msrestazure.azure_active_directory>` | ||
""" | ||
|
||
def __init__(self, credentials, **kwargs): | ||
|
||
if credentials is None: | ||
raise ValueError("Parameter 'credentials' must not be None.") | ||
|
||
super(KeyVaultClientConfiguration, self).__init__(**kwargs) | ||
self._configure(**kwargs) | ||
|
||
self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) | ||
self.generate_client_request_id = True | ||
|
||
self.credentials = credentials | ||
|
||
def _configure(self, **kwargs): | ||
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) |
48 changes: 48 additions & 0 deletions
48
...ificates/azure/keyvault/certificates/_shared/_generated/v7_1_preview/_key_vault_client.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# 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 azure.core import PipelineClient | ||
from msrest import Serializer, Deserializer | ||
|
||
from ._configuration import KeyVaultClientConfiguration | ||
from .operations import KeyVaultClientOperationsMixin | ||
from . import models | ||
|
||
|
||
class KeyVaultClient(KeyVaultClientOperationsMixin): | ||
"""The key vault client performs cryptographic key operations and vault operations against the Key Vault service. | ||
:param credentials: Credentials needed for the client to connect to Azure. | ||
:type credentials: :mod:`A msrestazure Credentials | ||
object<msrestazure.azure_active_directory>` | ||
""" | ||
|
||
def __init__( | ||
self, credentials, **kwargs): | ||
|
||
base_url = '{vaultBaseUrl}' | ||
self._config = KeyVaultClientConfiguration(credentials, **kwargs) | ||
self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) | ||
|
||
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} | ||
self.api_version = '7.1-preview' | ||
self._serialize = Serializer(client_models) | ||
self._deserialize = Deserializer(client_models) | ||
|
||
|
||
def close(self): | ||
self._client.close() | ||
def __enter__(self): | ||
self._client.__enter__() | ||
return self | ||
def __exit__(self, *exc_details): | ||
self._client.__exit__(*exc_details) |
13 changes: 13 additions & 0 deletions
13
...-certificates/azure/keyvault/certificates/_shared/_generated/v7_1_preview/aio/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# 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_client_async import KeyVaultClient | ||
__all__ = ['KeyVaultClient'] |
47 changes: 47 additions & 0 deletions
47
...s/azure/keyvault/certificates/_shared/_generated/v7_1_preview/aio/_configuration_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# 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 azure.core.configuration import Configuration | ||
from azure.core.pipeline import policies | ||
|
||
from ..version import VERSION | ||
|
||
|
||
class KeyVaultClientConfiguration(Configuration): | ||
"""Configuration for KeyVaultClient | ||
Note that all parameters used to create this instance are saved as instance | ||
attributes. | ||
:param credentials: Credentials needed for the client to connect to Azure. | ||
:type credentials: :mod:`A msrestazure Credentials | ||
object<msrestazure.azure_active_directory>` | ||
""" | ||
|
||
def __init__(self, credentials, **kwargs): | ||
|
||
if credentials is None: | ||
raise ValueError("Parameter 'credentials' must not be None.") | ||
|
||
super(KeyVaultClientConfiguration, self).__init__(**kwargs) | ||
self._configure(**kwargs) | ||
|
||
self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) | ||
self.generate_client_request_id = True | ||
|
||
self.credentials = credentials | ||
|
||
def _configure(self, **kwargs): | ||
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.AsyncRetryPolicy(**kwargs) | ||
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) | ||
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) |
48 changes: 48 additions & 0 deletions
48
...zure/keyvault/certificates/_shared/_generated/v7_1_preview/aio/_key_vault_client_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# 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 azure.core import AsyncPipelineClient | ||
from msrest import Serializer, Deserializer | ||
|
||
from ._configuration_async import KeyVaultClientConfiguration | ||
from .operations_async import KeyVaultClientOperationsMixin | ||
from .. import models | ||
|
||
|
||
class KeyVaultClient(KeyVaultClientOperationsMixin): | ||
"""The key vault client performs cryptographic key operations and vault operations against the Key Vault service. | ||
:param credentials: Credentials needed for the client to connect to Azure. | ||
:type credentials: :mod:`A msrestazure Credentials | ||
object<msrestazure.azure_active_directory>` | ||
""" | ||
|
||
def __init__( | ||
self, credentials, **kwargs): | ||
|
||
base_url = '{vaultBaseUrl}' | ||
self._config = KeyVaultClientConfiguration(credentials, **kwargs) | ||
self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) | ||
|
||
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} | ||
self.api_version = '7.1-preview' | ||
self._serialize = Serializer(client_models) | ||
self._deserialize = Deserializer(client_models) | ||
|
||
|
||
async def close(self): | ||
await self._client.close() | ||
async def __aenter__(self): | ||
await self._client.__aenter__() | ||
return self | ||
async def __aexit__(self, *exc_details): | ||
await self._client.__aexit__(*exc_details) |
16 changes: 16 additions & 0 deletions
16
...re/keyvault/certificates/_shared/_generated/v7_1_preview/aio/operations_async/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_client_operations_async import KeyVaultClientOperationsMixin | ||
|
||
__all__ = [ | ||
'KeyVaultClientOperationsMixin', | ||
] |
Oops, something went wrong.