Upgrades a resource account to a cloud account.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes PromoteResourceAccount

The operation that you want to perform. Set the value to PromoteResourceAccount.

AccountId String Yes 12323344****

The ID of the resource account you want to upgrade.

Email String Yes someone@example.com

The email address used to log on to the cloud account after the upgrade.

Response parameters

Parameter Type Example Description
Account Struct

The information of the member account.

AccountId String 12323344****

The ID of the member account.

AccountName String someone@example.com

The name of the member account.

DisplayName String admin

The display name of the member account.

FolderId String fd-bVaRIG****

The ID of the folder.

JoinMethod String created

The way in which the member account joined the resource directory. Valid values:

  • invited: The member account is invited to join the resource directory.
  • created: The member account is directly created in the resource directory.
JoinTime String 2015-01-23T12:33:18Z

The time when the member account joined the resource directory.

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

The time when the member account was modified.

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

The account record ID.

ResourceDirectoryId String rd-k3****

The ID of the resource directory.

Status String PromoteVerifying

The status of the member account. Valid values:

  • CreateSuccess: The member account is created.
  • CreateVerifying: The creation of the member account is under confirmation.
  • CreateFailed: The member account failed to be created.
  • CreateExpired: The creation of the member account expired.
  • CreateCancelled: The creation of the member account is canceled.
  • PromoteVerifying: The upgrade of the member account is under confirmation.
  • PromoteFailed: The member account failed to be upgraded.
  • PromoteExpired: The upgrade of the member account expired.
  • PromoteCancelled: The upgrade of the member account is canceled.
  • PromoteSuccess: The member account is upgraded.
  • InviteSuccess: The owner of the member account accepted the invitation.
  • Removed: The member account is removed from the resource directory.
Type String ResourceAccount

The type of the member account. Valid values:

  • CloudAccount
  • ResourceAccount
RequestId String 9B34724D-54B0-4A51-B34D-4512372FE1BE

The ID of the request.

Examples

Sample requests

https://resourcemanager.aliyuncs.com/?Action=PromoteResourceAccount
&AccountId=12323344****
&Email=someone@example.com
&<Common request parameters>

Sample success responses

XML format

<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 format

{
    "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"
    }
}

Error codes

HTTP status code Error code Error message Description
400 MissingParameter.AccountId You must specify AccountId. The error message returned because the AccountId parameter is not specified.
400 InvalidParameter.AccountId The AccountId is invalid. The error message returned because the value of the AccountId parameter is invalid. Specify a 16-digit ID.
400 MissingParameter.Email You must specify Email. The error message returned because the Email parameter is not specified. Specify this parameter.
400 InvalidParameter.Email The Email is invalid. The error message returned because the format of the value specified for the Email parameter is invalid.
404 EntityNotExists.Account This resource directory account does not exist. The error message returned because the member account does not exist. Create the member account first.
409 AccountTypeOrStatusMismatch You cannot perform the action on the member account. The error message returned because you cannot perform the operation on the member account.
409 InvalidParameter.Email.AlreadyUsed The email has been used. The error message returned because the email address is in use. Enter another email address.
404 EntityNotExists.ResourceDirectory The resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account. The error message returned because the resource directory for the account is not enabled. Enable the resource directory for the account.

For a list of error codes, visit the API Error Center.