调用 CreateDBAccount 接口创建账号。
同步请求。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
InstanceId | String | 是 | postgres-ca7b7019**** | 实例 ID。 |
AccountName | String | 是 | testuser1 | 数据库账号名称。账号名称的设置规则如下:
|
AccountPassword | String | 是 | Test@123456 | 数据库账号的密码。数据库账号密码的设置规则如下:
|
AccountType | String | 是 | Normal | 数据库账号类型,取值范围如下:
|
AccountPrivileges | String | 否 | Inherit,Login,CreateRole,CreateDB | 账号权限信息。多个权限中间以英文逗号(,)分隔。取值:
说明
|
null
POST /?Action=CreateDBAccount&Version=2022-01-01 HTTP/1.1 Content-Type: application/json Host: rds.volcengineapi.com X-Date: 20231002T101010Z Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_postgresql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458**** { "InstanceId": "postgres-ca7b7019****", "AccountName": "yy_123", "AccountType": "Super", "AccountPassword": "Root123@", "AccountPrivileges": "CreateDB,CreateRole,Inherit,Login" }
{ "ResponseMetadata": { "RequestId": "2023080216414436E7C5AAAC0F06F41091", "Action": "CreateDBAccount", "Version": "2022-01-01", "Service": "rds_postgresql", "Region": "cn-beijing" }, "Result": null }