Skip to main content

vaults

Creates, updates, deletes, gets or lists a vaults resource.

Overview

Namevaults
TypeResource
Idazure.key_vault.vaults

Fields

The following fields are returned by SELECT queries:

Retrieved vault

NameDatatypeDescription
idstringFully qualified identifier of the key vault resource.
namestringName of the key vault resource.
locationstringAzure location of the key vault resource.
propertiesobjectProperties of the vault
systemDataobjectSystem metadata for the key vault.
tagsobjectTags assigned to the key vault resource.
typestringResource type of the key vault resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, vaultName, subscriptionIdGets the specified Azure key vault.
list_by_resource_groupselectresourceGroupName, subscriptionId$topThe List operation gets information about the vaults associated with the subscription and within the specified resource group.
list_by_subscriptionselectsubscriptionId$topThe List operation gets information about the vaults associated with the subscription.
create_or_updateinsertresourceGroupName, vaultName, subscriptionId, data__location, data__propertiesCreate or update a key vault in the specified subscription.
updateupdateresourceGroupName, vaultName, subscriptionIdUpdate a key vault in the specified subscription.
deletedeleteresourceGroupName, vaultName, subscriptionIdDeletes the specified Azure key vault.
purge_deletedexecvaultName, location, subscriptionIdPermanently deletes the specified vault. aka Purges the deleted Azure key vault.
listexec$filter, subscriptionId$top, api-versionThe List operation gets information about the vaults associated with the subscription.
check_name_availabilityexecsubscriptionId, name, typeChecks that the vault name is valid and is not already in use.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
$filterstringThe filter to apply on the operation.
locationstringThe location of the soft-deleted vault.
resourceGroupNamestringThe name of the Resource Group to which the vault belongs.
subscriptionIdstringSubscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
vaultNamestringThe name of the soft-deleted vault.
$topinteger (int32)Maximum number of results to return.
api-versionstringAzure Resource Manager Api Version.

SELECT examples

Gets the specified Azure key vault.

SELECT
id,
name,
location,
properties,
systemData,
tags,
type
FROM azure.key_vault.vaults
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND vaultName = '{{ vaultName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Create or update a key vault in the specified subscription.

INSERT INTO azure.key_vault.vaults (
data__location,
data__tags,
data__properties,
resourceGroupName,
vaultName,
subscriptionId
)
SELECT
'{{ location }}' /* required */,
'{{ tags }}',
'{{ properties }}' /* required */,
'{{ resourceGroupName }}',
'{{ vaultName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Update a key vault in the specified subscription.

UPDATE azure.key_vault.vaults
SET
data__tags = '{{ tags }}',
data__properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND vaultName = '{{ vaultName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

DELETE examples

Deletes the specified Azure key vault.

DELETE FROM azure.key_vault.vaults
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND vaultName = '{{ vaultName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;

Lifecycle Methods

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

EXEC azure.key_vault.vaults.purge_deleted 
@vaultName='{{ vaultName }}' --required,
@location='{{ location }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;