Skip to main content

sql_server_instances

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

Overview

Namesql_server_instances
TypeResource
Idazure.azure_arc_data.sql_server_instances

Fields

NameDatatypeDescription
always_on_roletextfield from the properties object
azure_defender_statustextfield from the properties object
azure_defender_status_last_updatedtextfield from the properties object
backup_policytextfield from the properties object
collationtextfield from the properties object
container_resource_idtextfield from the properties object
corestextfield from the properties object
create_timetextfield from the properties object
current_versiontextfield from the properties object
editiontextfield from the properties object
failover_clustertextfield from the properties object
host_typetextfield from the properties object
instance_nametextfield from the properties object
last_inventory_upload_timetextfield from the properties object
last_usage_upload_timetextfield from the properties object
license_typetextfield from the properties object
locationtextThe geo-location where the resource lives
monitoringtextfield from the properties object
patch_leveltextfield from the properties object
product_idtextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
sqlServerInstanceNametextfield from the properties object
statustextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
tcp_dynamic_portstextfield from the properties object
tcp_static_portstextfield from the properties object
upgrade_locked_untiltextfield from the properties object
v_coretextfield from the properties object
versiontextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, sqlServerInstanceName, subscriptionIdRetrieves a SQL Server Instance resource
listSELECTsubscriptionId
list_by_resource_groupSELECTresourceGroupName, subscriptionIdGets all sqlServerInstances in a resource group.
createINSERTresourceGroupName, sqlServerInstanceName, subscriptionIdCreates or replaces a SQL Server Instance resource
deleteDELETEresourceGroupName, sqlServerInstanceName, subscriptionIdDeletes a SQL Server Instance resource
updateUPDATEresourceGroupName, sqlServerInstanceName, subscriptionIdUpdates a SQL Server Instance resource

SELECT examples

SELECT
always_on_role,
azure_defender_status,
azure_defender_status_last_updated,
backup_policy,
collation,
container_resource_id,
cores,
create_time,
current_version,
edition,
failover_cluster,
host_type,
instance_name,
last_inventory_upload_time,
last_usage_upload_time,
license_type,
location,
monitoring,
patch_level,
product_id,
provisioning_state,
resourceGroupName,
sqlServerInstanceName,
status,
subscriptionId,
tags,
tcp_dynamic_ports,
tcp_static_ports,
upgrade_locked_until,
v_core,
version
FROM azure.azure_arc_data.vw_sql_server_instances
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.azure_arc_data.sql_server_instances (
resourceGroupName,
sqlServerInstanceName,
subscriptionId,
tags,
location,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ sqlServerInstanceName }}',
'{{ subscriptionId }}',
'{{ tags }}',
'{{ location }}',
'{{ properties }}'
;

UPDATE example

Updates a sql_server_instances resource.

/*+ update */
UPDATE azure.azure_arc_data.sql_server_instances
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND sqlServerInstanceName = '{{ sqlServerInstanceName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified sql_server_instances resource.

/*+ delete */
DELETE FROM azure.azure_arc_data.sql_server_instances
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND sqlServerInstanceName = '{{ sqlServerInstanceName }}'
AND subscriptionId = '{{ subscriptionId }}';