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

The following fields are returned by SELECT queries:

Successfully retrieved the specified managed instance key.

NameDatatypeDescription
kindstringKind of encryption protector. This is metadata used for the Azure portal experience.
propertiesobjectResource properties.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, managedInstanceName, keyName, subscriptionIdGets a managed instance key.
create_or_updateinsertresourceGroupName, managedInstanceName, keyName, subscriptionIdCreates or updates a managed instance key.
deletedeleteresourceGroupName, managedInstanceName, keyName, subscriptionIdDeletes the managed instance key with the given name.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
keyNamestringThe name of the managed instance key to be deleted.
managedInstanceNamestringThe name of the managed instance.
resourceGroupNamestringThe name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
subscriptionIdstringThe subscription ID that identifies an Azure subscription.

SELECT examples

Gets a managed instance key.

SELECT
kind,
properties
FROM azure.sql.managed_instance_keys
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND managedInstanceName = '{{ managedInstanceName }}' -- required
AND keyName = '{{ keyName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Creates or updates a managed instance key.

INSERT INTO azure.sql.managed_instance_keys (
data__properties,
resourceGroupName,
managedInstanceName,
keyName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ managedInstanceName }}',
'{{ keyName }}',
'{{ subscriptionId }}'
RETURNING
kind,
properties
;

DELETE examples

Deletes the managed instance key with the given name.

DELETE FROM azure.sql.managed_instance_keys
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND managedInstanceName = '{{ managedInstanceName }}' --required
AND keyName = '{{ keyName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;