KeyProperties Class

A key's ID and attributes.

Inheritance
builtins.object
KeyProperties

Constructor

KeyProperties(key_id: str, attributes: _models.KeyAttributes | None = None, **kwargs: Any)

Parameters

Name Description
key_id
Required
str

The key ID.

attributes
<xref:azure.keyvault.keys._generated.models.KeyAttributes>

The key attributes.

default value: None

Keyword-Only Parameters

Name Description
managed

Whether the key's lifetime is managed by Key Vault.

tags
dict[str, str] or None

Application specific metadata in the form of key-value pairs.

release_policy

The azure.keyvault.keys.KeyReleasePolicy specifying the rules under which the key can be exported.

Attributes

created_on

When the key was created, in UTC.

Returns

Type Description

When the key was created, in UTC.

enabled

Whether the key is enabled for use.

Returns

Type Description
bool,

True if the key is enabled for use; False otherwise.

expires_on

When the key will expire, in UTC.

Returns

Type Description

When the key will expire, in UTC.

exportable

Whether the private key can be exported.

Returns

Type Description
bool,

True if the private key can be exported; False otherwise.

hsm_platform

The underlying HSM platform.

Returns

Type Description
str,

The underlying HSM platform.

id

The key ID.

Returns

Type Description
str

The key ID.

managed

Whether the key's lifetime is managed by Key Vault. If the key backs a certificate, this will be true.

Returns

Type Description
bool,

True if the key's lifetime is managed by Key Vault; False otherwise.

name

The key name.

Returns

Type Description
str

The key name.

not_before

The time before which the key can not be used, in UTC.

Returns

Type Description

The time before which the key can not be used, in UTC.

recoverable_days

The number of days the key is retained before being deleted from a soft-delete enabled Key Vault.

Returns

Type Description
int,

The number of days the key is retained before being deleted from a soft-delete enabled Key Vault.

recovery_level

The vault's deletion recovery level for keys.

Returns

Type Description
str,

The vault's deletion recovery level for keys.

release_policy

The KeyReleasePolicy specifying the rules under which the key can be exported.

Returns

Type Description

The key's release policy specifying the rules for exporting.

tags

Application specific metadata in the form of key-value pairs.

Returns

Type Description

A dictionary of tags attached to the key.

updated_on

When the key was last updated, in UTC.

Returns

Type Description

When the key was last updated, in UTC.

vault_url

URL of the vault containing the key.

Returns

Type Description
str

URL of the vault containing the key.

version

The key version.

Returns

Type Description
str,

The key version.