Domain name for API request: mongodb.intl.tencentcloudapi.com.
Obtains the list of roles
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: DescribeInstanceRoles. |
| Version | Yes | String | Common Params. The value used for this API: 2019-07-25. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| InstanceId | Yes | String | Instance id |
| Database | No | String | Database name. If it is empty, query the role of all databases. |
| RoleType.N | No | Array of String | Role type: builtin_database - built-in database role, builtin_cluster - built-in cluster role, custom - custom role. Query all if left empty. |
| RoleName | No | String | Role name. Query all roles if left empty. |
| SearchKey | No | String | Common search keywords, fuzzy match inheritable roles and permissions relevant database name, role name, Action name, etc. |
| OrderBy | No | String | Sorting field, supports: RoleName, defaults to RoleName |
| OrderType | No | String | Sorting method: asc-ascending, desc-descending, defaults to asc |
| Offset | No | Integer | Pagination offset, defaults to 0 |
| Limit | No | Integer | Number of items per page. Default: 20. Maximum: 100. |
| Parameter Name | Type | Description |
|---|---|---|
| Total | Integer | Total. |
| Roles | Array of RoleInfo | List of characters. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: mongodb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeInstanceRoles
<Common request parameters>
{
"InstanceId": "cmgo-********",
"Database": "admin",
"RoleType": [
"builtin_database"
],
"RoleName": "test1",
"SearchKey": "t",
"OrderBy": "RoleName",
"OrderType": "desc",
"Offset": 0,
"Limit": 10
}
{
"Response": {
"Roles": [],
"Total": 0,
"RequestId": "c746232b-75d3-4c34-aeef-60af9fd02ab6"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| InternalError | Internal error. |
| InvalidParameter | Parameter error |
| InvalidParameterValue.NotFoundInstance | The instance was not found. |
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários