Listing ACL Accounts
Function
This API is used to query the ACL account list.
URI
GET /v2/{project_id}/instances/{instance_id}/accounts
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition: Project ID. For details, see Obtaining a Project ID. Constraints: N/A Range: N/A Default Value: N/A |
| instance_id | Yes | String | Definition: Instance ID. It can be viewed on the instance details page on the DCS console. Constraints: N/A Range: N/A Default Value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| accounts | Array of AclAccountResp objects | Definition: ACL user list. |
| Parameter | Type | Description |
|---|---|---|
| account_id | String | Definition: ACL user ID. Range: N/A |
| account_name | String | Definition: ACL username. Range: N/A |
| account_type | String | Definition: ACL user type. Range: normal: normal user default: default user |
| instance_id | String | Definition: ID of the instance to which the account belongs. Range: N/A |
| status | String | Definition: ACL user status. Range:
|
| account_role | String | Definition: User permissions. Range: read: read-only write: read and write |
| description | String | Definition: User description. Range: N/A |
| error_code | String | Definition: Error code. This parameter is not used currently and is set to null. Range: N/A |
| account_read_policy | String | Definition: Read requests are routed to master or replica nodes. Range:
|
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_msg | String | Definition: Error message. Range: N/A |
| error_code | String | Definition: Error code. Range: For details, see Error Codes. |
| error_ext_msg | String | Definition: Extended error information. This parameter is not used currently and is set to null. Range: N/A |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_msg | String | Definition: Error message. Range: N/A |
| error_code | String | Definition: Error code. Range: For details, see Error Codes. |
| error_ext_msg | String | Definition: Extended error information. This parameter is not used currently and is set to null. Range: N/A |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_msg | String | Definition: Error message. Range: N/A |
| error_code | String | Definition: Error code. Range: For details, see Error Codes. |
| error_ext_msg | String | Definition: Extended error information. This parameter is not used currently and is set to null. Range: N/A |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| error_msg | String | Definition: Error message. Range: N/A |
| error_code | String | Definition: Error code. Range: For details, see Error Codes. |
| error_ext_msg | String | Definition: Extended error information. This parameter is not used currently and is set to null. Range: N/A |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_msg | String | Definition: Error message. Range: N/A |
| error_code | String | Definition: Error code. Range: For details, see Error Codes. |
| error_ext_msg | String | Definition: Extended error information. This parameter is not used currently and is set to null. Range: N/A |
Example Requests
GET https://{dcs_endpoint}/v2/{project_id}/instances/{instance_id}/accounts Example Responses
Status code: 200
ACL accounts listed successfully.
{
"accounts" : [ {
"account_id" : "cb067c67-f08b-4024-af14-f78b58b76a44",
"account_name" : "roUser",
"account_type" : "normal",
"instance_id" : "10fda556-51c3-4cfa-ab6f-37667428da6e",
"status" : "available",
"account_role" : "read",
"description" : "This is a read-only account.",
"error_code" : null
} ]
} Status code: 400
Invalid request.
{
"error_code" : "DCS.4964",
"error_msg" : "Failed to query acl list."
} Status Codes
| Status Code | Description |
|---|---|
| 200 | ACL accounts listed successfully. |
| 400 | Invalid request. |
| 401 | Authentication failed. |
| 403 | Request rejected. |
| 404 | Incorrect path. |
| 500 | Internal error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot