sql_servers
Creates, updates, deletes, gets or lists a sql_servers
resource.
Overview
Name | sql_servers |
Type | Resource |
Id | azure.azure_data.sql_servers |
Fields
- vw_sql_servers
- sql_servers
Name | Datatype | Description |
---|---|---|
cores | text | field from the properties object |
edition | text | field from the properties object |
property_bag | text | field from the properties object |
registration_id | text | field from the properties object |
resourceGroupName | text | field from the properties object |
sqlServerName | text | field from the properties object |
sqlServerRegistrationName | text | field from the properties object |
subscriptionId | text | field from the properties object |
version | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | The SQL server properties. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, sqlServerName, sqlServerRegistrationName, subscriptionId | Gets a SQL Server. |
list_by_resource_group | SELECT | resourceGroupName, sqlServerRegistrationName, subscriptionId | Gets all SQL Servers in a SQL Server Registration. |
create_or_update | INSERT | resourceGroupName, sqlServerName, sqlServerRegistrationName, subscriptionId | Creates or updates a SQL Server. |
delete | DELETE | resourceGroupName, sqlServerName, sqlServerRegistrationName, subscriptionId | Deletes a SQL Server. |
SELECT
examples
Gets all SQL Servers in a SQL Server Registration.
- vw_sql_servers
- sql_servers
SELECT
cores,
edition,
property_bag,
registration_id,
resourceGroupName,
sqlServerName,
sqlServerRegistrationName,
subscriptionId,
version
FROM azure.azure_data.vw_sql_servers
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND sqlServerRegistrationName = '{{ sqlServerRegistrationName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.azure_data.sql_servers
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND sqlServerRegistrationName = '{{ sqlServerRegistrationName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new sql_servers
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.azure_data.sql_servers (
resourceGroupName,
sqlServerName,
sqlServerRegistrationName,
subscriptionId,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ sqlServerName }}',
'{{ sqlServerRegistrationName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: cores
value: integer
- name: version
value: string
- name: edition
value: string
- name: registrationID
value: string
- name: propertyBag
value: string
DELETE
example
Deletes the specified sql_servers
resource.
/*+ delete */
DELETE FROM azure.azure_data.sql_servers
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND sqlServerName = '{{ sqlServerName }}'
AND sqlServerRegistrationName = '{{ sqlServerRegistrationName }}'
AND subscriptionId = '{{ subscriptionId }}';