sql_server_instances
Creates, updates, deletes, gets or lists a sql_server_instances
resource.
Overview
Name | sql_server_instances |
Type | Resource |
Id | azure.azure_arc_data.sql_server_instances |
Fields
- vw_sql_server_instances
- sql_server_instances
Name | Datatype | Description |
---|---|---|
always_on_role | text | field from the properties object |
azure_defender_status | text | field from the properties object |
azure_defender_status_last_updated | text | field from the properties object |
backup_policy | text | field from the properties object |
collation | text | field from the properties object |
container_resource_id | text | field from the properties object |
cores | text | field from the properties object |
create_time | text | field from the properties object |
current_version | text | field from the properties object |
edition | text | field from the properties object |
failover_cluster | text | field from the properties object |
host_type | text | field from the properties object |
instance_name | text | field from the properties object |
last_inventory_upload_time | text | field from the properties object |
last_usage_upload_time | text | field from the properties object |
license_type | text | field from the properties object |
location | text | The geo-location where the resource lives |
monitoring | text | field from the properties object |
patch_level | text | field from the properties object |
product_id | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
sqlServerInstanceName | text | field from the properties object |
status | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags. |
tcp_dynamic_ports | text | field from the properties object |
tcp_static_ports | text | field from the properties object |
upgrade_locked_until | text | field from the properties object |
v_core | text | field from the properties object |
version | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
location | string | The geo-location where the resource lives |
properties | object | Properties of SqlServerInstance. |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, sqlServerInstanceName, subscriptionId | Retrieves a SQL Server Instance resource |
list | SELECT | subscriptionId | |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | Gets all sqlServerInstances in a resource group. |
create | INSERT | resourceGroupName, sqlServerInstanceName, subscriptionId | Creates or replaces a SQL Server Instance resource |
delete | DELETE | resourceGroupName, sqlServerInstanceName, subscriptionId | Deletes a SQL Server Instance resource |
update | UPDATE | resourceGroupName, sqlServerInstanceName, subscriptionId | Updates a SQL Server Instance resource |
SELECT
examples
- vw_sql_server_instances
- sql_server_instances
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 }}';
SELECT
location,
properties,
tags
FROM azure.azure_arc_data.sql_server_instances
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new sql_server_instances
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.azure_arc_data.sql_server_instances (
resourceGroupName,
sqlServerInstanceName,
subscriptionId,
tags,
location,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ sqlServerInstanceName }}',
'{{ subscriptionId }}',
'{{ tags }}',
'{{ location }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: tags
value: object
- name: location
value: string
- name: properties
value:
- name: version
value: string
- name: edition
value: string
- name: containerResourceId
value: string
- name: createTime
value: string
- name: vCore
value: string
- name: cores
value: string
- name: status
value: string
- name: patchLevel
value: string
- name: collation
value: string
- name: currentVersion
value: string
- name: instanceName
value: string
- name: tcpDynamicPorts
value: string
- name: tcpStaticPorts
value: string
- name: productId
value: string
- name: licenseType
value: string
- name: azureDefenderStatusLastUpdated
value: string
- name: azureDefenderStatus
value: string
- name: provisioningState
value: string
- name: lastInventoryUploadTime
value: string
- name: lastUsageUploadTime
value: string
- name: hostType
value: string
- name: alwaysOnRole
value: string
- name: failoverCluster
value:
- name: id
value: string
- name: networkName
value: string
- name: sqlInstanceIds
value:
- string
- name: hostNames
value:
- string
- name: backupPolicy
value:
- name: retentionPeriodDays
value: integer
- name: fullBackupDays
value: integer
- name: differentialBackupHours
value: integer
- name: transactionLogBackupMinutes
value: integer
- name: upgradeLockedUntil
value: string
- name: monitoring
value:
- name: enabled
value: boolean
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 }}';