Partager via


ManagedHsmKeysOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

KeyVaultManagementClient's

<xref:managed_hsm_keys> attribute.

Inheritance
builtins.object
ManagedHsmKeysOperations

Constructor

ManagedHsmKeysOperations(*args, **kwargs)

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 managed HSM.

get_version

Gets the specified version of the specified key in the specified managed HSM.

list

Lists the keys in the specified managed HSM.

list_versions

Lists the versions of the specified key in the specified managed HSM.

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.

create_if_not_exist(resource_group_name: str, name: str, key_name: str, parameters: _models.ManagedHsmKeyCreateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> _models.ManagedHsmKey

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

The name of the Managed HSM Pool within the specified resource group. Required.

key_name
Required
str

The name of the key to be created. The value you provide may be copied globally for the purpose of running the service. The value provided should not include personally identifiable or sensitive information. Required.

parameters
Required

The parameters used to create the specified key. Is either a ManagedHsmKeyCreateParameters type or a IO[bytes] type. Required.

Returns

Type Description

ManagedHsmKey or the result of cls(response)

Exceptions

Type Description

get

Gets the current version of the specified key from the specified managed HSM.

get(resource_group_name: str, name: str, key_name: str, **kwargs: Any) -> ManagedHsmKey

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

The name of the Managed HSM Pool within the specified resource group. Required.

key_name
Required
str

The name of the key to be created. The value you provide may be copied globally for the purpose of running the service. The value provided should not include personally identifiable or sensitive information. Required.

Returns

Type Description

ManagedHsmKey or the result of cls(response)

Exceptions

Type Description

get_version

Gets the specified version of the specified key in the specified managed HSM.

get_version(resource_group_name: str, name: str, key_name: str, key_version: str, **kwargs: Any) -> ManagedHsmKey

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

The name of the Managed HSM Pool within the specified resource group. Required.

key_name
Required
str

The name of the key to be created. The value you provide may be copied globally for the purpose of running the service. The value provided should not include personally identifiable or sensitive information. Required.

key_version
Required
str

The version of the key to be retrieved. Required.

Returns

Type Description

ManagedHsmKey or the result of cls(response)

Exceptions

Type Description

list

Lists the keys in the specified managed HSM.

list(resource_group_name: str, name: str, **kwargs: Any) -> Iterable[ManagedHsmKey]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

The name of the Managed HSM Pool within the specified resource group. Required.

Returns

Type Description

An iterator like instance of either ManagedHsmKey or the result of cls(response)

Exceptions

Type Description

list_versions

Lists the versions of the specified key in the specified managed HSM.

list_versions(resource_group_name: str, name: str, key_name: str, **kwargs: Any) -> Iterable[ManagedHsmKey]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

The name of the Managed HSM Pool within the specified resource group. Required.

key_name
Required
str

The name of the key to be created. The value you provide may be copied globally for the purpose of running the service. The value provided should not include personally identifiable or sensitive information. Required.

Returns

Type Description

An iterator like instance of either ManagedHsmKey or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.keyvault.v2023_07_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\keyvault\\v2023_07_01\\models\\__init__.py'>