Skip to main content

servers

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

Overview

Nameservers
TypeResource
Idazure_extras.rdbms.servers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
namestringThe name of the resource.
administratorLoginstringThe administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
byokEnforcementstringStatus showing whether the server data encryption is enabled with customer-managed keys.
earliestRestoreDatestring (date-time)Earliest restore point creation time (ISO8601 format).
fullyQualifiedDomainNamestringThe fully qualified domain name of a server.
identityobjectThe Azure Active Directory identity of the server.
infrastructureEncryptionstringStatus showing whether the server enabled infrastructure encryption. Known values are: "Enabled" and "Disabled".
locationstringThe geo-location where the resource lives. Required.
masterServerIdstringThe master server id of a replica server.
minimalTlsVersionstringEnforce a minimal Tls version for the server. Known values are: "TLS1_0", "TLS1_1", "TLS1_2", and "TLSEnforcementDisabled".
privateEndpointConnectionsarrayList of private endpoint connections on a server.
publicNetworkAccessstringWhether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled".
replicaCapacityintegerThe maximum number of replicas that a master server can have.
replicationRolestringThe replication role of the server.
skuobjectThe SKU (pricing tier) of the server.
sslEnforcementstringEnable ssl enforcement or not when connect to server. Known values are: "Enabled" and "Disabled".
storageProfileobjectStorage profile of a server.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
userVisibleStatestringA state of a server that is visible to user. Known values are: "Ready", "Dropping", "Disabled", and "Inaccessible".
versionstringServer version. Known values are: "9.5", "9.6", "10", "10.0", "10.2", and "11".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, server_name, subscription_idGets information about a server.
list_by_resource_groupselectresource_group_name, subscription_idList all the servers in a given resource group.
listselectsubscription_idList all the servers in a given subscription.
createinsertresource_group_name, server_name, subscription_id, properties, locationCreates a new server or updates an existing server. The update action will overwrite the existing server.
updateupdateresource_group_name, server_name, subscription_idUpdates an existing server. The request body can contain one to many of the properties present in the normal server definition.
deletedeleteresource_group_name, server_name, subscription_idDeletes a server.
restartexecresource_group_name, server_name, subscription_idRestarts a server.
startexecresource_group_name, server_name, subscription_idStarts a stopped server.
stopexecresource_group_name, server_name, subscription_idStops a running server.
upgradeexecresource_group_name, server_name, subscription_idUpgrade server version.

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.

NameDatatypeDescription
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
server_namestringThe name of the server. Required.
subscription_idstring

SELECT examples

Gets information about a server.

SELECT
id,
name,
administratorLogin,
byokEnforcement,
earliestRestoreDate,
fullyQualifiedDomainName,
identity,
infrastructureEncryption,
location,
masterServerId,
minimalTlsVersion,
privateEndpointConnections,
publicNetworkAccess,
replicaCapacity,
replicationRole,
sku,
sslEnforcement,
storageProfile,
tags,
type,
userVisibleState,
version
FROM azure_extras.rdbms.servers
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates a new server or updates an existing server. The update action will overwrite the existing server.

INSERT INTO azure_extras.rdbms.servers (
identity,
sku,
properties,
location,
tags,
resource_group_name,
server_name,
subscription_id
)
SELECT
'{{ identity }}',
'{{ sku }}',
'{{ properties }}' /* required */,
'{{ location }}' /* required */,
'{{ tags }}',
'{{ resource_group_name }}',
'{{ server_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
sku,
tags,
type
;

UPDATE examples

Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.

UPDATE azure_extras.rdbms.servers
SET
identity = '{{ identity }}',
sku = '{{ sku }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND server_name = '{{ server_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
sku,
tags,
type;

DELETE examples

Deletes a server.

DELETE FROM azure_extras.rdbms.servers
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND server_name = '{{ server_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Restarts a server.

EXEC azure_extras.rdbms.servers.restart 
@resource_group_name='{{ resource_group_name }}' --required,
@server_name='{{ server_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;