Help Center/ Identity and Access Management/ API Reference/ API/ Account Management/ Querying Account Information Accessible to an IAM User
Updated on 2024-07-30 GMT+08:00

Querying Account Information Accessible to an IAM User

Function

This API is used to query the account information that is accessible to a specified IAM user.

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/auth/domains

Request Parameters

Table 1 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

IAM user token (no special permission requirements).

Response Parameters

Table 2 Parameters in the response body

Parameter

Type

Description

domains

Array of objects

Account information.

links

Object

Resource link information.

Table 3 domains

Parameter

Type

Description

enabled

Boolean

Indicates whether an account is enabled. true (default value) indicates that the account is enabled. false indicates that the account is disabled.

id

String

Account ID.

name

String

Account name.

links

Object

Account resource link.

description

String

Description of the account.

Example Request

Request for querying account information accessible to an IAM user

GET https://iam.myhuaweicloud.com/v3/auth/domains

Example Response

Status code: 200

The request is successful.

{
    "domains": [
        {
            "description": "",
            "enabled": true,
            "id": "d78cbac186b744899480f25bd022f468",
            "links": {
                "self": "https://iam.myhuaweicloud.com/v3/domains/d78cbac186b744899480f25bd022f468"
            },
            "name": "IAMDomain"
        }
    ],
    "links": {
        "self": "https://iam.myhuaweicloud.com/v3/auth/domains"
    }
}

Status Codes

Status Code

Description

200

The request is successful.

400

Invalid parameters.

401

Authentication failed.

403

Access denied.

405

The method specified in the request is not allowed for the requested resource.

413

The request entity is too large.

500

Internal server error.

503

Service unavailable.

Error Codes

None