调用DescribeAccounts接口获取一个MongoDB实例下的账号列表。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|
Action | String | 是 | DescribeAccounts | 系统规定参数,取值:DescribeAccounts。 |
DBInstanceId | String | 是 | cb249298-8029-456a-xxxxxxxxxxxx | 实例ID。 |
AccessKeyId | String | 是 | 8hiE6GNfZFxxxxxxxxxxxx | 紫光云颁发给用户的访问服务所用的秘钥ID。 |
Signature | String | 是 | uC0wRWKW%2F8%2BFc%2xxxxxxxxxxxx | 紫光云颁发给用户的访问服务所用的签名ID。 |
返回参数 {#resultMapping .section}
名称 | 类型 | 示例值 | 描述 |
---|
RequestId | String | rm-uf6wjk5xxxxxxxxxx | 请求ID。 |
Result |
|
| DescribeAccounts的参数。 |
users | List |
| 账号列表。 |
└name | String | root | 账号名称。 |
└type | String | high | 账号类型 |
└databases | String | testdb | 数据库名称。 |
└└name | String | admin | 账号权限。 |
└└role | String | root | 所创建的账号在数据库下的权限。 |
示例 {#demo .section}
请求示例
http(s)://api.unicloud.com/dbaas?Action=DescribeAccounts&DBInstanceId=0a9f6840-104c-4f2f-a169-9e58b2xxxxxxx
&AccessKeyId=8hiE6GNfZFyxxxxxxx
&Signature=IiX4KCRYAAHuL4300x4j4Wxxxxxxx
&
正常返回示例
{ "RequestId": "25d1b16e-4cb1-46c7-8f58-8051b9434a96", "Result": { "users": [
{ "name": "root", "databases": [
{ "role": "root", "name": "admin"
}
], "type": "high"
}
]
}
}
错误码 { .section}
HttpCode | 错误码 | 错误信息 | 描述 |
---|
400 | Param.RequiredFieldIsNull | The specified params is null who Required field. | 必填参数传入为空。 |
400 | InstancesUnavailable.InstanceNull | The instance is Unavailable, Please check the instance. | 根本实例不可用,请检查实例是否正确。 |
500 | Unknown.InnerException | Some Exception open in Inner. | 内部错误。 |