Skip to main content

encryption_protectors

Creates, updates, deletes, gets or lists an encryption_protectors resource.

Overview

Nameencryption_protectors
TypeResource
Idazure.sql.encryption_protectors

Fields

The following fields are returned by SELECT queries:

Successfully retrieved the specified server encryption protector.

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

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, serverName, encryptionProtectorName, subscriptionIdGets a server encryption protector.
list_by_serverselectresourceGroupName, serverName, subscriptionIdGets a list of server encryption protectors
create_or_updateinsertresourceGroupName, serverName, encryptionProtectorName, subscriptionIdUpdates an existing encryption protector.
revalidateexecresourceGroupName, serverName, encryptionProtectorName, subscriptionIdRevalidates an existing encryption protector.

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
encryptionProtectorNamestringThe name of the encryption protector to be updated.
resourceGroupNamestringThe name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverNamestringThe name of the server.
subscriptionIdstringThe subscription ID that identifies an Azure subscription.

SELECT examples

Gets a server encryption protector.

SELECT
kind,
location,
properties
FROM azure.sql.encryption_protectors
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serverName = '{{ serverName }}' -- required
AND encryptionProtectorName = '{{ encryptionProtectorName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Updates an existing encryption protector.

INSERT INTO azure.sql.encryption_protectors (
data__properties,
resourceGroupName,
serverName,
encryptionProtectorName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ encryptionProtectorName }}',
'{{ subscriptionId }}'
RETURNING
kind,
location,
properties
;

Lifecycle Methods

Revalidates an existing encryption protector.

EXEC azure.sql.encryption_protectors.revalidate 
@resourceGroupName='{{ resourceGroupName }}' --required,
@serverName='{{ serverName }}' --required,
@encryptionProtectorName='{{ encryptionProtectorName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;