managed_instance_keys
Creates, updates, deletes, gets or lists a managed_instance_keys
resource.
Overview
Name | managed_instance_keys |
Type | Resource |
Id | azure.sql.managed_instance_keys |
Fields
- vw_managed_instance_keys
- managed_instance_keys
Name | Datatype | Description |
---|---|---|
auto_rotation_enabled | text | field from the properties object |
creation_date | text | field from the properties object |
keyName | text | field from the properties object |
kind | text | Kind of encryption protector. This is metadata used for the Azure portal experience. |
managedInstanceName | text | field from the properties object |
resourceGroupName | text | field from the properties object |
server_key_type | text | field from the properties object |
subscriptionId | text | field from the properties object |
thumbprint | text | field from the properties object |
uri | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
kind | string | Kind of encryption protector. This is metadata used for the Azure portal experience. |
properties | object | Properties for a key execution. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | keyName, managedInstanceName, resourceGroupName, subscriptionId | Gets a managed instance key. |
create_or_update | INSERT | keyName, managedInstanceName, resourceGroupName, subscriptionId | Creates or updates a managed instance key. |
delete | DELETE | keyName, managedInstanceName, resourceGroupName, subscriptionId | Deletes the managed instance key with the given name. |
SELECT
examples
Gets a managed instance key.
- vw_managed_instance_keys
- managed_instance_keys
SELECT
auto_rotation_enabled,
creation_date,
keyName,
kind,
managedInstanceName,
resourceGroupName,
server_key_type,
subscriptionId,
thumbprint,
uri
FROM azure.sql.vw_managed_instance_keys
WHERE keyName = '{{ keyName }}'
AND managedInstanceName = '{{ managedInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
kind,
properties
FROM azure.sql.managed_instance_keys
WHERE keyName = '{{ keyName }}'
AND managedInstanceName = '{{ managedInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new managed_instance_keys
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql.managed_instance_keys (
keyName,
managedInstanceName,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ keyName }}',
'{{ managedInstanceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: kind
value: string
- name: properties
value:
- name: serverKeyType
value: string
- name: uri
value: string
- name: thumbprint
value: string
- name: creationDate
value: string
- name: autoRotationEnabled
value: boolean
DELETE
example
Deletes the specified managed_instance_keys
resource.
/*+ delete */
DELETE FROM azure.sql.managed_instance_keys
WHERE keyName = '{{ keyName }}'
AND managedInstanceName = '{{ managedInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';