Skip to main content

keys

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

Overview

Namekeys
TypeResource
Idazure.key_vault.keys

Fields

NameDatatypeDescription
idtextFully qualified identifier of the key vault resource.
nametextName of the key vault resource.
attributestextfield from the properties object
curve_nametextfield from the properties object
keyNametextfield from the properties object
key_opstextfield from the properties object
key_sizetextfield from the properties object
key_uritextfield from the properties object
key_uri_with_versiontextfield from the properties object
ktytextfield from the properties object
locationtextAzure location of the key vault resource.
release_policytextfield from the properties object
resourceGroupNametextfield from the properties object
rotation_policytextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextTags assigned to the key vault resource.
typetextResource type of the key vault resource.
vaultNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTkeyName, resourceGroupName, subscriptionId, vaultNameGets the current version of the specified key from the specified key vault.
listSELECTresourceGroupName, subscriptionId, vaultNameLists the keys in the specified key vault.
create_if_not_existINSERTkeyName, resourceGroupName, subscriptionId, vaultName, data__propertiesCreates 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.

SELECT examples

Lists the keys in the specified key vault.

SELECT
id,
name,
attributes,
curve_name,
keyName,
key_ops,
key_size,
key_uri,
key_uri_with_version,
kty,
location,
release_policy,
resourceGroupName,
rotation_policy,
subscriptionId,
tags,
type,
vaultName
FROM azure.key_vault.vw_keys
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND vaultName = '{{ vaultName }}';

INSERT example

Use the following StackQL query and manifest file to create a new keys resource.

/*+ create */
INSERT INTO azure.key_vault.keys (
keyName,
resourceGroupName,
subscriptionId,
vaultName,
data__properties,
tags,
properties
)
SELECT
'{{ keyName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ vaultName }}',
'{{ data__properties }}',
'{{ tags }}',
'{{ properties }}'
;