Skip to main content

managed_hsm_keys

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

Overview

Namemanaged_hsm_keys
TypeResource
Idazure.key_vault.managed_hsm_keys

Fields

NameDatatypeDescription
idtextFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
nametextThe name of the 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
release_policytextfield from the properties object
resourceGroupNametextfield from the properties object
rotation_policytextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
typetextThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

NameAccessible byRequired ParamsDescription
getSELECTkeyName, name, resourceGroupName, subscriptionIdGets the current version of the specified key from the specified managed HSM.
listSELECTname, resourceGroupName, subscriptionIdLists the keys in the specified managed HSM.
create_if_not_existINSERTkeyName, name, resourceGroupName, subscriptionId, 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 managed HSM.

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

INSERT example

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

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