{"base_path":"/","components":null,"consumes":"[\"application/json\"]","definitions":{"DBMSuccessRsp":{"properties":{"resp":{"description":"操作结果。","example":"successful","type":"string"}},"required":["resp"]},"ErrorResponse":{"properties":{"error_code":{"description":"错误码。","example":"DBS.200022","type":"string"},"error_msg":{"description":"错误消息。","example":"实例名称已存在。","type":"string"}},"required":["error_code","error_msg"]},"PostgresqlGrantRequest":{"properties":{"db_name":{"description":"数据库名称。\n\n数据库名称在1到63个字符之间,由字母、数字、或下划线组成,不能包含其他特殊字符,不能以“pg”和数字开头,且不能和RDS for PostgreSQL模板库重名。\n\nRDS for PostgreSQL模板库包括postgres, template0 ,template1。","type":"string"},"users":{"description":"每个元素都是与数据库相关联的帐号。单次请求最多支持50个元素。","items":{"$ref":"#/definitions/PostgresqlUserWithPrivilege"},"maxItems":50,"type":"array"}},"required":["db_name","users"]},"PostgresqlUserWithPrivilege":{"description":"用户及其权限。","properties":{"name":{"description":"数据库帐号名称。\n\n数据库帐号名称在1到63个字符之间,由字母、数字、或下划线组成,不能包含其他特殊字符,不能以“pg”和数字开头,不能和系统用户名称相同且帐号名称必须存在。\n\n系统用户包括“rdsAdmin”,“ rdsMetric”, “rdsBackup”, “rdsRepl”,“ rdsProxy”, “rdsDdm”。","type":"string"},"readonly":{"description":"数据库帐号权限。\n- true:只读。\n- false:可读可写。","type":"boolean"},"schema_name":{"description":"schema名称。\n\nschema名称在1到63个字符之间,由字母、数字、或下划线组成,不能包含其他特殊字符,不能以“pg”和数字开头,不能和RDS for PostgreSQL模板库重名,且schema名称必须存在。\n\nRDS for PostgreSQL模板库包括postgres, template0 ,template1。","type":"string"}},"required":["name","readonly","schema_name"]}},"description":null,"group_id":"b7735f867ef44182af9eb77490a46fbf","host":"rds.cn-north-4.myhuaweicloud.com","id":"7bbf9b8be2bf446ebfc2360ad48198c3","info_version":"v3","method":"post","name":"AllowDbPrivilege","parameters":{},"paths":{"/v3/{project_id}/instances/{instance_id}/db_privilege":{"post":{"description":"在指定实例的数据库中, 设置帐号的权限。","operationId":"AllowDbPrivilege","parameters":[{"description":"用户Token。","in":"header","name":"x-auth-token","required":false,"type":"string","x-example":"******"},{"description":"语言","in":"header","name":"X-Language","required":false,"type":"string","x-example":"zh-cn"},{"description":"项目ID。","in":"path","name":"project_id","required":true,"type":"string","x-example":"619d3e78f61b4be68bc5aa0b59edcf7b"},{"description":"实例ID。","in":"path","name":"instance_id","required":true,"type":"string","x-example":"e73893ef73754465a8bd2e0857bbf13ein01"},{"description":"请求体。","in":"body","name":"GrantRequest","required":true,"schema":{"$ref":"#/definitions/PostgresqlGrantRequest"}}],"responses":{"200":{"description":"Success.","examples":{"application/json":{"resp":"successful"}},"schema":{"$ref":"#/definitions/DBMSuccessRsp"}},"default":{"description":"Client or server error.","schema":{"$ref":"#/definitions/ErrorResponse"}}},"summary":"授权数据库帐号","tags":["管理数据库和用户(PostgreSQL)"],"x-constraint":"- 实例在创建、变更规格、修改端口、冻结、异常等状态下不能执行该操作。\n- 创建的只读用户对public模式默认具有create和usage权限。","x-request-examples-1":{"db_name":"rds_test","users":[{"name":"rds","readonly":false,"schema_name":"teste123"},{"name":"rds001","readonly":true,"schema_name":"teste123"},{"name":"rds002","readonly":false,"schema_name":"teste123"}]},"x-request-examples-text-1":{"db_name":"rds_test","users":[{"name":"rds","readonly":false,"schema_name":"teste123"},{"name":"rds001","readonly":true,"schema_name":"teste123"},{"name":"rds002","readonly":false,"schema_name":"teste123"}]},"x-request-examples-url-1":"POST https://rds.cn-north-1.myhuaweicloud.com/v3/054e292c9880d4992f02c0196d3ea468/instances/3d39c18788b54a919bab633874c159dfin01/db_privilege","x-support-sdk":"Y"}}},"product_short":"RDS","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"授权数据库帐号","tags":"管理数据库和用户(PostgreSQL)","uri":null,"version":"2.0"}