Querying Roles
Function
This API is used to query roles of users.
- Before calling an API, you need to understand the API in Authentication.
URI
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Project ID of a tenant in a region.
To obtain it, refer to Obtaining a Project ID.
instance_id
Yes
Instance ID.
Table 2 Query parameters Parameter
Mandatory
Type
Description
user_name
No
String
Username. If this parameter is specified, the set of roles that can be granted to the user is returned.
Request
None
Example Request
Query roles of a user.
GET https://rds.ap-southeast-1.myhuaweicloud.com/v3/8b3d99b2fb1148c69be8fe37bb896f27/instances/51986c9a48df43839a3ba300d6c5e91fin03/roles?user_name=user1
Response
- Normal response
Table 3 Parameters Parameter
Type
Description
roles
Array of strings
Role information.
- Example normal response
{ "roles" : [ "user3", "user4" ] }
- Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, 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