servers
Creates, updates, deletes, gets or lists a servers
resource.
Overview
Name | servers |
Type | Resource |
Id | azure.mysql.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 |
availability_zone | text | field from the properties object |
backup | text | field from the properties object |
create_mode | text | field from the properties object |
data_encryption | text | field from the properties object |
database_port | text | field from the properties object |
fully_qualified_domain_name | text | field from the properties object |
high_availability | text | field from the properties object |
identity | text | Properties to configure Identity for Bring your Own Keys |
import_source_properties | text | field from the properties object |
location | text | The geo-location where the resource lives |
maintenance_policy | text | field from the properties object |
maintenance_window | text | field from the properties object |
network | text | field from the properties object |
private_endpoint_connections | text | field from the properties object |
replica_capacity | text | field from the properties object |
replication_role | text | field from the properties object |
resourceGroupName | text | field from the properties object |
restore_point_in_time | text | field from the properties object |
serverName | text | field from the properties object |
sku | text | Billing information related properties of a server. |
source_server_resource_id | text | field from the properties object |
state | text | field from the properties object |
storage | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags. |
version | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
identity | object | Properties to configure Identity for Bring your Own Keys |
location | string | The geo-location where the resource lives |
properties | object | The properties of a server. |
sku | object | Billing information related properties of a server. |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, serverName, subscriptionId | Gets information about a server. |
list | SELECT | subscriptionId | List all the servers in a given subscription. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | List all the servers in a given resource group. |
create | INSERT | resourceGroupName, serverName, subscriptionId | Creates a new server or updates an existing server. The update action will overwrite the existing server. |
delete | DELETE | resourceGroupName, serverName, subscriptionId | Deletes a server. |
update | UPDATE | resourceGroupName, serverName, subscriptionId | Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. |
detach_v_net | EXEC | resourceGroupName, serverName, subscriptionId | Detach VNet on a server. |
failover | EXEC | resourceGroupName, serverName, subscriptionId | Manual failover a server. |
reset_gtid | EXEC | resourceGroupName, serverName, subscriptionId | Resets GTID on a server. |
restart | EXEC | resourceGroupName, serverName, subscriptionId | Restarts a server. |
start | EXEC | resourceGroupName, serverName, subscriptionId | Starts a server. |
stop | EXEC | resourceGroupName, serverName, subscriptionId | Stops a server. |
validate_estimate_high_availability | EXEC | resourceGroupName, serverName, subscriptionId | Validate a deployment of high availability. |
SELECT
examples
List all the servers in a given subscription.
- vw_servers
- servers
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 }}';
SELECT
identity,
location,
properties,
sku,
tags
FROM azure.mysql.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.mysql.servers (
resourceGroupName,
serverName,
subscriptionId,
identity,
sku,
properties,
tags,
location
)
SELECT
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ identity }}',
'{{ sku }}',
'{{ properties }}',
'{{ tags }}',
'{{ location }}'
;
- name: your_resource_model_name
props:
- name: identity
value:
- name: principalId
value: string
- name: tenantId
value: string
- name: type
value: string
- name: userAssignedIdentities
value: object
- name: sku
value:
- name: name
value: string
- name: tier
value: string
- name: properties
value:
- name: administratorLogin
value: string
- name: administratorLoginPassword
value: string
- name: version
value: []
- name: availabilityZone
value: string
- name: createMode
value: string
- name: sourceServerResourceId
value: string
- name: restorePointInTime
value: string
- name: replicationRole
value: []
- name: replicaCapacity
value: integer
- name: dataEncryption
value:
- name: primaryUserAssignedIdentityId
value: string
- name: primaryKeyURI
value: string
- name: geoBackupUserAssignedIdentityId
value: string
- name: geoBackupKeyURI
value: string
- name: type
value: string
- name: state
value: string
- name: fullyQualifiedDomainName
value: string
- name: databasePort
value: integer
- name: storage
value:
- name: storageSizeGB
value: integer
- name: iops
value: integer
- name: autoGrow
value: []
- name: storageSku
value: string
- name: storageRedundancy
value: []
- name: backup
value:
- name: backupRetentionDays
value: integer
- name: backupIntervalHours
value: integer
- name: earliestRestoreDate
value: string
- name: highAvailability
value:
- name: mode
value: string
- name: state
value: string
- name: standbyAvailabilityZone
value: string
- name: network
value:
- name: delegatedSubnetResourceId
value: string
- name: privateDnsZoneResourceId
value: string
- name: privateEndpointConnections
value:
- - name: properties
value:
- name: groupIds
value:
- string
- name: privateEndpoint
value:
- name: id
value: string
- name: privateLinkServiceConnectionState
value:
- name: status
value: []
- name: description
value: string
- name: actionsRequired
value: string
- name: provisioningState
value: []
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
- name: maintenancePolicy
value:
- name: patchStrategy
value: []
- name: maintenanceWindow
value:
- name: customWindow
value: string
- name: startHour
value: integer
- name: startMinute
value: integer
- name: dayOfWeek
value: integer
- name: importSourceProperties
value:
- name: storageType
value: string
- name: storageUrl
value: string
- name: sasToken
value: string
- name: dataDirPath
value: string
- name: tags
value: object
- name: location
value: string
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 }}';