全部产品
Search
文档中心

资源管理:UpdateAccount - 修改成员

更新时间:Aug 28, 2026

调用UpdateAccount修改成员名称或切换成员类型。

接口说明

前提条件

  • 为确保系统可以记录到管理操作的具体操作者,请使用管理账号下具有资源目录管理权限(AliyunResourceDirectoryFullAccess)的 RAM 用户或 RAM 角色调用本 API。

  • 资源账号切换为云账号时需要满足的条件,请参见资源账号切换为云账号

  • 云账号切换为资源账号时需要满足的条件,请参见云账号切换为资源账号

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求参数

名称

类型

必填

描述

示例值

NewDisplayName

string

新的成员名称。

说明

NewDisplayNameNewAccountType任选其一设置,不能同时设置。

admin

NewAccountType

string

新的成员类型。取值:

  • ResourceAccount:将指定的云账号切换为资源账号。

  • CloudAccount:将指定的资源账号切换为云账号。

说明

NewDisplayNameNewAccountType任选其一设置,不能同时设置。

ResourceAccount

AccountId

string

成员 ID。

12323344****

DryRun

boolean

是否只预检此次请求。取值:

  • true:发送检查请求,不会修改成员信息。检查项包括成员状态是否可以修改、成员是否具有安全信息等。如果检查不通过,则返回对应错误码。

  • false(默认):发送正常请求,通过检查后直接修改成员。

false

返回参数

名称

类型

描述

示例值

object

返回参数。

Account

object

成员信息。

Status

string

成员加入状态。取值:

  • CreateSuccess:创建成功。

  • InviteSuccess:邀请成功。

  • Removed:已移除。

  • SwitchSuccess:切换成功。

CreateSuccess

Type

string

成员类型。取值:

  • CloudAccount:云账号。

  • ResourceAccount:资源账号。

ResourceAccount

DisplayName

string

成员名称。

admin

FolderId

string

资源夹 ID。

fd-bVaRIG****

ResourceDirectoryId

string

资源目录 ID。

rd-k3****

JoinTime

string

成员加入时间(UTC 时间)。

2015-01-23T12:33:18Z

AccountId

string

成员 ID。

12323344****

JoinMethod

string

成员加入方式。取值:

  • invited:邀请。

  • created:创建。

created

ModifyTime

string

成员修改时间(UTC 时间)。

2015-01-23T12:33:18Z

AccountName

string

阿里云账号名称。

ecs-manager@aliyun.com

RequestId

string

请求 ID。

9B34724D-54B0-4A51-B34D-4512372FE1BE

示例

正常返回示例

JSON格式

{
  "Account": {
    "Status": "CreateSuccess",
    "Type": "ResourceAccount",
    "DisplayName": "admin",
    "FolderId": "fd-bVaRIG****",
    "ResourceDirectoryId": "rd-k3****",
    "JoinTime": "2015-01-23T12:33:18Z",
    "AccountId": "12323344****",
    "JoinMethod": "created",
    "ModifyTime": "2015-01-23T12:33:18Z",
    "AccountName": "ecs-manager@aliyun.com"
  },
  "RequestId": "9B34724D-54B0-4A51-B34D-4512372FE1BE"
}

错误码

HTTP status code

错误码

错误信息

描述

404 EntityNotExists.ResourceDirectory The resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account.
404 EntityNotExists.Account This resource directory account does not exist.
409 InvalidParameter.Account.DisplayName.AlreadyUsed The displayname of account has been used.
409 MissingDisplayNameOrAccountType Either display name or account type must be specified.
409 AccountTypeMismatch The type or status of the member account cannot satisfy the current operation.
409 PrimaryAkInUse The account has the primary AK in use.
409 MissingSecurityInfo Security information is missing.
409 LegalEntityDifferent The account legal entity is different from the one of the Management Account.
409 CallerIdentityError Please use the RAM user or role of the Management Account.

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情