调用PromoteResourceAccount将资源账号升级为云账号。

调试

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

请求参数

名称 类型 是否必选 示例值 描述
Action String PromoteResourceAccount

要执行的操作。取值:PromoteResourceAccount。

AccountId String 12323344****

需要升级的资源账号ID。

Email String someone@example.com

升级后的云账号登录邮箱。

返回数据

名称 类型 示例值 描述
Account Struct

成员信息。

AccountId String 12323344****

账号ID。

AccountName String someone@example.com

账号名称。

DisplayName String admin

成员名称。

FolderId String fd-bVaRIG****

资源夹ID。

JoinMethod String created

成员加入方式。

  • invited:邀请。
  • created:创建。
JoinTime String 2015-01-23T12:33:18Z

成员加入时间。

ModifyTime String 2015-01-23T12:33:18Z

成员修改时间。

RecordId String 06950264-3f0d-4ca9-82dd-6ee7a3d33d6b

账号记录ID。

ResourceDirectoryId String rd-k3****

资源目录ID。

Status String PromoteVerifying

成员加入状态。

  • CreateSuccess:创建成功。
  • CreateVerifying:创建确认中。
  • CreateFailed:创建失败。
  • CreateExpired:创建过期。
  • CreateCancelled:创建取消。
  • PromoteVerifying:升级确认中。
  • PromoteFailed:升级失败。
  • PromoteExpired:升级过期。
  • PromoteCancelled:升级取消。
  • PromoteSuccess:升级成功。
  • InviteSuccess:邀请成功。
  • Removed:已移出。
Type String ResourceAccount

成员类型。

  • CloudAccount:云账号。
  • ResourceAccount:资源账号。
RequestId String 9B34724D-54B0-4A51-B34D-4512372FE1BE

请求ID。

示例

请求示例

https://resourcemanager.aliyuncs.com/?Action=PromoteResourceAccount
&AccountId=12323344****
&Email=someone@example.com
&<公共请求参数>

正常返回示例

XML 格式

<PromoteResourceAccountResponse>
      <RequestId>9B34724D-54B0-4A51-B34D-4512372FE1BE</RequestId>
      <Account>
            <ResourceDirectoryId>rd-k3****</ResourceDirectoryId>
            <AccountId>12323344****</AccountId>
            <DisplayName>admin</DisplayName>
            <FolderId>fd-bVaRIG****</FolderId>
            <JoinMethod>created</JoinMethod>
            <JoinTime>2015-01-23T12:33:18Z</JoinTime>
            <Type>ResourceAccount</Type>
            <Status>PromoteVerifying</Status>
            <RecordId>06950264-3f0d-4ca9-82dd-6ee7a3d33d6b</RecordId>
            <ModifyTime>2015-01-23T12:33:18Z</ModifyTime>
      </Account>
</PromoteResourceAccountResponse>

JSON 格式

{
    "RequestId": "9B34724D-54B0-4A51-B34D-4512372FE1BE",
    "Account": {
        "ResourceDirectoryId":"rd-k3****",
        "AccountId": "12323344****",
        "DisplayName": "admin",
        "FolderId": "fd-bVaRIG****",
        "JoinMethod": "created",
        "JoinTime": "2015-01-23T12:33:18Z",
        "Type":"ResourceAccount",
        "Status":"PromoteVerifying",
        "RecordId":"06950264-3f0d-4ca9-82dd-6ee7a3d33d6b",
        "ModifyTime":"2015-01-23T12:33:18Z"
    }
}

错误码

HttpCode 错误码 错误信息 描述
400 MissingParameter.AccountId You must specify AccountId. AccountID不能为空。
400 InvalidParameter.AccountId The AccountId is invalid. 主账号ID无效,请输入16位账号ID。
400 MissingParameter.Email You must specify Email. 邮箱缺失,请指定邮箱。
400 InvalidParameter.Email The Email is invalid. 邮箱格式错误。
404 EntityNotExists.Account This resource directory account does not exist. 成员不存在,请先创建成员。
409 AccountTypeOrStatusMismatch You cannot perform the action on the member account. 成员类型或状态不匹配。
409 InvalidParameter.Email.AlreadyUsed The email has been used. 邮箱已被占用,请更换其他邮箱。
404 EntityNotExists.ResourceDirectory The resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account. 当前账号未启用资源目录,请先启用资源目录。

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