keys
Creates, updates, deletes, gets or lists a keys
resource.
Overview
Name | keys |
Type | Resource |
Id | azure.key_vault.keys |
Fields
- vw_keys
- keys
Name | Datatype | Description |
---|---|---|
id | text | Fully qualified identifier of the key vault resource. |
name | text | Name of the key vault 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 |
location | text | Azure location of the key vault resource. |
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 | Tags assigned to the key vault resource. |
type | text | Resource type of the key vault resource. |
vaultName | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified identifier of the key vault resource. |
name | string | Name of the key vault resource. |
location | string | Azure location of the key vault resource. |
properties | object | The properties of the key. |
tags | object | Tags assigned to the key vault resource. |
type | string | Resource type of the key vault resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | keyName, resourceGroupName, subscriptionId, vaultName | Gets the current version of the specified key from the specified key vault. |
list | SELECT | resourceGroupName, subscriptionId, vaultName | Lists the keys in the specified key vault. |
create_if_not_exist | INSERT | keyName, resourceGroupName, subscriptionId, vaultName, 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 key vault.
- vw_keys
- keys
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 }}';
SELECT
id,
name,
location,
properties,
tags,
type
FROM azure.key_vault.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.key_vault.keys (
keyName,
resourceGroupName,
subscriptionId,
vaultName,
data__properties,
tags,
properties
)
SELECT
'{{ keyName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ vaultName }}',
'{{ 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