Skip to main content

servers

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

Overview

Nameservers
TypeResource
Idazure.maria_db.servers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
locationstringThe geo-location where the resource lives
propertiesobjectProperties of the server.
skuobjectBilling information related properties of a server.
tagsobjectResource tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, serverNameGets information about a server.
list_by_resource_groupselectsubscriptionId, resourceGroupNameList all the servers in a given resource group.
listselectsubscriptionIdList all the servers in a given subscription.
createinsertsubscriptionId, resourceGroupName, serverName, data__properties, data__locationCreates a new server or updates an existing server. The update action will overwrite the existing server.
updateupdatesubscriptionId, resourceGroupName, serverNameUpdates an existing server. The request body can contain one to many of the properties present in the normal server definition.
deletedeletesubscriptionId, resourceGroupName, serverNameDeletes a server.
startexecsubscriptionId, resourceGroupName, serverNameStarts a stopped server.
stopexecsubscriptionId, resourceGroupName, serverNameStops a running server.
restartexecsubscriptionId, resourceGroupName, serverNameRestarts a server.

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
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
serverNamestringThe name of the server.
subscriptionIdstringThe ID of the target subscription.

SELECT examples

Gets information about a server.

SELECT
location,
properties,
sku,
tags
FROM azure.maria_db.servers
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND serverName = '{{ serverName }}' -- required
;

INSERT examples

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

INSERT INTO azure.maria_db.servers (
data__sku,
data__properties,
data__location,
data__tags,
subscriptionId,
resourceGroupName,
serverName
)
SELECT
'{{ sku }}',
'{{ properties }}' /* required */,
'{{ location }}' /* required */,
'{{ tags }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ serverName }}'
RETURNING
location,
properties,
sku,
tags
;

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.maria_db.servers
SET
data__sku = '{{ sku }}',
data__properties = '{{ properties }}',
data__tags = '{{ tags }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND serverName = '{{ serverName }}' --required
RETURNING
location,
properties,
sku,
tags;

DELETE examples

Deletes a server.

DELETE FROM azure.maria_db.servers
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND serverName = '{{ serverName }}' --required
;

Lifecycle Methods

Starts a stopped server.

EXEC azure.maria_db.servers.start 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@serverName='{{ serverName }}' --required
;