文档首页/ 组织 Organizations/ API参考/ API/ 账号管理/ 查询账号信息 - ShowAccount
更新时间:2025-10-30 GMT+08:00

查询账号信息 - ShowAccount

功能介绍

查询有关指定账号的信息。此操作只能由组织的管理账号或作为服务委托管理员的成员账号调用。

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

授权信息

账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限。

  • 如果使用角色与策略授权,具体权限要求请参见权限和授权项
  • 如果使用身份策略授权,需具备如下身份策略权限。

    授权项

    访问级别

    资源类型(*为必须)

    条件键

    别名

    依赖的授权项

    organizations:accounts:get

    Read

    account *

    g:ResourceTag/<tag-key>

    -

    -

URI

GET /v1/organizations/accounts/{account_id}

表1 路径参数

参数

是否必选

参数类型

描述

account_id

String

账号的唯一标识符(ID)。

表2 Query参数

参数

是否必选

参数类型

描述

with_register_contact_info

Boolean

是否返回账号邮箱、手机号信息。若此参数为True,Limit最多200。

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

X-Security-Token

String

如果正在使用临时安全凭据,则此header是必需的,该值是临时安全凭据的安全令牌(会话令牌)。

响应参数

状态码:200

表4 响应Body参数

参数

参数类型

描述

account

AccountDto object

包含组织成员的账号的有关信息。

表5 AccountDto

参数

参数类型

描述

id

String

账号的唯一标识符(ID)。

urn

String

账号的统一资源名称。

join_method

String

账号加入组织的方式。invited:邀请加入,created:创建加入。

status

String

账号当前的状态。active:有效; suspended:已关闭; pending_closure:关闭中。

joined_at

String

账号加入组织的日期。

name

String

账号名称

mobile_phone

String

手机号码

intl_number_prefix

String

手机号前缀。

email

String

与此账号关联的电子邮件地址。

description

String

描述信息。

请求示例

查询账号信息

GET /v1/organizations/accounts/{account_id}

响应示例

状态码:200

Successful.

{
  "account" : {
    "id" : "05261f923e80d3890f33c0056e9b3f80",
    "urn" : "organizations::0a6d25d23900d45c0faac010e0fb4de0:account:o-fhkmi6mek7wlqdp6nideqhb47qwtjdsv/05261f923e80d3890f33c0056e9b3f80",
    "join_method" : "invited",
    "status" : "active",
    "joined_at" : "2022-08-24T06:41:15Z",
    "name" : "paas_iam_573331",
    "description" : "string",
    "mobile_phone" : "null,",
    "intl_number_prefix" : "null,",
    "email" : null
  }
}

状态码

状态码

描述

200

Successful.

错误码

请参见错误码