Skip to main content

servers

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

Overview

Nameservers
TypeResource
Idazure.mysql.servers

Fields

NameDatatypeDescription
administrator_logintextfield from the properties object
administrator_login_passwordtextfield from the properties object
availability_zonetextfield from the properties object
backuptextfield from the properties object
create_modetextfield from the properties object
data_encryptiontextfield from the properties object
database_porttextfield from the properties object
fully_qualified_domain_nametextfield from the properties object
high_availabilitytextfield from the properties object
identitytextProperties to configure Identity for Bring your Own Keys
import_source_propertiestextfield from the properties object
locationtextThe geo-location where the resource lives
maintenance_policytextfield from the properties object
maintenance_windowtextfield from the properties object
networktextfield from the properties object
private_endpoint_connectionstextfield from the properties object
replica_capacitytextfield from the properties object
replication_roletextfield from the properties object
resourceGroupNametextfield from the properties object
restore_point_in_timetextfield from the properties object
serverNametextfield from the properties object
skutextBilling information related properties of a server.
source_server_resource_idtextfield from the properties object
statetextfield from the properties object
storagetextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
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, subscriptionIdCreates 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.
detach_v_netEXECresourceGroupName, serverName, subscriptionIdDetach VNet on a server.
failoverEXECresourceGroupName, serverName, subscriptionIdManual failover a server.
reset_gtidEXECresourceGroupName, serverName, subscriptionIdResets GTID on a server.
restartEXECresourceGroupName, serverName, subscriptionIdRestarts a server.
startEXECresourceGroupName, serverName, subscriptionIdStarts a server.
stopEXECresourceGroupName, serverName, subscriptionIdStops a server.
validate_estimate_high_availabilityEXECresourceGroupName, serverName, subscriptionIdValidate a deployment of high availability.

SELECT examples

List all the servers in a given subscription.

SELECT
administrator_login,
administrator_login_password,
availability_zone,
backup,
create_mode,
data_encryption,
database_port,
fully_qualified_domain_name,
high_availability,
identity,
import_source_properties,
location,
maintenance_policy,
maintenance_window,
network,
private_endpoint_connections,
replica_capacity,
replication_role,
resourceGroupName,
restore_point_in_time,
serverName,
sku,
source_server_resource_id,
state,
storage,
subscriptionId,
tags,
version
FROM azure.mysql.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.mysql.servers (
resourceGroupName,
serverName,
subscriptionId,
identity,
sku,
properties,
tags,
location
)
SELECT
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ identity }}',
'{{ sku }}',
'{{ properties }}',
'{{ tags }}',
'{{ location }}'
;

UPDATE example

Updates a servers resource.

/*+ update */
UPDATE azure.mysql.servers
SET
identity = '{{ identity }}',
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.mysql.servers
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';