Skip to main content

servers

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

Overview

Nameservers
TypeResource
Idazure.sql.servers

Fields

NameDatatypeDescription
administrator_logintextfield from the properties object
administrator_login_passwordtextfield from the properties object
administratorstextfield from the properties object
external_governance_statustextfield from the properties object
federated_client_idtextfield from the properties object
fully_qualified_domain_nametextfield from the properties object
identitytextAzure Active Directory identity configuration for a resource.
is_ipv6_enabledtextfield from the properties object
key_idtextfield from the properties object
kindtextKind of sql server. This is metadata used for the Azure portal experience.
locationtextResource location.
minimal_tls_versiontextfield from the properties object
primary_user_assigned_identity_idtextfield from the properties object
private_endpoint_connectionstextfield from the properties object
public_network_accesstextfield from the properties object
resourceGroupNametextfield from the properties object
restrict_outbound_network_accesstextfield from the properties object
serverNametextfield from the properties object
statetextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
versiontextfield from the properties object
workspace_featuretextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, serverName, subscriptionIdGets a server.
listSELECTsubscriptionIdGets a list of all servers in the subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdGets a list of servers in a resource groups.
create_or_updateINSERTresourceGroupName, serverName, subscriptionId, data__locationCreates or updates a server.
deleteDELETEresourceGroupName, serverName, subscriptionIdDeletes a server.
updateUPDATEresourceGroupName, serverName, subscriptionIdUpdates a server.
check_name_availabilityEXECsubscriptionId, data__name, data__typeDetermines whether a resource can be created with the specified name.
import_databaseEXECresourceGroupName, serverName, subscriptionId, data__administratorLogin, data__administratorLoginPassword, data__storageKey, data__storageKeyType, data__storageUriImports a bacpac into a new database.
refresh_statusEXECresourceGroupName, serverName, subscriptionIdRefresh external governance enablement status.

SELECT examples

Gets a list of all servers in the subscription.

SELECT
administrator_login,
administrator_login_password,
administrators,
external_governance_status,
federated_client_id,
fully_qualified_domain_name,
identity,
is_ipv6_enabled,
key_id,
kind,
location,
minimal_tls_version,
primary_user_assigned_identity_id,
private_endpoint_connections,
public_network_access,
resourceGroupName,
restrict_outbound_network_access,
serverName,
state,
subscriptionId,
tags,
version,
workspace_feature
FROM azure.sql.vw_servers
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.sql.servers (
resourceGroupName,
serverName,
subscriptionId,
data__location,
location,
tags,
identity,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ data__location }}',
'{{ location }}',
'{{ tags }}',
'{{ identity }}',
'{{ properties }}'
;

UPDATE example

Updates a servers resource.

/*+ update */
UPDATE azure.sql.servers
SET
identity = '{{ identity }}',
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified servers resource.

/*+ delete */
DELETE FROM azure.sql.servers
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';