Querying Users Directly Associated with an Enterprise Project
Function
This API is used to query the users directly associated with a specified enterprise project.
The API can be called using both the global endpoint and region-specific endpoints. For IAM endpoints, see Regions and Endpoints.
Debugging
You can debug this API in API Explorer.
URI
GET /v3.0/OS-PERMISSION/enterprise-projects/{enterprise_project_id}/users
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enterprise_project_id |
Yes |
String |
ID of the enterprise project to be queried. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Authenticated token with iam:permissions:listUsersForEnterpriseProject or Security Administrator permission. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
Array of objects |
User information. |
Parameter |
Type |
Description |
---|---|---|
domain_id |
String |
ID of the account which an authorized user belongs to. |
id |
String |
ID of the authorized user. |
name |
String |
Name of the authorized user. |
enabled |
Boolean |
Indicates whether the authorized user is enabled. The value can be true or false. The default value is true. |
description |
String |
Description of the authorized user. |
policy_num |
Integer |
Number of policies that have been assigned to the authorized user. |
lastest_policy_time |
Long |
Duration for which the user has been last associated with a policy in the enterprise project. |
Example Request
Request for querying users associated with an enterprise project
GET https://iam.myhuaweicloud.com/v3.0/OS-PERMISSION/enterprise-projects/{enterprise_project_id}/users
Example Response
Status code: 200
The request is successful.
{ "users" : [ { "domain_id" : "d78cbac186b744899480f25bd02...", "id" : "07667db96a00265f1fc0c003a...", "name" : "IAMUserA", "enabled" : true, "description" : "IAMDescriptionA", "policy_num" : 2, "lastest_policy_time" : 1589874427000 } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
The request is successful. |
400 |
Parameter error. |
401 |
Authentication failed. |
403 |
Access denied. |
404 |
The requested resource cannot be found. |
500 |
The system is abnormal. |
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