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
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
azureDefenderStatus | string | Status of Azure Defender. Known values are: "Protected", "Unprotected", and "Unknown". |
azureDefenderStatusLastUpdated | string (date-time) | Timestamp of last Azure Defender status update. |
collation | string | SQL Server collation. |
containerResourceId | string | ARM Resource id of the container resource (Azure Arc for Servers). Required. |
createTime | string | The time when the resource was created. |
currentVersion | string | SQL Server current version. |
edition | string | SQL Server edition. Known values are: "Evaluation", "Enterprise", "Standard", "Web", "Developer", and "Express". |
hostType | string | Type of host for Azure Arc SQL Server. Known values are: "Azure Virtual Machine", "Azure VMWare Virtual Machine", "Azure Kubernetes Service", "AWS VMWare Virtual Machine", "AWS Kubernetes Service", "GCP VMWare Virtual Machine", "GCP Kubernetes Service", "Container", "Virtual Machine", "Physical Server", "AWS Virtual Machine", "GCP Virtual Machine", and "Other". |
instanceName | string | SQL Server instance name. |
licenseType | string | SQL Server license type. Known values are: "Undefined", "Free", "HADR", "ServerCAL", "LicenseOnly", "PAYG", and "Paid". |
location | string | The geo-location where the resource lives. Required. |
patchLevel | string | SQL Server update level. |
productId | string | SQL Server product ID. |
provisioningState | string | The provisioning state of the Arc-enabled SQL Server resource. |
status | string | The cloud connectivity status. Required. Known values are: "Connected", "Disconnected", "Registered", and "Unknown". |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
tcpDynamicPorts | string | Dynamic TCP ports used by SQL Server. |
tcpStaticPorts | string | Static TCP ports used by SQL Server. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
vCore | string | The number of logical processors used by the SQL Server instance. |
version | string | SQL Server version. Known values are: "SQL Server 2012", "SQL Server 2014", "SQL Server 2016", "SQL Server 2017", "SQL Server 2019", "SQL Server 2022", and "Unknown". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
azureDefenderStatus | string | Status of Azure Defender. Known values are: "Protected", "Unprotected", and "Unknown". |
azureDefenderStatusLastUpdated | string (date-time) | Timestamp of last Azure Defender status update. |
collation | string | SQL Server collation. |
containerResourceId | string | ARM Resource id of the container resource (Azure Arc for Servers). Required. |
createTime | string | The time when the resource was created. |
currentVersion | string | SQL Server current version. |
edition | string | SQL Server edition. Known values are: "Evaluation", "Enterprise", "Standard", "Web", "Developer", and "Express". |
hostType | string | Type of host for Azure Arc SQL Server. Known values are: "Azure Virtual Machine", "Azure VMWare Virtual Machine", "Azure Kubernetes Service", "AWS VMWare Virtual Machine", "AWS Kubernetes Service", "GCP VMWare Virtual Machine", "GCP Kubernetes Service", "Container", "Virtual Machine", "Physical Server", "AWS Virtual Machine", "GCP Virtual Machine", and "Other". |
instanceName | string | SQL Server instance name. |
licenseType | string | SQL Server license type. Known values are: "Undefined", "Free", "HADR", "ServerCAL", "LicenseOnly", "PAYG", and "Paid". |
location | string | The geo-location where the resource lives. Required. |
patchLevel | string | SQL Server update level. |
productId | string | SQL Server product ID. |
provisioningState | string | The provisioning state of the Arc-enabled SQL Server resource. |
status | string | The cloud connectivity status. Required. Known values are: "Connected", "Disconnected", "Registered", and "Unknown". |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
tcpDynamicPorts | string | Dynamic TCP ports used by SQL Server. |
tcpStaticPorts | string | Static TCP ports used by SQL Server. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
vCore | string | The number of logical processors used by the SQL Server instance. |
version | string | SQL Server version. Known values are: "SQL Server 2012", "SQL Server 2014", "SQL Server 2016", "SQL Server 2017", "SQL Server 2019", "SQL Server 2022", and "Unknown". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
azureDefenderStatus | string | Status of Azure Defender. Known values are: "Protected", "Unprotected", and "Unknown". |
azureDefenderStatusLastUpdated | string (date-time) | Timestamp of last Azure Defender status update. |
collation | string | SQL Server collation. |
containerResourceId | string | ARM Resource id of the container resource (Azure Arc for Servers). Required. |
createTime | string | The time when the resource was created. |
currentVersion | string | SQL Server current version. |
edition | string | SQL Server edition. Known values are: "Evaluation", "Enterprise", "Standard", "Web", "Developer", and "Express". |
hostType | string | Type of host for Azure Arc SQL Server. Known values are: "Azure Virtual Machine", "Azure VMWare Virtual Machine", "Azure Kubernetes Service", "AWS VMWare Virtual Machine", "AWS Kubernetes Service", "GCP VMWare Virtual Machine", "GCP Kubernetes Service", "Container", "Virtual Machine", "Physical Server", "AWS Virtual Machine", "GCP Virtual Machine", and "Other". |
instanceName | string | SQL Server instance name. |
licenseType | string | SQL Server license type. Known values are: "Undefined", "Free", "HADR", "ServerCAL", "LicenseOnly", "PAYG", and "Paid". |
location | string | The geo-location where the resource lives. Required. |
patchLevel | string | SQL Server update level. |
productId | string | SQL Server product ID. |
provisioningState | string | The provisioning state of the Arc-enabled SQL Server resource. |
status | string | The cloud connectivity status. Required. Known values are: "Connected", "Disconnected", "Registered", and "Unknown". |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
tcpDynamicPorts | string | Dynamic TCP ports used by SQL Server. |
tcpStaticPorts | string | Static TCP ports used by SQL Server. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
vCore | string | The number of logical processors used by the SQL Server instance. |
version | string | SQL Server version. Known values are: "SQL Server 2012", "SQL Server 2014", "SQL Server 2016", "SQL Server 2017", "SQL Server 2019", "SQL Server 2022", and "Unknown". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, sql_server_instance_name, subscription_id | Retrieves a SQL Server Instance resource. | |
list_by_resource_group | select | resource_group_name, subscription_id | List sqlServerInstance resources in the resource group. Gets all sqlServerInstances in a resource group. | |
list | select | subscription_id | List sqlServerInstance resources in the subscription. List sqlServerInstance resources in the subscription. | |
create | insert | resource_group_name, sql_server_instance_name, subscription_id, location | Creates or replaces a SQL Server Instance resource. | |
update | update | resource_group_name, sql_server_instance_name, subscription_id | Updates a SQL Server Instance resource. | |
delete | delete | resource_group_name, sql_server_instance_name, subscription_id | Deletes a SQL Server Instance resource. |
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.
| Name | Datatype | Description |
|---|---|---|
resource_group_name | string | The name of the Azure resource group. Required. |
sql_server_instance_name | string | Name of SQL Server Instance. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_resource_group
- list
Retrieves a SQL Server Instance resource.
SELECT
id,
name,
azureDefenderStatus,
azureDefenderStatusLastUpdated,
collation,
containerResourceId,
createTime,
currentVersion,
edition,
hostType,
instanceName,
licenseType,
location,
patchLevel,
productId,
provisioningState,
status,
systemData,
tags,
tcpDynamicPorts,
tcpStaticPorts,
type,
vCore,
version
FROM azure.azure_arc_data.sql_server_instances
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND sql_server_instance_name = '{{ sql_server_instance_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List sqlServerInstance resources in the resource group. Gets all sqlServerInstances in a resource group.
SELECT
id,
name,
azureDefenderStatus,
azureDefenderStatusLastUpdated,
collation,
containerResourceId,
createTime,
currentVersion,
edition,
hostType,
instanceName,
licenseType,
location,
patchLevel,
productId,
provisioningState,
status,
systemData,
tags,
tcpDynamicPorts,
tcpStaticPorts,
type,
vCore,
version
FROM azure.azure_arc_data.sql_server_instances
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List sqlServerInstance resources in the subscription. List sqlServerInstance resources in the subscription.
SELECT
id,
name,
azureDefenderStatus,
azureDefenderStatusLastUpdated,
collation,
containerResourceId,
createTime,
currentVersion,
edition,
hostType,
instanceName,
licenseType,
location,
patchLevel,
productId,
provisioningState,
status,
systemData,
tags,
tcpDynamicPorts,
tcpStaticPorts,
type,
vCore,
version
FROM azure.azure_arc_data.sql_server_instances
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
Creates or replaces a SQL Server Instance resource.
INSERT INTO azure.azure_arc_data.sql_server_instances (
tags,
location,
properties,
resource_group_name,
sql_server_instance_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ resource_group_name }}',
'{{ sql_server_instance_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: sql_server_instances
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the sql_server_instances resource.
- name: sql_server_instance_name
value: "{{ sql_server_instance_name }}"
description: Required parameter for the sql_server_instances resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the sql_server_instances resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
description: |
null.
value:
version: "{{ version }}"
edition: "{{ edition }}"
containerResourceId: "{{ containerResourceId }}"
createTime: "{{ createTime }}"
vCore: "{{ vCore }}"
status: "{{ status }}"
patchLevel: "{{ patchLevel }}"
collation: "{{ collation }}"
currentVersion: "{{ currentVersion }}"
instanceName: "{{ instanceName }}"
tcpDynamicPorts: "{{ tcpDynamicPorts }}"
tcpStaticPorts: "{{ tcpStaticPorts }}"
productId: "{{ productId }}"
licenseType: "{{ licenseType }}"
azureDefenderStatusLastUpdated: "{{ azureDefenderStatusLastUpdated }}"
azureDefenderStatus: "{{ azureDefenderStatus }}"
provisioningState: "{{ provisioningState }}"
hostType: "{{ hostType }}"
UPDATE examples
- update
Updates a SQL Server Instance resource.
UPDATE azure.azure_arc_data.sql_server_instances
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND sql_server_instance_name = '{{ sql_server_instance_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Deletes a SQL Server Instance resource.
DELETE FROM azure.azure_arc_data.sql_server_instances
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND sql_server_instance_name = '{{ sql_server_instance_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;