Listing Agencies
Function
This API is provided for the administrator to list agencies that match specified conditions.
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-AGENCY/agencies
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
domain_id |
Yes |
String |
ID of the delegating account. For details about how to obtain the account ID, see Obtaining Account, IAM User, Group, Project, Region, and Agency Information.
NOTE:
domain_id is not required if X-Auth-Token is set to a token with fine-grained permissions. |
name |
No |
String |
Agency name. For details about how to obtain the agency name, see Obtaining Account, IAM User, Group, Project, Region, and Agency Information. |
trust_domain_id |
No |
String |
ID of the delegated account. For details about how to obtain the account ID, see Obtaining Account, IAM User, Group, Project, Region, and Agency Information. |
page |
No |
Integer |
Page number for pagination query. The minimum value is 1. This parameter must be used together with per_page. |
per_page |
No |
Integer |
Number of data records to be displayed on each page. The value range is from 1 to 500. This parameter must be used together with page. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
Fill application/json;charset=utf8 in this field. |
X-Auth-Token |
Yes |
String |
Token with Security Administrator permissions or policy permissions. |
Response Parameters
Parameter |
Type |
Description |
---|---|---|
Array of objects |
Agency information. |
Parameter |
Type |
Description |
---|---|---|
create_time |
String |
Time when the agency was created.
NOTE:
The value is a UTC time in the YYYY-MM-DDTHH:mm:ss.ssssssZ format, for example, 2023-06-28T08:56:33.710000Z. For details about the date and timestamp formats, see ISO-8601. |
description |
String |
Description of the agency. |
domain_id |
String |
ID of the delegating account. |
duration |
String |
Validity period of the agency. FOREVER and null indicate that the agency has unlimited validity. ONEDAY indicates that the agency is valid only for one day. |
expire_time |
String |
Expiration time of the agency. The value null indicates that the agency has unlimited validity.
NOTE:
The value is a UTC time in the YYYY-MM-DDTHH:mm:ss.ssssssZ format, for example, 2023-06-28T08:56:33.710000Z. For details about the date and timestamp formats, see ISO-8601. |
id |
String |
Agency ID. |
name |
String |
Agency name. |
agency_urn |
String |
Agency URN. |
trust_domain_id |
String |
ID of the delegated account. |
trust_domain_name |
String |
Name of the delegated account. |
Example Request
Request for querying agencies in specified conditions
GET https://iam.myhuaweicloud.com/v3.0/OS-AGENCY/agencies?domain_id=0ae9c6993a2e47bb8c4c7a9bb82...
Example Response
Status code: 200
The request is successful.
{ "agencies": [ { "create_time": "2020-01-04T03:37:16.000000", "description": "", "domain_id": "d78cbac186b744899480f25b...8", "duration": "FOREVER", "expire_time": null, "id": "0760a9e2a60026664f1fc0031f9f2...", "name": "IAMAgency", "agency_urn": "iam::d78cbac186b744899480f25b...8:agency:IAMAgency", "trust_domain_id": "a2cd82a33fb043dc9304bf72...", "trust_domain_name": "IAMDomainB" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
The request is successful. |
401 |
Authentication failed. |
403 |
Access denied. |
404 |
The requested resource cannot be found. |
500 |
Internal server error. |
Error Codes
None
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