云数据库 RDS-授权数据库账号的操作权限:请求示例

时间:2024-11-01 14:53:23

请求示例

  • 对指定账号设置CREATEDB LOG IN权限。
    POST https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/f569f1358436479dbcba8603c32cc4aein03/db-user-privilege
    {
    "user_name":"test123",
    "authorization_type":"ROLE",
    "privileges":["CREATEDB","LOGIN"]
    }
  • 对指定账号回收CREATEDBLOGIN权限。
    {
    "user_name":"test123",
    "authorization_type":"RECYCLING_ROLE",
    "privileges":["NOCREATEDB","NOLOGIN"]
    }
  • 对指定账号授予系统角色pg_monitor
    {
    "user_name":"test123",
    "authorization_type":"SYSTEM_ROLE",
    "privileges":["pg_monitor"]
    }
  • 对指定账号回收系统角色pg_monitor
    {
    "user_name":"test123",
    "authorization_type":"RECYCLING_SYSTEM_ROLE",
    "privileges":["pg_monitor"]
    }
support.huaweicloud.com/api-rds/rds_11_0015.html