You need to enable JavaScript to run this app.
导航
SwitchDBInstanceHA
最近更新时间:2024.01.09 17:37:18首次发布时间:2023.08.14 13:15:55

调用 SwitchDBInstanceHA 接口手动切换指定 MySQL 实例的主备节点。

请求类型

异步请求。

请求参数

名称类型是否必选示例值描述
InstanceIdStringmysql-46609cf2****实例 ID。
NodeIdStringmysql-46609cf2****-1备节点 ID。

返回参数

null

请求示例

POST /?Action=SwitchDBInstanceHA&Version=2022-01-01 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: rds.volcengineapi.com
X-Date: 20230810T101010Z
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20230810/cn-beijing/rds_mysql/request, SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c645a****
{
    "InstanceId":"mysql-d4942fd7****",
    "NodeId":"mysql-d4942fd7****-1"
}

返回示例

正常返回示例

{
    "ResponseMetadata": {
        "RequestId": "20230810110301C4BCE9ED7378F7E82706",
        "Action": "SwitchDBInstanceHA",
        "Version": "2022-01-01",
        "Service": "rds_mysql",
        "Region": "cn-beijing"
    },
    "Result": null
}

错误码

更多详情,请参见错误码