Servers - List
List all the servers in a given subscription.
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/flexibleServers?api-version=2024-12-30
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
subscription
|
path | True |
string (uuid) |
The ID of the target subscription. The value must be an UUID. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Azure operation completed successfully. |
|
| Other Status Codes |
An unexpected error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
List servers in a subscription
Sample request
Sample response
{
"value": [
{
"name": "mysqltestserver1",
"type": "Microsoft.DBforMySQL/flexibleServers",
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver1",
"location": "Southeast Asia",
"properties": {
"administratorLogin": "cloudsa",
"availabilityZone": "1",
"backup": {
"backupIntervalHours": 24,
"backupRetentionDays": 7,
"earliestRestoreDate": "2021-06-17T07:08:17.4259886+00:00",
"geoRedundantBackup": "Disabled"
},
"databasePort": 3306,
"fullVersion": "5.7.44",
"fullyQualifiedDomainName": "mysqltestserver1.database.mysql.azure.com",
"highAvailability": {
"mode": "Disabled",
"state": "NotEnabled"
},
"maintenancePolicy": {
"patchStrategy": "Regular"
},
"maintenanceWindow": {
"batchOfMaintenance": "Default",
"customWindow": "Disabled",
"dayOfWeek": 0,
"startHour": 0,
"startMinute": 0
},
"network": {
"publicNetworkAccess": "Enabled"
},
"replicaCapacity": 10,
"replicationRole": "None",
"state": "Ready",
"storage": {
"autoGrow": "Enabled",
"iops": 369,
"storageRedundancy": "LocalRedundancy",
"storageSizeGB": 23,
"storageSku": "Premium_LRS"
},
"version": "5.7"
},
"sku": {
"name": "Standard_B1ms",
"tier": "Burstable"
},
"tags": {
"num": "1"
}
},
{
"name": "mysqltestserver2",
"type": "Microsoft.DBforMySQL/flexibleServers",
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup2/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver2",
"location": "Southeast Asia",
"properties": {
"administratorLogin": "cloudsa",
"availabilityZone": "2",
"backup": {
"backupIntervalHours": 24,
"backupRetentionDays": 7,
"earliestRestoreDate": "2021-06-17T07:08:17.4259886+00:00",
"geoRedundantBackup": "Disabled"
},
"databasePort": 3306,
"fullVersion": "5.7.44",
"fullyQualifiedDomainName": "mysqltestserver2.mysql.database.azure.com",
"highAvailability": {
"mode": "Disabled",
"state": "NotEnabled"
},
"maintenancePolicy": {
"patchStrategy": "Default"
},
"maintenanceWindow": {
"batchOfMaintenance": "Default",
"customWindow": "Disabled",
"dayOfWeek": 0,
"startHour": 0,
"startMinute": 0
},
"network": {
"publicNetworkAccess": "Enabled"
},
"replicaCapacity": 10,
"replicationRole": "None",
"state": "Ready",
"storage": {
"autoGrow": "Enabled",
"iops": 369,
"storageRedundancy": "LocalRedundancy",
"storageSizeGB": 23,
"storageSku": "Premium_LRS"
},
"version": "5.7"
},
"sku": {
"name": "Standard_D2ds_v4",
"tier": "GeneralPurpose"
},
"tags": {
"num": "1"
}
},
{
"name": "mysqltestserver3",
"type": "Microsoft.DBforMySQL/flexibleServers",
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup3/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver3",
"location": "Southeast Asia",
"properties": {
"administratorLogin": "cloudsa",
"availabilityZone": "1",
"backup": {
"backupIntervalHours": 24,
"backupRetentionDays": 7,
"earliestRestoreDate": "2021-06-24T06:28:19.0611667+00:00",
"geoRedundantBackup": "Disabled"
},
"databasePort": 3306,
"fullVersion": "5.7.44",
"fullyQualifiedDomainName": "mysqltestserver3.mysql.database.azure.com",
"highAvailability": {
"mode": "Disabled",
"state": "NotEnabled"
},
"maintenancePolicy": {
"patchStrategy": "Default"
},
"maintenanceWindow": {
"batchOfMaintenance": "Default",
"customWindow": "Disabled",
"dayOfWeek": 0,
"startHour": 0,
"startMinute": 0
},
"network": {
"publicNetworkAccess": "Enabled"
},
"replicaCapacity": 10,
"replicationRole": "None",
"state": "Ready",
"storage": {
"autoGrow": "Enabled",
"iops": 600,
"storageRedundancy": "ZoneRedundancy",
"storageSizeGB": 100,
"storageSku": "Premium_ZRS"
},
"version": "5.7"
},
"sku": {
"name": "Standard_E2ds_v4",
"tier": "MemoryOptimized"
},
"tags": {
"num": "1"
}
}
]
}
Definitions
| Name | Description |
|---|---|
| Backup |
Storage Profile properties of a server |
|
Batch |
The batch of maintenance when enabled the custom managed maintenance window of a server. |
|
created |
The type of identity that created the resource. |
|
Create |
The mode to create a new MySQL server. |
|
Data |
The date encryption for cmk. |
|
Data |
The key type, AzureKeyVault for enable cmk, SystemManaged for disable cmk. |
|
Enable |
Enum to indicate whether value is 'Enabled' or 'Disabled' |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
High |
High availability properties of a server |
|
High |
High availability mode for a server. |
|
High |
The state of server high availability. |
|
Import |
Import source related properties. |
|
Import |
Storage type of import source. |
|
Maintenance |
Maintenance policy of a server. |
|
Maintenance |
Maintenance window of a server. |
|
Managed |
Type of managed service identity. |
|
My |
Properties to configure Identity for Bring your Own Keys |
|
My |
Billing information related properties of a server. |
| Network |
Network related properties of a server |
|
Patch |
Enum to indicate the patch strategy of a server |
|
Private |
The private endpoint resource. |
|
Private |
The private endpoint connection resource. |
|
Private |
The current provisioning state. |
|
Private |
The private endpoint connection status. |
|
Private |
A collection of information about the state of the connection between service consumer and provider. |
|
Replication |
The replication role. |
| Server |
Represents a server. |
|
Server |
The response of a Server list operation. |
|
Server |
The tier of the particular SKU, e.g. GeneralPurpose. |
|
Server |
The state of a server. |
|
Server |
The major version of a server. 8.0.21 stands for MySQL 8.0, 5.7.44 stands for MySQL 5.7 |
| Storage |
Storage Profile properties of a server |
|
Storage |
The redundant type of the server storage. The parameter is used for server creation. |
|
system |
Metadata pertaining to creation and last modification of the resource. |
|
User |
Metadata of user assigned identity. |
Backup
Storage Profile properties of a server
| Name | Type | Default value | Description |
|---|---|---|---|
| backupIntervalHours |
integer (int32) |
Backup interval hours for the server. |
|
| backupRetentionDays |
integer (int32) |
Backup retention days for the server. |
|
| earliestRestoreDate |
string (date-time) |
Earliest restore point creation time (ISO8601 format) |
|
| geoRedundantBackup | Disabled |
Whether or not geo redundant backup is enabled. |
BatchOfMaintenance
The batch of maintenance when enabled the custom managed maintenance window of a server.
| Value | Description |
|---|---|
| Default | |
| Batch1 | |
| Batch2 |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
CreateMode
The mode to create a new MySQL server.
| Value | Description |
|---|---|
| Default | |
| PointInTimeRestore | |
| Replica | |
| GeoRestore |
DataEncryption
The date encryption for cmk.
| Name | Type | Description |
|---|---|---|
| geoBackupKeyURI |
string |
Geo backup key uri as key vault can't cross region, need cmk in same region as geo backup |
| geoBackupUserAssignedIdentityId |
string |
Geo backup user identity resource id as identity can't cross region, need identity in same region as geo backup |
| primaryKeyURI |
string |
Primary key uri |
| primaryUserAssignedIdentityId |
string |
Primary user identity resource id |
| type |
The key type, AzureKeyVault for enable cmk, SystemManaged for disable cmk. |
DataEncryptionType
The key type, AzureKeyVault for enable cmk, SystemManaged for disable cmk.
| Value | Description |
|---|---|
| AzureKeyVault | |
| SystemManaged |
EnableStatusEnum
Enum to indicate whether value is 'Enabled' or 'Disabled'
| Value | Description |
|---|---|
| Enabled | |
| Disabled |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
HighAvailability
High availability properties of a server
| Name | Type | Description |
|---|---|---|
| mode |
High availability mode for a server. |
|
| standbyAvailabilityZone |
string |
Availability zone of the standby server. |
| state |
The state of server high availability. |
HighAvailabilityMode
High availability mode for a server.
| Value | Description |
|---|---|
| Disabled | |
| ZoneRedundant | |
| SameZone |
HighAvailabilityState
The state of server high availability.
| Value | Description |
|---|---|
| NotEnabled | |
| CreatingStandby | |
| Healthy | |
| FailingOver | |
| RemovingStandby |
ImportSourceProperties
Import source related properties.
| Name | Type | Description |
|---|---|---|
| dataDirPath |
string |
Relative path of data directory in storage. |
| sasToken |
string (password) |
Sas token for accessing source storage. Read and list permissions are required for sas token. |
| storageType |
Storage type of import source. |
|
| storageUrl |
string |
Uri of the import source storage. |
ImportSourceStorageType
Storage type of import source.
| Value | Description |
|---|---|
| AzureBlob |
MaintenancePolicy
Maintenance policy of a server.
| Name | Type | Description |
|---|---|---|
| patchStrategy |
The patch strategy of this server |
MaintenanceWindow
Maintenance window of a server.
| Name | Type | Description |
|---|---|---|
| batchOfMaintenance |
The batch of maintenance when enabled the custom managed maintenance window of a server. |
|
| customWindow |
string |
indicates whether custom window is enabled or disabled |
| dayOfWeek |
integer (int32) |
day of week for maintenance window |
| startHour |
integer (int32) |
start hour for maintenance window |
| startMinute |
integer (int32) |
start minute for maintenance window |
ManagedServiceIdentityType
Type of managed service identity.
| Value | Description |
|---|---|
| UserAssigned |
MySQLServerIdentity
Properties to configure Identity for Bring your Own Keys
| Name | Type | Description |
|---|---|---|
| principalId |
string |
ObjectId from the KeyVault |
| tenantId |
string |
TenantId from the KeyVault |
| type |
Type of managed service identity. |
|
| userAssignedIdentities |
<string,
User |
Metadata of user assigned identity. |
MySQLServerSku
Billing information related properties of a server.
| Name | Type | Description |
|---|---|---|
| name |
string |
The name of the sku, e.g. Standard_D32s_v3. |
| tier |
The tier of the particular SKU, e.g. GeneralPurpose. |
Network
Network related properties of a server
| Name | Type | Description |
|---|---|---|
| delegatedSubnetResourceId |
string |
Delegated subnet resource id used to setup vnet for a server. |
| privateDnsZoneResourceId |
string |
Private DNS zone resource id. |
| publicNetworkAccess |
Whether or not public network access is allowed for this server. Value is 'Disabled' when server has VNet integration. |
PatchStrategy
Enum to indicate the patch strategy of a server
| Value | Description |
|---|---|
| Regular | |
| VirtualCanary |
PrivateEndpoint
The private endpoint resource.
| Name | Type | Description |
|---|---|---|
| id |
string |
The ARM identifier for private endpoint. |
PrivateEndpointConnection
The private endpoint connection resource.
| Name | Type | Description |
|---|---|---|
| id |
string (arm-id) |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
| name |
string |
The name of the resource |
| properties.groupIds |
string[] |
The group ids for the private endpoint resource. |
| properties.privateEndpoint |
The private endpoint resource. |
|
| properties.privateLinkServiceConnectionState |
A collection of information about the state of the connection between service consumer and provider. |
|
| properties.provisioningState |
The provisioning state of the private endpoint connection resource. |
|
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
PrivateEndpointConnectionProvisioningState
The current provisioning state.
| Value | Description |
|---|---|
| Succeeded | |
| Creating | |
| Deleting | |
| Failed |
PrivateEndpointServiceConnectionStatus
The private endpoint connection status.
| Value | Description |
|---|---|
| Pending | |
| Approved | |
| Rejected |
PrivateLinkServiceConnectionState
A collection of information about the state of the connection between service consumer and provider.
| Name | Type | Description |
|---|---|---|
| actionsRequired |
string |
A message indicating if changes on the service provider require any updates on the consumer. |
| description |
string |
The reason for approval/rejection of the connection. |
| status |
Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. |
ReplicationRole
The replication role.
| Value | Description |
|---|---|
| None | |
| Source | |
| Replica |
Server
Represents a server.
| Name | Type | Description |
|---|---|---|
| id |
string (arm-id) |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
| identity |
The cmk identity for the server. |
|
| location |
string |
The geo-location where the resource lives |
| name |
string |
The name of the resource |
| properties.administratorLogin |
string |
The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). |
| properties.administratorLoginPassword |
string (password) |
The password of the administrator login (required for server creation). |
| properties.availabilityZone |
string |
availability Zone information of the server. |
| properties.backup |
Backup related properties of a server. |
|
| properties.createMode |
The mode to create a new MySQL server. |
|
| properties.dataEncryption |
The Data Encryption for CMK. |
|
| properties.databasePort |
integer (int32) |
The server database port. Can only be specified when the server is being created. |
| properties.fullVersion |
string |
Major version and actual engine version |
| properties.fullyQualifiedDomainName |
string |
The fully qualified domain name of a server. |
| properties.highAvailability |
High availability related properties of a server. |
|
| properties.importSourceProperties |
Source properties for import from storage. |
|
| properties.maintenancePolicy |
Maintenance policy of a server. |
|
| properties.maintenanceWindow |
Maintenance window of a server. Known issue: cannot be set during server creation or updated with other properties during server update; must be updated separately. |
|
| properties.network |
Network related properties of a server. |
|
| properties.privateEndpointConnections |
PrivateEndpointConnections related properties of a server. |
|
| properties.replicaCapacity |
integer (int32) minimum: 0 |
The maximum number of replicas that a primary server can have. |
| properties.replicationRole |
The replication role. |
|
| properties.restorePointInTime |
string (date-time) |
Restore point creation time (ISO8601 format), specifying the time to restore from. |
| properties.sourceServerResourceId |
string |
The source MySQL server id. |
| properties.state |
The state of a server. |
|
| properties.storage |
Storage related properties of a server. |
|
| properties.version |
Major version of MySQL. 8.0.21 stands for MySQL 8.0, 5.7.44 stands for MySQL 5.7 |
|
| sku |
The SKU (pricing tier) of the server. |
|
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
| tags |
object |
Resource tags. |
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
ServerListResult
The response of a Server list operation.
| Name | Type | Description |
|---|---|---|
| nextLink |
string (uri) |
The link to the next page of items |
| value |
Server[] |
The Server items on this page |
ServerSkuTier
The tier of the particular SKU, e.g. GeneralPurpose.
| Value | Description |
|---|---|
| Burstable | |
| GeneralPurpose | |
| MemoryOptimized |
ServerState
The state of a server.
| Value | Description |
|---|---|
| Ready | |
| Dropping | |
| Disabled | |
| Starting | |
| Stopping | |
| Stopped | |
| Updating |
ServerVersion
The major version of a server. 8.0.21 stands for MySQL 8.0, 5.7.44 stands for MySQL 5.7
| Value | Description |
|---|---|
| 5.7 | |
| 8.0.21 |
Storage
Storage Profile properties of a server
| Name | Type | Default value | Description |
|---|---|---|---|
| autoGrow | Disabled |
Enable Storage Auto Grow or not. |
|
| autoIoScaling | Enabled |
Enable IO Auto Scaling or not. |
|
| iops |
integer (int32) |
Storage IOPS for a server. |
|
| logOnDisk | Disabled |
Enable Log On Disk or not. |
|
| storageRedundancy | LocalRedundancy |
The redundant type of the server storage. The parameter is used for server creation. |
|
| storageSizeGB |
integer (int32) |
Max storage size allowed for a server. |
|
| storageSku |
string |
The sku name of the server storage. |
StorageRedundancyEnum
The redundant type of the server storage. The parameter is used for server creation.
| Value | Description |
|---|---|
| LocalRedundancy | |
| ZoneRedundancy |
systemData
Metadata pertaining to creation and last modification of the resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
| createdBy |
string |
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
| lastModifiedBy |
string |
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |
UserAssignedIdentity
Metadata of user assigned identity.
| Name | Type | Description |
|---|---|---|
| clientId |
string |
Client Id of user assigned identity |
| principalId |
string |
Principal Id of user assigned identity |