KeysOperations Class
KeysOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
- Inheritance
-
builtins.objectKeysOperations
Constructor
KeysOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
An object model deserializer.
Variables
- models
Alias to model classes used in this operation group.
Methods
| create_if_not_exist |
Creates the first version of a new key if it does not exist. If it already exists, then the existing key is returned without any write operations being performed. This API does not create subsequent versions, and does not update existing keys. |
| get |
Gets the current version of the specified key from the specified key vault. |
| get_version |
Gets the specified version of the specified key in the specified key vault. |
| list |
Lists the keys in the specified key vault. |
| list_versions |
Lists the versions of the specified key in the specified key vault. |
create_if_not_exist
Creates the first version of a new key if it does not exist. If it already exists, then the existing key is returned without any write operations being performed. This API does not create subsequent versions, and does not update existing keys.
async create_if_not_exist(resource_group_name: str, vault_name: str, key_name: str, parameters: azure.mgmt.keyvault.v2021_06_01_preview.models._models_py3.KeyCreateParameters, **kwargs: Any) -> azure.mgmt.keyvault.v2021_06_01_preview.models._models_py3.Key
Parameters
- resource_group_name
- str
The name of the resource group which contains the specified key vault.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
Key, or the result of cls(response)
Return type
Exceptions
get
Gets the current version of the specified key from the specified key vault.
async get(resource_group_name: str, vault_name: str, key_name: str, **kwargs: Any) -> azure.mgmt.keyvault.v2021_06_01_preview.models._models_py3.Key
Parameters
- resource_group_name
- str
The name of the resource group which contains the specified key vault.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
Key, or the result of cls(response)
Return type
Exceptions
get_version
Gets the specified version of the specified key in the specified key vault.
async get_version(resource_group_name: str, vault_name: str, key_name: str, key_version: str, **kwargs: Any) -> azure.mgmt.keyvault.v2021_06_01_preview.models._models_py3.Key
Parameters
- resource_group_name
- str
The name of the resource group which contains the specified key vault.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
Key, or the result of cls(response)
Return type
Exceptions
list
Lists the keys in the specified key vault.
list(resource_group_name: str, vault_name: str, **kwargs: Any) -> AsyncIterable[azure.mgmt.keyvault.v2021_06_01_preview.models._models_py3.KeyListResult]
Parameters
- resource_group_name
- str
The name of the resource group which contains the specified key vault.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either KeyListResult or the result of cls(response)
Return type
Exceptions
list_versions
Lists the versions of the specified key in the specified key vault.
list_versions(resource_group_name: str, vault_name: str, key_name: str, **kwargs: Any) -> AsyncIterable[azure.mgmt.keyvault.v2021_06_01_preview.models._models_py3.KeyListResult]
Parameters
- resource_group_name
- str
The name of the resource group which contains the specified key vault.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either KeyListResult or the result of cls(response)
Return type
Exceptions
Attributes
models
models = <module 'azure.mgmt.keyvault.v2021_06_01_preview.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\keyvault\\v2021_06_01_preview\\models\\__init__.py'>
Feedback
Submit and view feedback for