Skip to main content

managed_instance_keys

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

Overview

Namemanaged_instance_keys
TypeResource
Idazure.sql.managed_instance_keys

Fields

NameDatatypeDescription
auto_rotation_enabledtextfield from the properties object
creation_datetextfield from the properties object
keyNametextfield from the properties object
kindtextKind of encryption protector. This is metadata used for the Azure portal experience.
managedInstanceNametextfield from the properties object
resourceGroupNametextfield from the properties object
server_key_typetextfield from the properties object
subscriptionIdtextfield from the properties object
thumbprinttextfield from the properties object
uritextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTkeyName, managedInstanceName, resourceGroupName, subscriptionIdGets a managed instance key.
create_or_updateINSERTkeyName, managedInstanceName, resourceGroupName, subscriptionIdCreates or updates a managed instance key.
deleteDELETEkeyName, managedInstanceName, resourceGroupName, subscriptionIdDeletes the managed instance key with the given name.

SELECT examples

Gets a managed instance key.

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 }}';

INSERT example

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

/*+ create */
INSERT INTO azure.sql.managed_instance_keys (
keyName,
managedInstanceName,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ keyName }}',
'{{ managedInstanceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

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 }}';