managed_hsm_keys
Creates, updates, deletes, gets or lists a managed_hsm_keys
resource.
Overview
Name | managed_hsm_keys |
Type | Resource |
Id | azure.key_vault.managed_hsm_keys |
Fields
- vw_managed_hsm_keys
- managed_hsm_keys
Name | Datatype | Description |
---|---|---|
id | text | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | text | The name of the resource |
attributes | text | field from the properties object |
curve_name | text | field from the properties object |
keyName | text | field from the properties object |
key_ops | text | field from the properties object |
key_size | text | field from the properties object |
key_uri | text | field from the properties object |
key_uri_with_version | text | field from the properties object |
kty | text | field from the properties object |
release_policy | text | field from the properties object |
resourceGroupName | text | field from the properties object |
rotation_policy | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags. |
type | text | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | string | The name of the resource |
properties | object | The properties of the key. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | keyName, name, resourceGroupName, subscriptionId | Gets the current version of the specified key from the specified managed HSM. |
list | SELECT | name, resourceGroupName, subscriptionId | Lists the keys in the specified managed HSM. |
create_if_not_exist | INSERT | keyName, name, resourceGroupName, subscriptionId, data__properties | Creates 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.
- vw_managed_hsm_keys
- managed_hsm_keys
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 }}';
SELECT
id,
name,
properties,
tags,
type
FROM azure.key_vault.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.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: tags
value: object
- name: properties
value:
- name: attributes
value:
- name: enabled
value: boolean
- name: nbf
value: integer
- name: exp
value: integer
- name: created
value: integer
- name: updated
value: integer
- name: recoveryLevel
value: string
- name: exportable
value: boolean
- name: kty
value: string
- name: keyOps
value:
- string
- name: keySize
value: integer
- name: curveName
value: string
- name: keyUri
value: string
- name: keyUriWithVersion
value: string
- name: rotationPolicy
value:
- name: attributes
value:
- name: created
value: integer
- name: updated
value: integer
- name: expiryTime
value: string
- name: lifetimeActions
value:
- - name: trigger
value:
- name: timeAfterCreate
value: string
- name: timeBeforeExpiry
value: string
- name: action
value:
- name: type
value: string
- name: release_policy
value:
- name: contentType
value: string
- name: data
value: string