UpdateAccount - 修改成员

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

接口说明

前提条件

  • 为确保系统可以记录到管理操作的具体操作者,请使用管理账号下具有资源目录管理权限(AliyunResourceDirectoryFullAccess)的RAM用户或RAM角色调用本API。
  • 资源账号切换为云账号时需要满足的条件,请参见资源账号切换为云账号
  • 云账号切换为资源账号时需要满足的条件,请参见云账号切换为资源账号

调试

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

调试

授权信息

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

请求参数

名称类型必填描述示例值
NewDisplayNamestring

新的成员名称。

说明NewDisplayNameNewAccountType任选其一设置,不能同时设置。
admin
NewAccountTypestring

新的成员类型。取值:

  • ResourceAccount:将指定的云账号切换为资源账号。
  • CloudAccount:将指定的资源账号切换为云账号。
说明NewDisplayNameNewAccountType任选其一设置,不能同时设置。
ResourceAccount
AccountIdstring

成员ID。

12323344****

返回参数

名称类型描述示例值
object

返回参数。

Accountobject

成员信息。

Statusstring

成员加入状态。取值:

  • CreateSuccess:创建成功。
  • InviteSuccess:邀请成功。
  • Removed:已移除。
  • SwitchSuccess:切换成功。
CreateSuccess
Typestring

成员类型。取值:

  • CloudAccount:云账号。
  • ResourceAccount:资源账号。
ResourceAccount
DisplayNamestring

成员名称。

admin
FolderIdstring

资源夹ID。

fd-bVaRIG****
ResourceDirectoryIdstring

资源目录ID。

rd-k3****
JoinTimestring

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

2015-01-23T12:33:18Z
AccountIdstring

成员ID。

12323344****
JoinMethodstring

成员加入方式。取值:

  • invited:邀请。
  • created:创建。
created
ModifyTimestring

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

2015-01-23T12:33:18Z
AccountNamestring

阿里云账号名称。

ecs-manager@aliyun.com
RequestIdstring

请求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错误码错误信息描述
404EntityNotExists.ResourceDirectoryThe resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account.当前账号未启用资源目录,请先启用资源目录。
404EntityNotExists.AccountThis resource directory account does not exist.成员不存在,请先创建成员。
409InvalidParameter.Account.DisplayName.AlreadyUsedThe displayname of account has been used.显示名已被占用,请更换其他名称。
409MissingDisplayNameOrAccountTypeEither display name or account type must be specified.显示名或账号类型必须存在一个。
409AccountTypeMismatchThe type or status of the member account cannot satisfy the current operation.-
409PrimaryAkInUseThe account has the primary AK in use.-
409MissingSecurityInfoSecurity information is missing.-
409LegalEntityDifferentThe account legal entity is different from the one of the Management Account.账号的法律实体与管理账号不一致。
409CallerIdentityErrorPlease use the RAM user or role of the Management Account.请使用管理账号的RAM用户或角色进行操作。

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

变更历史

变更时间变更内容概要操作
暂无变更历史
阿里云首页 资源管理 相关技术圈