Servers - Create
创建新的服务器或更新现有服务器。 更新作将覆盖现有服务器。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}?api-version=2024-12-30
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 此名称不区分大小写。 |
|
server
|
path | True |
string minLength: 1maxLength: 63 pattern: ^[a-z0-9][-a-z0-9]*(? |
服务器的名称。 |
|
subscription
|
path | True |
string (uuid) |
目标订阅的 ID。 该值必须是 UUID。 |
|
api-version
|
query | True |
string minLength: 1 |
要用于此操作的 API 版本。 |
请求正文
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| location | True |
string |
资源所在的地理位置 |
| identity |
服务器的 cmk 标识。 |
||
| properties.administratorLogin |
string |
管理员的服务器登录名。 只能在创建服务器时指定(并且是创建所必需的)。 |
|
| properties.administratorLoginPassword |
string (password) |
管理员登录名的密码(创建服务器时需要)。 |
|
| properties.availabilityZone |
string |
服务器的可用性区域信息。 |
|
| properties.backup |
备份服务器的相关属性。 |
||
| properties.createMode |
创建新的 MySQL 服务器的模式。 |
||
| properties.dataEncryption |
CMK 的数据加密。 |
||
| properties.databasePort |
integer (int32) |
服务器数据库端口。 只能在创建服务器时指定。 |
|
| properties.highAvailability |
服务器的高可用性相关属性。 |
||
| properties.importSourceProperties |
从存储导入的源属性。 |
||
| properties.maintenancePolicy |
服务器的维护策略。 |
||
| properties.maintenanceWindow |
服务器的维护时段。 已知问题:无法在服务器创建期间设置,也不能在服务器更新期间使用其他属性进行更新;必须单独更新。 |
||
| properties.network |
服务器的网络相关属性。 |
||
| properties.replicationRole |
复制角色。 |
||
| properties.restorePointInTime |
string (date-time) |
还原点创建时间(ISO8601格式),指定要从中还原的时间。 |
|
| properties.sourceServerResourceId |
string |
源 MySQL 服务器 ID。 |
|
| properties.storage |
服务器的存储相关属性。 |
||
| properties.version |
MySQL 的主要版本。 8.0.21 代表 MySQL 8.0、5.7.44 代表 MySQL 5.7 |
||
| sku |
服务器的 SKU(定价层)。 |
||
| tags |
object |
资源标记。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
资源“服务器”更新作成功 |
|
| 201 Created |
资源“服务器”创建作成功 标头
|
|
| 202 Accepted |
已接受资源作。 标头
|
|
| Other Status Codes |
意外错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
| Create a new server |
| Create a replica server |
| Create a server as a point in time restore |
| Create a server with byok |
| Create a server with non-default database port |
Create a new server
示例请求
PUT https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver?api-version=2024-12-30
{
"location": "southeastasia",
"properties": {
"administratorLogin": "cloudsa",
"administratorLoginPassword": "your_password",
"availabilityZone": "1",
"backup": {
"backupIntervalHours": 24,
"backupRetentionDays": 7,
"geoRedundantBackup": "Disabled"
},
"createMode": "Default",
"highAvailability": {
"mode": "ZoneRedundant",
"standbyAvailabilityZone": "3"
},
"storage": {
"autoGrow": "Disabled",
"iops": 600,
"storageRedundancy": "ZoneRedundancy",
"storageSizeGB": 100
},
"version": "5.7"
},
"sku": {
"name": "Standard_D2ds_v4",
"tier": "GeneralPurpose"
},
"tags": {
"num": "1"
}
}
示例响应
{
"name": "mysqltestserver",
"type": "Microsoft.DBforMySQL/flexibleServers",
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver",
"location": "Southeast Asia",
"properties": {
"administratorLogin": "cloudsa",
"availabilityZone": "1",
"backup": {
"backupRetentionDays": 7,
"earliestRestoreDate": "2021-06-17T06:11:38.4150019+00:00",
"geoRedundantBackup": "Disabled"
},
"databasePort": 3306,
"fullVersion": "5.7.44",
"fullyQualifiedDomainName": "mysqltestserver.database.mysql.azure.com",
"highAvailability": {
"mode": "ZoneRedundant",
"standbyAvailabilityZone": "3",
"state": "Healthy"
},
"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_D2ds_v4",
"tier": "GeneralPurpose"
},
"tags": {
"num": "1"
}
}
{
"name": "mysqltestserver",
"type": "Microsoft.DBforMySQL/flexibleServers",
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver",
"location": "Southeast Asia",
"properties": {
"administratorLogin": "cloudsa",
"availabilityZone": "1",
"backup": {
"backupRetentionDays": 7,
"earliestRestoreDate": "2021-06-17T06:11:38.4150019+00:00",
"geoRedundantBackup": "Disabled"
},
"databasePort": 3306,
"fullVersion": "5.7.44",
"fullyQualifiedDomainName": "mysqltestserver.database.mysql.azure.com",
"highAvailability": {
"mode": "ZoneRedundant",
"standbyAvailabilityZone": "3",
"state": "Healthy"
},
"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": 600,
"storageRedundancy": "ZoneRedundancy",
"storageSizeGB": 100,
"storageSku": "Premium_ZRS"
},
"version": "5.7"
},
"sku": {
"name": "Standard_D2ds_v4",
"tier": "GeneralPurpose"
},
"tags": {
"num": "1"
}
}
Create a replica server
示例请求
PUT https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/replica-server?api-version=2024-12-30
{
"location": "SoutheastAsia",
"properties": {
"createMode": "Replica",
"sourceServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/source-server"
}
}
示例响应
{
"name": "replica-server",
"type": "Microsoft.DBforMySQL/flexibleServers",
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/replica-server",
"location": "Southeast Asia",
"properties": {
"administratorLogin": "cloudsa",
"availabilityZone": "3",
"backup": {
"backupRetentionDays": 7,
"earliestRestoreDate": "2021-06-24T08:19:18.5729164+00:00",
"geoRedundantBackup": "Disabled"
},
"databasePort": 3306,
"fullVersion": "5.7.44",
"fullyQualifiedDomainName": "replica-server.database.mysql.azure.com",
"highAvailability": {
"mode": "Disabled",
"state": "NotEnabled"
},
"maintenanceWindow": {
"batchOfMaintenance": "Default",
"customWindow": "Disabled",
"dayOfWeek": 0,
"startHour": 0,
"startMinute": 0
},
"network": {
"publicNetworkAccess": "Enabled"
},
"replicaCapacity": 0,
"replicationRole": "Replica",
"sourceServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/source-server",
"state": "Ready",
"storage": {
"autoGrow": "Enabled",
"iops": 360,
"storageRedundancy": "LocalRedundancy",
"storageSizeGB": 20,
"storageSku": "Premium_LRS"
},
"version": "5.7"
},
"sku": {
"name": "Standard_D2ds_v4",
"tier": "GeneralPurpose"
},
"tags": {
"ElasticServer": "1"
}
}
{
"name": "replica-server",
"type": "Microsoft.DBforMySQL/flexibleServers",
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/replica-server",
"location": "Southeast Asia",
"properties": {
"administratorLogin": "cloudsa",
"availabilityZone": "3",
"backup": {
"backupIntervalHours": 24,
"backupRetentionDays": 7,
"earliestRestoreDate": "2021-06-24T08:19:18.5729164+00:00",
"geoRedundantBackup": "Disabled"
},
"databasePort": 3306,
"fullVersion": "5.7.44",
"fullyQualifiedDomainName": "replica-server.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": 0,
"replicationRole": "Replica",
"sourceServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/source-server",
"state": "Ready",
"storage": {
"autoGrow": "Enabled",
"iops": 360,
"storageRedundancy": "LocalRedundancy",
"storageSizeGB": 20,
"storageSku": "Premium_LRS"
},
"version": "5.7"
},
"sku": {
"name": "Standard_D2ds_v4",
"tier": "GeneralPurpose"
},
"tags": {
"ElasticServer": "1"
}
}
Create a server as a point in time restore
示例请求
PUT https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TargetResourceGroup/providers/Microsoft.DBforMySQL/flexibleServers/targetserver?api-version=2024-12-30
{
"location": "SoutheastAsia",
"properties": {
"createMode": "PointInTimeRestore",
"restorePointInTime": "2021-06-24T00:00:37.467Z",
"sourceServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMySQL/flexibleServers/sourceserver"
},
"sku": {
"name": "Standard_D14_v2",
"tier": "GeneralPurpose"
},
"tags": {
"num": "1"
}
}
示例响应
{
"name": "targetserver",
"type": "Microsoft.DBforMySQL/flexibleServers",
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TargetResourceGroup/providers/Microsoft.DBforMySQL/flexibleServers/targetserver",
"location": "Southeast Asia",
"properties": {
"administratorLogin": "adminuser",
"availabilityZone": "1",
"backup": {
"backupIntervalHours": 24,
"backupRetentionDays": 7,
"earliestRestoreDate": "2021-06-24T00:15:24.00+00:00",
"geoRedundantBackup": "Disabled"
},
"databasePort": 3306,
"fullVersion": "5.7.44",
"fullyQualifiedDomainName": "targetserver.database.mysql.azure.com",
"highAvailability": {
"mode": "Disabled",
"state": "NotEnabled"
},
"maintenanceWindow": {
"batchOfMaintenance": "Default",
"customWindow": "Disabled",
"dayOfWeek": 0,
"startHour": 0,
"startMinute": 0
},
"network": {
"publicNetworkAccess": "Enabled"
},
"replicaCapacity": 10,
"replicationRole": "None",
"state": "Ready",
"storage": {
"autoGrow": "Enabled",
"iops": 360,
"storageRedundancy": "LocalRedundancy",
"storageSizeGB": 20,
"storageSku": "Premium_LRS"
},
"version": "5.7"
},
"sku": {
"name": "Standard_D2ds_v4",
"tier": "GeneralPurpose"
},
"tags": {
"num": "1"
}
}
{
"name": "targetserver",
"type": "Microsoft.DBforMySQL/flexibleServers",
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TargetResourceGroup/providers/Microsoft.DBforMySQL/flexibleServers/targetserver",
"location": "Southeast Asia",
"properties": {
"administratorLogin": "adminuser",
"availabilityZone": "1",
"backup": {
"backupIntervalHours": 24,
"backupRetentionDays": 7,
"earliestRestoreDate": "2021-06-24T00:15:24.00+00:00",
"geoRedundantBackup": "Disabled"
},
"databasePort": 3306,
"fullVersion": "5.7.44",
"fullyQualifiedDomainName": "targetserver.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": 360,
"storageRedundancy": "LocalRedundancy",
"storageSizeGB": 20,
"storageSku": "Premium_LRS"
},
"version": "5.7"
},
"sku": {
"name": "Standard_D2ds_v4",
"tier": "GeneralPurpose"
},
"tags": {
"num": "1"
}
}
Create a server with byok
示例请求
PUT https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver?api-version=2024-12-30
{
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity": {}
}
},
"location": "southeastasia",
"properties": {
"administratorLogin": "cloudsa",
"administratorLoginPassword": "your_password",
"availabilityZone": "1",
"backup": {
"backupIntervalHours": 24,
"backupRetentionDays": 7,
"geoRedundantBackup": "Disabled"
},
"createMode": "Default",
"dataEncryption": {
"type": "AzureKeyVault",
"geoBackupKeyURI": "https://test-geo.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a",
"geoBackupUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-identity",
"primaryKeyURI": "https://test.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a",
"primaryUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity"
},
"highAvailability": {
"mode": "ZoneRedundant",
"standbyAvailabilityZone": "3"
},
"storage": {
"autoGrow": "Disabled",
"iops": 600,
"storageRedundancy": "LocalRedundancy",
"storageSizeGB": 100
},
"version": "5.7"
},
"sku": {
"name": "Standard_D2ds_v4",
"tier": "GeneralPurpose"
},
"tags": {
"num": "1"
}
}
示例响应
{
"name": "mysqltestserver",
"type": "Microsoft.DBforMySQL/flexibleServers",
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver",
"location": "Southeast Asia",
"properties": {
"administratorLogin": "cloudsa",
"availabilityZone": "1",
"backup": {
"backupRetentionDays": 7,
"earliestRestoreDate": "2021-06-17T06:11:38.4150019+00:00",
"geoRedundantBackup": "Disabled"
},
"databasePort": 3306,
"fullVersion": "5.7.44",
"fullyQualifiedDomainName": "mysqltestserver.database.mysql.azure.com",
"highAvailability": {
"mode": "ZoneRedundant",
"standbyAvailabilityZone": "3",
"state": "Healthy"
},
"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_D2ds_v4",
"tier": "GeneralPurpose"
},
"tags": {
"num": "1"
}
}
{
"name": "mysqltestserver",
"type": "Microsoft.DBforMySQL/flexibleServers",
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver",
"location": "Southeast Asia",
"properties": {
"administratorLogin": "cloudsa",
"availabilityZone": "1",
"backup": {
"backupRetentionDays": 7,
"earliestRestoreDate": "2021-06-17T06:11:38.4150019+00:00",
"geoRedundantBackup": "Disabled"
},
"databasePort": 3306,
"fullVersion": "5.7.44",
"fullyQualifiedDomainName": "mysqltestserver.database.mysql.azure.com",
"highAvailability": {
"mode": "ZoneRedundant",
"standbyAvailabilityZone": "3",
"state": "Healthy"
},
"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": 600,
"storageRedundancy": "ZoneRedundancy",
"storageSizeGB": 100,
"storageSku": "Premium_ZRS"
},
"version": "5.7"
},
"sku": {
"name": "Standard_D2ds_v4",
"tier": "GeneralPurpose"
},
"tags": {
"num": "1"
}
}
Create a server with non-default database port
示例请求
PUT https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver?api-version=2024-12-30
{
"location": "southeastasia",
"properties": {
"administratorLogin": "cloudsa",
"administratorLoginPassword": "your_password",
"availabilityZone": "1",
"backup": {
"backupIntervalHours": 24,
"backupRetentionDays": 7,
"geoRedundantBackup": "Disabled"
},
"createMode": "Default",
"databasePort": 8888,
"highAvailability": {
"mode": "ZoneRedundant",
"standbyAvailabilityZone": "3"
},
"storage": {
"autoGrow": "Disabled",
"iops": 600,
"storageRedundancy": "LocalRedundancy",
"storageSizeGB": 100
},
"version": "5.7"
},
"sku": {
"name": "Standard_D2ds_v4",
"tier": "GeneralPurpose"
},
"tags": {
"num": "1"
}
}
示例响应
{
"name": "mysqltestserver",
"type": "Microsoft.DBforMySQL/flexibleServers",
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver",
"location": "Southeast Asia",
"properties": {
"administratorLogin": "cloudsa",
"availabilityZone": "1",
"backup": {
"backupRetentionDays": 7,
"earliestRestoreDate": "2021-06-17T06:11:38.4150019+00:00",
"geoRedundantBackup": "Disabled"
},
"databasePort": 8888,
"fullVersion": "5.7.44",
"fullyQualifiedDomainName": "mysqltestserver.database.mysql.azure.com",
"highAvailability": {
"mode": "ZoneRedundant",
"standbyAvailabilityZone": "3",
"state": "Healthy"
},
"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_D2ds_v4",
"tier": "GeneralPurpose"
},
"tags": {
"num": "1"
}
}
{
"name": "mysqltestserver",
"type": "Microsoft.DBforMySQL/flexibleServers",
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver",
"location": "Southeast Asia",
"properties": {
"administratorLogin": "cloudsa",
"availabilityZone": "1",
"backup": {
"backupRetentionDays": 7,
"earliestRestoreDate": "2021-06-17T06:11:38.4150019+00:00",
"geoRedundantBackup": "Disabled"
},
"databasePort": 8888,
"fullVersion": "5.7.44",
"fullyQualifiedDomainName": "mysqltestserver.database.mysql.azure.com",
"highAvailability": {
"mode": "ZoneRedundant",
"standbyAvailabilityZone": "3",
"state": "Healthy"
},
"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_D2ds_v4",
"tier": "GeneralPurpose"
},
"tags": {
"num": "1"
}
}
定义
Backup
服务器的存储配置文件属性
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| backupIntervalHours |
integer (int32) |
服务器的备份间隔小时数。 |
|
| backupRetentionDays |
integer (int32) |
服务器的备份保留日。 |
|
| earliestRestoreDate |
string (date-time) |
最早的还原点创建时间(ISO8601格式) |
|
| geoRedundantBackup | Disabled |
是否启用异地冗余备份。 |
BatchOfMaintenance
启用服务器的自定义托管维护时段时的维护批次。
| 值 | 说明 |
|---|---|
| Default | |
| Batch1 | |
| Batch2 |
createdByType
创建资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
CreateMode
创建新的 MySQL 服务器的模式。
| 值 | 说明 |
|---|---|
| Default | |
| PointInTimeRestore | |
| Replica | |
| GeoRestore |
DataEncryption
cmk 的日期加密。
| 名称 | 类型 | 说明 |
|---|---|---|
| geoBackupKeyURI |
string |
异地备份密钥 URI,因为密钥保管库不能跨区域,需要与异地备份位于同一区域中的 cmk |
| geoBackupUserAssignedIdentityId |
string |
异地备份用户标识资源 ID 作为标识不能跨区域,需要与异地备份位于同一区域中的标识 |
| primaryKeyURI |
string |
主键 URI |
| primaryUserAssignedIdentityId |
string |
主要用户标识资源 ID |
| type |
密钥类型,用于启用 cmk 的 AzureKeyVault、用于禁用 cmk 的 SystemManaged。 |
DataEncryptionType
密钥类型,用于启用 cmk 的 AzureKeyVault、用于禁用 cmk 的 SystemManaged。
| 值 | 说明 |
|---|---|
| AzureKeyVault | |
| SystemManaged |
EnableStatusEnum
用于指示值是“Enabled”还是“Disabled”的枚举
| 值 | 说明 |
|---|---|
| Enabled | |
| Disabled |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
HighAvailability
服务器的高可用性属性
| 名称 | 类型 | 说明 |
|---|---|---|
| mode |
服务器的高可用性模式。 |
|
| standbyAvailabilityZone |
string |
备用服务器的可用性区域。 |
| state |
服务器高可用性的状态。 |
HighAvailabilityMode
服务器的高可用性模式。
| 值 | 说明 |
|---|---|
| Disabled | |
| ZoneRedundant | |
| SameZone |
HighAvailabilityState
服务器高可用性的状态。
| 值 | 说明 |
|---|---|
| NotEnabled | |
| CreatingStandby | |
| Healthy | |
| FailingOver | |
| RemovingStandby |
ImportSourceProperties
导入源相关属性。
| 名称 | 类型 | 说明 |
|---|---|---|
| dataDirPath |
string |
存储中的数据目录的相对路径。 |
| sasToken |
string (password) |
用于访问源存储的 Sas 令牌。 SAS 令牌需要读取和列出权限。 |
| storageType |
导入源的存储类型。 |
|
| storageUrl |
string |
导入源存储的 URI。 |
ImportSourceStorageType
导入源的存储类型。
| 值 | 说明 |
|---|---|
| AzureBlob |
MaintenancePolicy
服务器的维护策略。
| 名称 | 类型 | 说明 |
|---|---|---|
| patchStrategy |
此服务器的修补策略 |
MaintenanceWindow
服务器的维护时段。
| 名称 | 类型 | 说明 |
|---|---|---|
| batchOfMaintenance |
启用服务器的自定义托管维护时段时的维护批次。 |
|
| customWindow |
string |
指示是启用还是禁用自定义窗口 |
| dayOfWeek |
integer (int32) |
维护时段的星期几 |
| startHour |
integer (int32) |
维护时段的开始时间 |
| startMinute |
integer (int32) |
维护时段的开始时间 |
ManagedServiceIdentityType
托管服务标识的类型。
| 值 | 说明 |
|---|---|
| UserAssigned |
MySQLServerIdentity
用于配置自带密钥标识的属性
| 名称 | 类型 | 说明 |
|---|---|---|
| principalId |
string |
KeyVault 中的 ObjectId |
| tenantId |
string |
KeyVault 中的 TenantId |
| type |
托管服务标识的类型。 |
|
| userAssignedIdentities |
<string,
User |
用户分配标识的元数据。 |
MySQLServerSku
与服务器相关的计费信息属性。
| 名称 | 类型 | 说明 |
|---|---|---|
| name |
string |
sku 的名称,例如Standard_D32s_v3。 |
| tier |
特定 SKU 的层,例如 GeneralPurpose。 |
Network
服务器的网络相关属性
| 名称 | 类型 | 说明 |
|---|---|---|
| delegatedSubnetResourceId |
string |
用于为服务器设置 vnet 的委托子网资源 ID。 |
| privateDnsZoneResourceId |
string |
专用 DNS 区域资源 ID。 |
| publicNetworkAccess |
是否允许此服务器访问公用网络。 当服务器具有 VNet 集成时,值为“Disabled”。 |
PatchStrategy
用于指示服务器的修补策略的枚举
| 值 | 说明 |
|---|---|
| Regular | |
| VirtualCanary |
PrivateEndpoint
专用终结点资源。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
专用终结点的 ARM 标识符。 |
PrivateEndpointConnection
专用终结点连接资源。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string (arm-id) |
资源的完全限定资源 ID。 例如“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
| name |
string |
资源的名称 |
| properties.groupIds |
string[] |
专用终结点资源的组 ID。 |
| properties.privateEndpoint |
专用终结点资源。 |
|
| properties.privateLinkServiceConnectionState |
有关服务使用者与提供程序之间的连接状态的信息集合。 |
|
| properties.provisioningState |
专用终结点连接资源的预配状态。 |
|
| systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
|
| type |
string |
资源类型。 例如,“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
PrivateEndpointConnectionProvisioningState
当前预配状态。
| 值 | 说明 |
|---|---|
| Succeeded | |
| Creating | |
| Deleting | |
| Failed |
PrivateEndpointServiceConnectionStatus
专用终结点连接状态。
| 值 | 说明 |
|---|---|
| Pending | |
| Approved | |
| Rejected |
PrivateLinkServiceConnectionState
有关服务使用者与提供程序之间的连接状态的信息集合。
| 名称 | 类型 | 说明 |
|---|---|---|
| actionsRequired |
string |
一条消息,指示服务提供商上的更改是否需要对使用者进行任何更新。 |
| description |
string |
批准/拒绝连接的原因。 |
| status |
指示连接是否已被服务的所有者批准/拒绝/删除。 |
ReplicationRole
复制角色。
| 值 | 说明 |
|---|---|
| None | |
| Source | |
| Replica |
Server
表示服务器。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string (arm-id) |
资源的完全限定资源 ID。 例如“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
| identity |
服务器的 cmk 标识。 |
|
| location |
string |
资源所在的地理位置 |
| name |
string |
资源的名称 |
| properties.administratorLogin |
string |
管理员的服务器登录名。 只能在创建服务器时指定(并且是创建所必需的)。 |
| properties.administratorLoginPassword |
string (password) |
管理员登录名的密码(创建服务器时需要)。 |
| properties.availabilityZone |
string |
服务器的可用性区域信息。 |
| properties.backup |
备份服务器的相关属性。 |
|
| properties.createMode |
创建新的 MySQL 服务器的模式。 |
|
| properties.dataEncryption |
CMK 的数据加密。 |
|
| properties.databasePort |
integer (int32) |
服务器数据库端口。 只能在创建服务器时指定。 |
| properties.fullVersion |
string |
主要版本和实际引擎版本 |
| properties.fullyQualifiedDomainName |
string |
服务器的完全限定域名。 |
| properties.highAvailability |
服务器的高可用性相关属性。 |
|
| properties.importSourceProperties |
从存储导入的源属性。 |
|
| properties.maintenancePolicy |
服务器的维护策略。 |
|
| properties.maintenanceWindow |
服务器的维护时段。 已知问题:无法在服务器创建期间设置,也不能在服务器更新期间使用其他属性进行更新;必须单独更新。 |
|
| properties.network |
服务器的网络相关属性。 |
|
| properties.privateEndpointConnections |
服务器的 PrivateEndpointConnections 相关属性。 |
|
| properties.replicaCapacity |
integer (int32) minimum: 0 |
主服务器可以拥有的最大副本数。 |
| properties.replicationRole |
复制角色。 |
|
| properties.restorePointInTime |
string (date-time) |
还原点创建时间(ISO8601格式),指定要从中还原的时间。 |
| properties.sourceServerResourceId |
string |
源 MySQL 服务器 ID。 |
| properties.state |
服务器的状态。 |
|
| properties.storage |
服务器的存储相关属性。 |
|
| properties.version |
MySQL 的主要版本。 8.0.21 代表 MySQL 8.0、5.7.44 代表 MySQL 5.7 |
|
| sku |
服务器的 SKU(定价层)。 |
|
| systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
|
| tags |
object |
资源标记。 |
| type |
string |
资源类型。 例如,“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
ServerSkuTier
特定 SKU 的层,例如 GeneralPurpose。
| 值 | 说明 |
|---|---|
| Burstable | |
| GeneralPurpose | |
| MemoryOptimized |
ServerState
服务器的状态。
| 值 | 说明 |
|---|---|
| Ready | |
| Dropping | |
| Disabled | |
| Starting | |
| Stopping | |
| Stopped | |
| Updating |
ServerVersion
服务器的主要版本。 8.0.21 代表 MySQL 8.0、5.7.44 代表 MySQL 5.7
| 值 | 说明 |
|---|---|
| 5.7 | |
| 8.0.21 |
Storage
服务器的存储配置文件属性
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| autoGrow | Disabled |
启用存储自动增长。 |
|
| autoIoScaling | Enabled |
启用 IO 自动缩放。 |
|
| iops |
integer (int32) |
服务器的存储 IOPS。 |
|
| logOnDisk | Disabled |
启用登录磁盘。 |
|
| storageRedundancy | LocalRedundancy |
服务器存储的冗余类型。 参数用于服务器创建。 |
|
| storageSizeGB |
integer (int32) |
服务器允许的最大存储大小。 |
|
| storageSku |
string |
服务器存储的 SKU 名称。 |
StorageRedundancyEnum
服务器存储的冗余类型。 参数用于服务器创建。
| 值 | 说明 |
|---|---|
| LocalRedundancy | |
| ZoneRedundancy |
systemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
| createdBy |
string |
创建资源的标识。 |
| createdByType |
创建资源的标识的类型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |
UserAssignedIdentity
用户分配标识的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| clientId |
string |
用户分配标识的客户端 ID |
| principalId |
string |
用户分配标识的主体 ID |