Skip to main content

sql_server_registrations

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

Overview

Namesql_server_registrations
TypeResource
Idazure.azure_data.sql_server_registrations

Fields

NameDatatypeDescription
locationtextThe geo-location where the resource lives
property_bagtextfield from the properties object
resourceGroupNametextfield from the properties object
resource_grouptextfield from the properties object
sqlServerRegistrationNametextfield from the properties object
subscriptionIdtextfield from the properties object
subscription_idtextfield from the properties object
system_datatextfield from the properties object
tagstextResource tags.

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, sqlServerRegistrationName, subscriptionIdGets a SQL Server registration.
listSELECTsubscriptionIdGets all SQL Server registrations in a subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdGets all SQL Server registrations in a resource group.
create_or_updateINSERTresourceGroupName, sqlServerRegistrationName, subscriptionId, data__locationCreates or updates a SQL Server registration.
deleteDELETEresourceGroupName, sqlServerRegistrationName, subscriptionIdDeletes a SQL Server registration.
updateUPDATEresourceGroupName, sqlServerRegistrationName, subscriptionIdUpdates SQL Server Registration tags.

SELECT examples

Gets all SQL Server registrations in a subscription.

SELECT
location,
property_bag,
resourceGroupName,
resource_group,
sqlServerRegistrationName,
subscriptionId,
subscription_id,
system_data,
tags
FROM azure.azure_data.vw_sql_server_registrations
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.azure_data.sql_server_registrations (
resourceGroupName,
sqlServerRegistrationName,
subscriptionId,
data__location,
tags,
location,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ sqlServerRegistrationName }}',
'{{ subscriptionId }}',
'{{ data__location }}',
'{{ tags }}',
'{{ location }}',
'{{ properties }}'
;

UPDATE example

Updates a sql_server_registrations resource.

/*+ update */
UPDATE azure.azure_data.sql_server_registrations
SET
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND sqlServerRegistrationName = '{{ sqlServerRegistrationName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified sql_server_registrations resource.

/*+ delete */
DELETE FROM azure.azure_data.sql_server_registrations
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND sqlServerRegistrationName = '{{ sqlServerRegistrationName }}'
AND subscriptionId = '{{ subscriptionId }}';