Skip to main content

servers

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

Overview

Nameservers
TypeResource
Idazure.maria_db.servers

Fields

NameDatatypeDescription
administrator_logintextfield from the properties object
earliest_restore_datetextfield from the properties object
fully_qualified_domain_nametextfield from the properties object
locationtextThe geo-location where the resource lives
master_server_idtextfield from the properties object
minimal_tls_versiontextfield from the properties object
private_endpoint_connectionstextfield from the properties object
public_network_accesstextfield from the properties object
replica_capacitytextfield from the properties object
replication_roletextfield from the properties object
resourceGroupNametextfield from the properties object
serverNametextfield from the properties object
skutextThe resource model definition representing SKU
ssl_enforcementtextfield from the properties object
storage_profiletextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
user_visible_statetextfield from the properties object
versiontextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, serverName, subscriptionIdGets information about a server.
listSELECTsubscriptionIdList all the servers in a given subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdList all the servers in a given resource group.
createINSERTresourceGroupName, serverName, subscriptionId, data__location, data__propertiesCreates a new server or updates an existing server. The update action will overwrite the existing server.
deleteDELETEresourceGroupName, serverName, subscriptionIdDeletes a server.
updateUPDATEresourceGroupName, serverName, subscriptionIdUpdates an existing server. The request body can contain one to many of the properties present in the normal server definition.
restartEXECresourceGroupName, serverName, subscriptionIdRestarts a server.
startEXECresourceGroupName, serverName, subscriptionIdStarts a stopped server.
stopEXECresourceGroupName, serverName, subscriptionIdStops a running server.

SELECT examples

List all the servers in a given subscription.

SELECT
administrator_login,
earliest_restore_date,
fully_qualified_domain_name,
location,
master_server_id,
minimal_tls_version,
private_endpoint_connections,
public_network_access,
replica_capacity,
replication_role,
resourceGroupName,
serverName,
sku,
ssl_enforcement,
storage_profile,
subscriptionId,
tags,
user_visible_state,
version
FROM azure.maria_db.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.maria_db.servers (
resourceGroupName,
serverName,
subscriptionId,
data__location,
data__properties,
sku,
properties,
location,
tags
)
SELECT
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ data__location }}',
'{{ data__properties }}',
'{{ sku }}',
'{{ properties }}',
'{{ location }}',
'{{ tags }}'
;

UPDATE example

Updates a servers resource.

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

DELETE example

Deletes the specified servers resource.

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