Managed Instances - Failover
故障转移托管实例。
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/failover?api-version=2025-01-01
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/failover?api-version=2025-01-01&replicaType={replicaType}
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
managed
|
path | True |
string |
托管实例的名称。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 此名称不区分大小写。 |
|
subscription
|
path | True |
string (uuid) |
目标订阅的 ID。 该值必须是 UUID。 |
|
api-version
|
query | True |
string minLength: 1 |
用于此作的 API 版本。 |
|
replica
|
query |
要故障转移的副本的类型。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
请求已成功。 |
|
| 202 Accepted |
已接受资源作。 标头
|
|
| Other Status Codes |
意外的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow.
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
Failover a managed instance.
示例请求
POST https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/instanceName/failover?api-version=2025-01-01&replicaType=Primary
示例响应
Location: https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/managedInstanceOperationResults/00000000-1111-2222-3333-444444444444?api-version=2019-06-01-preview
定义
| 名称 | 说明 |
|---|---|
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Error |
错误响应 |
|
Replica |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
附加信息。 |
| type |
string |
附加信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
ReplicaType
| 值 | 说明 |
|---|---|
| Primary |
主要 |
| ReadableSecondary |
可读次级 |