servers
Creates, updates, deletes, gets or lists a servers
resource.
Overview
Name | servers |
Type | Resource |
Id | azure.sql.servers |
Fields
- vw_servers
- servers
Name | Datatype | Description |
---|---|---|
administrator_login | text | field from the properties object |
administrator_login_password | text | field from the properties object |
administrators | text | field from the properties object |
external_governance_status | text | field from the properties object |
federated_client_id | text | field from the properties object |
fully_qualified_domain_name | text | field from the properties object |
identity | text | Azure Active Directory identity configuration for a resource. |
is_ipv6_enabled | text | field from the properties object |
key_id | text | field from the properties object |
kind | text | Kind of sql server. This is metadata used for the Azure portal experience. |
location | text | Resource location. |
minimal_tls_version | text | field from the properties object |
primary_user_assigned_identity_id | text | field from the properties object |
private_endpoint_connections | text | field from the properties object |
public_network_access | text | field from the properties object |
resourceGroupName | text | field from the properties object |
restrict_outbound_network_access | text | field from the properties object |
serverName | text | field from the properties object |
state | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags. |
version | text | field from the properties object |
workspace_feature | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
identity | object | Azure Active Directory identity configuration for a resource. |
kind | string | Kind of sql server. This is metadata used for the Azure portal experience. |
location | string | Resource location. |
properties | object | The properties of a server. |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, serverName, subscriptionId | Gets a server. |
list | SELECT | subscriptionId | Gets a list of all servers in the subscription. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | Gets a list of servers in a resource groups. |
create_or_update | INSERT | resourceGroupName, serverName, subscriptionId, data__location | Creates or updates a server. |
delete | DELETE | resourceGroupName, serverName, subscriptionId | Deletes a server. |
update | UPDATE | resourceGroupName, serverName, subscriptionId | Updates a server. |
check_name_availability | EXEC | subscriptionId, data__name, data__type | Determines whether a resource can be created with the specified name. |
import_database | EXEC | resourceGroupName, serverName, subscriptionId, data__administratorLogin, data__administratorLoginPassword, data__storageKey, data__storageKeyType, data__storageUri | Imports a bacpac into a new database. |
refresh_status | EXEC | resourceGroupName, serverName, subscriptionId | Refresh external governance enablement status. |
SELECT
examples
Gets a list of all servers in the subscription.
- vw_servers
- servers
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 }}';
SELECT
identity,
kind,
location,
properties,
tags
FROM azure.sql.servers
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new servers
resource.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: location
value: string
- name: tags
value: object
- name: identity
value:
- name: principalId
value: string
- name: type
value: string
- name: tenantId
value: string
- name: kind
value: string
- name: properties
value:
- name: administratorLogin
value: string
- name: administratorLoginPassword
value: string
- name: version
value: string
- name: state
value: string
- name: fullyQualifiedDomainName
value: string
- name: privateEndpointConnections
value:
- - name: id
value: string
- name: properties
value:
- name: privateEndpoint
value:
- name: id
value: string
- name: groupIds
value:
- string
- name: privateLinkServiceConnectionState
value:
- name: status
value: string
- name: description
value: string
- name: actionsRequired
value: string
- name: provisioningState
value: string
- name: minimalTlsVersion
value: string
- name: publicNetworkAccess
value: string
- name: workspaceFeature
value: string
- name: primaryUserAssignedIdentityId
value: string
- name: federatedClientId
value: string
- name: keyId
value: string
- name: administrators
value:
- name: administratorType
value: string
- name: principalType
value: string
- name: login
value: string
- name: sid
value: string
- name: tenantId
value: string
- name: azureADOnlyAuthentication
value: boolean
- name: restrictOutboundNetworkAccess
value: string
- name: isIPv6Enabled
value: string
- name: externalGovernanceStatus
value: string
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 }}';