server_keys
Creates, updates, deletes, gets or lists a server_keys
resource.
Overview
Name | server_keys |
Type | Resource |
Id | azure.sql.server_keys |
Fields
- vw_server_keys
- server_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. |
location | text | Resource location. |
resourceGroupName | text | field from the properties object |
serverName | text | field from the properties object |
server_key_type | text | field from the properties object |
subregion | 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. |
location | string | Resource location. |
properties | object | Properties for a server key execution. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | keyName, resourceGroupName, serverName, subscriptionId | Gets a server key. |
list_by_server | SELECT | resourceGroupName, serverName, subscriptionId | Gets a list of server keys. |
create_or_update | INSERT | keyName, resourceGroupName, serverName, subscriptionId | Creates or updates a server key. |
delete | DELETE | keyName, resourceGroupName, serverName, subscriptionId | Deletes the server key with the given name. |
SELECT
examples
Gets a list of server keys.
- vw_server_keys
- server_keys
SELECT
auto_rotation_enabled,
creation_date,
keyName,
kind,
location,
resourceGroupName,
serverName,
server_key_type,
subregion,
subscriptionId,
thumbprint,
uri
FROM azure.sql.vw_server_keys
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
kind,
location,
properties
FROM azure.sql.server_keys
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new server_keys
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql.server_keys (
keyName,
resourceGroupName,
serverName,
subscriptionId,
properties
)
SELECT
'{{ keyName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: kind
value: string
- name: location
value: string
- name: properties
value:
- name: subregion
value: string
- 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 server_keys
resource.
/*+ delete */
DELETE FROM azure.sql.server_keys
WHERE keyName = '{{ keyName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';