调用 ModifyDBInstanceGlobalReadOnly 接口为实例开启或关闭全局只读功能。
同步请求。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
InstanceId | String | 是 | mysql-db6d920e**** | 实例 ID。 |
GlobalReadOnly | Boolean | 是 | false | 是否为实例开启全局只读。取值:
|
null
POST /?Action=ModifyDBInstanceGlobalReadOnly&Version=2022-01-01 HTTP/1.1 Content-Type: application/json Host: rds.volcengineapi.com X-Date: 20211202T101010Z Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_mysql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458**** { "InstanceId": "mysql-db6d920e****", "GlobalReadOnly": false }
{ "ResponseMetadata": { "RequestId": "20241029211654E46A6B19EEDC6F07C8E7-b8ab19", "Action": "ModifyDBInstanceGlobalReadOnly", "Version": "2022-01-01", "Service": "rds_mysql", "Region": "cn-beijing" }, "Result": {} }
更多详情,请参见错误码。