You need to enable JavaScript to run this app.
导航

ResetDBAccount

最近更新时间2024.01.05 16:55:47

首次发布时间2023.02.02 17:41:21

调用 ResetDBAccount 接口重置账号密码。

请求类型

同步请求。

请求参数

名称类型是否必选示例值描述
InstanceIdStringmysql-r3xq0zdl****实例 ID。
AccountNameStringtestuser数据库账号名称。
HostString%账号访问数据库的 IP 地址。默认值为 %

AccountPassword

String

Test@123456

为数据库账号重置的新密码。
密码规则如下:

  • 长度为 8~32 个字符。
  • 由大写字母、小写字母、数字、特殊字符中的至少三种组成。
  • 特殊字符为 !@#$%^&*()_+-=

返回参数

null

请求示例

POST /?Action=ResetAccount&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=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c645a****


{
    "InstanceId":"mysql-4674157d****",
    "AccountName":"test",
    "Host":"%,
    "AccountPassword":"test@1234"
}

返回示例

正常返回示例

{
    "ResponseMetadata":{
        "RequestId":"2023011021021955C4F587DF528CE59EB7",
        "Action":"ResetAccount",
        "Version":"2022-01-01",
        "Service":"rds_mysql",
        "Region":"cn-beijing"
    },
    "Result":null
}

错误码

更多详情,请参见错误码