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:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
autoRotationEnabledbooleanKey auto rotation opt-in flag. Either true or false.
keyVersionstringThe version of the server key being used as encryption protector.
kindstringKind of encryption protector. This is metadata used for the Azure portal experience.
locationstringResource location.
serverKeyNamestringThe name of the server key.
serverKeyTypestringThe encryption protector type like 'ServiceManaged', 'AzureKeyVault'. Required. Known values are: "ServiceManaged" and "AzureKeyVault". (ServiceManaged, AzureKeyVault)
subregionstringSubregion of the encryption protector.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
thumbprintstringThumbprint of the server key.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
uristringThe URI of the server key.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, server_name, encryption_protector_name, subscription_idGets a server encryption protector.
list_by_serverselectresource_group_name, server_name, subscription_idGets a list of server encryption protectors.
create_or_updateinsertresource_group_name, server_name, encryption_protector_name, subscription_idUpdates an existing encryption protector.
create_or_updatereplaceresource_group_name, server_name, encryption_protector_name, subscription_idUpdates an existing encryption protector.
revalidateexecresource_group_name, server_name, encryption_protector_name, subscription_idRevalidates 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
encryption_protector_namestringThe name of the encryption protector to be retrieved. "current" Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
server_namestringThe name of the server. Required.
subscription_idstring

SELECT examples

Gets a server encryption protector.

SELECT
id,
name,
autoRotationEnabled,
keyVersion,
kind,
location,
serverKeyName,
serverKeyType,
subregion,
systemData,
thumbprint,
type,
uri
FROM azure.sql.encryption_protectors
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND encryption_protector_name = '{{ encryption_protector_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Updates an existing encryption protector.

INSERT INTO azure.sql.encryption_protectors (
properties,
resource_group_name,
server_name,
encryption_protector_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ server_name }}',
'{{ encryption_protector_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
kind,
location,
properties,
systemData,
type
;

REPLACE examples

Updates an existing encryption protector.

REPLACE azure.sql.encryption_protectors
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND server_name = '{{ server_name }}' --required
AND encryption_protector_name = '{{ encryption_protector_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
kind,
location,
properties,
systemData,
type;

Lifecycle Methods

Revalidates an existing encryption protector.

EXEC azure.sql.encryption_protectors.revalidate 
@resource_group_name='{{ resource_group_name }}' --required,
@server_name='{{ server_name }}' --required,
@encryption_protector_name='{{ encryption_protector_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;