Querying Agency Details

Updated on 2023-09-14 GMT+08:00

Function

This API is provided for the administrator to query the details about an agency.

The API can be called using both the global endpoint and region-specific endpoints.

URI

GET /v3.0/OS-AGENCY/agencies/{agency_id}

Table 1 URI parameters

Parameter

Mandatory

Type

Description

agency_id

Yes

String

Agency ID. For details about how to obtain the agency ID, see Obtaining Account, IAM User, Group, Project, Region, and Agency Information.

Request Parameters

Table 2 Parameters in the request header

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Fill application/json;charset=utf8 in this field.

X-Auth-Token

Yes

String

Token with the iam:agencies:getAgency permission or Security Administrator permissions.

For details about fine-grained permissions, see Actions.

Response Parameters

Table 3 Parameters in the response body

Parameter

Type

Description

agency

object

Agency information.

Table 4 agency

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. Unit: hour.

  • FOREVER/null: The agency has unlimited validity.
  • 24: The agency is valid for 24 hours.
  • XXX: The agency has limited validity of, for example, 480 hours.

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.

trust_domain_id

String

ID of the delegated account.

trust_domain_name

String

Name of the delegated account.

Example Request

Request for querying agency details

GET https://iam.myhuaweicloud.eu/v3.0/OS-AGENCY/agencies/{agency_id}

Example Response

Status code: 200

The request is successful.

{
	"agency":{
		"create_time":"2020-01-04T03:37:16.000000",
		"description":"",
		"domain_id":"d78cbac186b744899480f25bd...8",
		"duration":"FOREVER",
		"id":"0760a9e2a60026664f1fc0031f9f205e",
		"name":"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

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback