Share via


VaultsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

KeyVaultManagementClient's

<xref:vaults> attribute.

Constructor

VaultsOperations(*args, **kwargs)

Methods

begin_create_or_update

Create or update a key vault in the specified subscription.

begin_purge_deleted

Permanently deletes the specified vault. aka Purges the deleted Azure key vault.

check_name_availability

Checks that the vault name is valid and is not already in use.

delete

Deletes the specified Azure key vault.

get

Gets the specified Azure key vault.

get_deleted

Gets the deleted Azure key vault.

list

The List operation gets information about the vaults associated with the subscription.

list_by_resource_group

The List operation gets information about the vaults associated with the subscription and within the specified resource group.

list_by_subscription

The List operation gets information about the vaults associated with the subscription.

list_deleted

Gets information about the deleted vaults in a subscription.

update

Update a key vault in the specified subscription.

update_access_policy

Update access policies in a key vault in the specified subscription.

begin_create_or_update

Create or update a key vault in the specified subscription.

begin_create_or_update(resource_group_name: str, vault_name: str, parameters: _models.VaultCreateOrUpdateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.Vault]

Parameters

Name Description
resource_group_name
Required
str

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

vault_name
Required
str

The name of the vault. Required.

parameters
Required

Parameters to create or update the vault. Is one of the following types: VaultCreateOrUpdateParameters, JSON, IO[bytes] Required.

Returns

Type Description

An instance of LROPoller that returns Vault. The Vault is compatible with MutableMapping

Exceptions

Type Description

begin_purge_deleted

Permanently deletes the specified vault. aka Purges the deleted Azure key vault.

begin_purge_deleted(vault_name: str, location: str, **kwargs: Any) -> LROPoller[None]

Parameters

Name Description
vault_name
Required
str

The name of the vault. Required.

location
Required
str

The name of the Azure region. Required.

Returns

Type Description

An instance of LROPoller that returns None

Exceptions

Type Description

check_name_availability

Checks that the vault name is valid and is not already in use.

check_name_availability(vault_name: _models.VaultCheckNameAvailabilityParameters, *, content_type: str = 'application/json', **kwargs: Any) -> _models.CheckNameAvailabilityResult

Parameters

Name Description
vault_name
Required

The name of the vault. Is one of the following types: VaultCheckNameAvailabilityParameters, JSON, IO[bytes] Required.

Returns

Type Description

CheckNameAvailabilityResult. The CheckNameAvailabilityResult is compatible with MutableMapping

Exceptions

Type Description

delete

Deletes the specified Azure key vault.

delete(resource_group_name: str, vault_name: str, **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

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

vault_name
Required
str

The name of the vault. Required.

Returns

Type Description

None

Exceptions

Type Description

get

Gets the specified Azure key vault.

get(resource_group_name: str, vault_name: str, **kwargs: Any) -> Vault

Parameters

Name Description
resource_group_name
Required
str

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

vault_name
Required
str

The name of the vault. Required.

Returns

Type Description

Vault. The Vault is compatible with MutableMapping

Exceptions

Type Description

get_deleted

Gets the deleted Azure key vault.

get_deleted(vault_name: str, location: str, **kwargs: Any) -> DeletedVault

Parameters

Name Description
vault_name
Required
str

The name of the vault. Required.

location
Required
str

The name of the Azure region. Required.

Returns

Type Description

DeletedVault. The DeletedVault is compatible with MutableMapping

Exceptions

Type Description

list

The List operation gets information about the vaults associated with the subscription.

list(*, top: int | None = None, **kwargs: Any) -> ItemPaged[TrackedResource]

Keyword-Only Parameters

Name Description
top
int

Maximum number of results to return. Default value is None.

Default value: None

Returns

Type Description

An iterator like instance of TrackedResource

Exceptions

Type Description

list_by_resource_group

The List operation gets information about the vaults associated with the subscription and within the specified resource group.

list_by_resource_group(resource_group_name: str, *, top: int | None = None, **kwargs: Any) -> ItemPaged[Vault]

Parameters

Name Description
resource_group_name
Required
str

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

Keyword-Only Parameters

Name Description
top
int

Maximum number of results to return. Default value is None.

Default value: None

Returns

Type Description

An iterator like instance of Vault

Exceptions

Type Description

list_by_subscription

The List operation gets information about the vaults associated with the subscription.

list_by_subscription(*, top: int | None = None, **kwargs: Any) -> ItemPaged[Vault]

Keyword-Only Parameters

Name Description
top
int

Maximum number of results to return. Default value is None.

Default value: None

Returns

Type Description

An iterator like instance of Vault

Exceptions

Type Description

list_deleted

Gets information about the deleted vaults in a subscription.

list_deleted(**kwargs: Any) -> ItemPaged[DeletedVault]

Returns

Type Description

An iterator like instance of DeletedVault

Exceptions

Type Description

update

Update a key vault in the specified subscription.

update(resource_group_name: str, vault_name: str, parameters: _models.VaultPatchParameters, *, content_type: str = 'application/json', **kwargs: Any) -> _models.Vault

Parameters

Name Description
resource_group_name
Required
str

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

vault_name
Required
str

The name of the vault. Required.

parameters
Required
VaultPatchParameters or <xref:JSON> or IO[bytes]

Parameters to patch the vault. Is one of the following types: VaultPatchParameters, JSON, IO[bytes] Required.

Returns

Type Description

Vault. The Vault is compatible with MutableMapping

Exceptions

Type Description

update_access_policy

Update access policies in a key vault in the specified subscription.

update_access_policy(resource_group_name: str, vault_name: str, operation_kind: str | _models.AccessPolicyUpdateKind, parameters: _models.VaultAccessPolicyParameters, *, content_type: str = 'application/json', **kwargs: Any) -> _models.VaultAccessPolicyParameters

Parameters

Name Description
resource_group_name
Required
str

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

vault_name
Required
str

Name of the vault. Required.

operation_kind
Required

Name of the operation. Known values are: "add", "replace", and "remove". Required.

parameters
Required
VaultAccessPolicyParameters or <xref:JSON> or IO[bytes]

Access policy to merge into the vault. Is one of the following types: VaultAccessPolicyParameters, JSON, IO[bytes] Required.

Returns

Type Description

VaultAccessPolicyParameters. The VaultAccessPolicyParameters is compatible with MutableMapping

Exceptions

Type Description