Changes the display name of a member, or switches the type of a member.

Usage notes

  • To ensure that the system can record the operators of management operations, you must use a RAM user or RAM role to which the AliyunResourceDirectoryFullAccess policy is attached within the management account of your resource directory to call this operation.
  • Before you switch the type of a member from resource account to cloud account, make sure that specific conditions are met. For more information about the conditions, see Switch a resource account to a cloud account.
  • Before you switch the type of a member from cloud account to resource account, make sure that specific conditions are met. For more information about the conditions, see Switch a cloud account to a resource account.

This example provides an example on how to call the API operation to change the display name of the member 12323344**** to admin.

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 UpdateAccount

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

NewDisplayName String No admin

The new display name of the member.

Note You can configure either the NewDisplayName or NewAccountType parameter.
NewAccountType String No ResourceAccount

The new type of the member. Valid values:

  • ResourceAccount: resource account
  • CloudAccount: cloud account
Note You can configure either the NewDisplayName or NewAccountType parameter.
AccountId String Yes 12323344****

The ID of the Alibaba Cloud account that corresponds to the member.

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
Account Object

The information of the member.

Status String CreateSuccess

The status of the member. Valid values:

  • CreateSuccess: The member is created.
  • InviteSuccess: The member accepts the invitation.
  • Removed: The member is removed.
  • SwitchSuccess: The type of the member is switched.
Type String ResourceAccount

The type of the member. Valid values:

  • CloudAccount: cloud account
  • ResourceAccount: resource account
DisplayName String admin

The display name of the member.

FolderId String fd-bVaRIG****

The ID of the folder.

ResourceDirectoryId String rd-k3****

The ID of the resource directory.

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

The time when the member joined the resource directory. The time is displayed in UTC.

AccountId String 12323344****

The ID of the Alibaba Cloud account that corresponds to the member.

JoinMethod String created

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

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

The time when the member was modified. The time is displayed in UTC.

AccountName String ecs-manager@aliyun.com

The name of the Alibaba Cloud account that corresponds to the member.

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

The ID of the request.

Examples

Sample requests

https://resourcemanager.aliyuncs.com/?Action=UpdateAccount
&AccountId=12323344****
&NewDisplayName=admin
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<?xml version="1.0" encoding="UTF-8" ?>
<UpdateAccountResponse>
    <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>CreateSuccess</Status>
        <RecordId>06950264-3f0d-4ca9-82dd-6ee7a3d33d6b</RecordId>
        <ModifyTime>2015-01-23T12:33:18Z</ModifyTime>
    </Account>
</UpdateAccountResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/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" : "CreateSuccess",
    "RecordId" : "06950264-3f0d-4ca9-82dd-6ee7a3d33d6b",
    "ModifyTime" : "2015-01-23T12:33:18Z"
  }
}

Error codes

HTTP status code Error code Error message Description
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 account has not been used to enable a resource directory. Use the account to enable a resource directory first.
404 EntityNotExists.Account This resource directory account does not exist. The error message returned because the member does not exist. Create such a member first.
409 InvalidParameter.Account.DisplayName.AlreadyUsed The displayname of account has been used. The error message returned because the display name of the member already exists. Change the name.
409 MissingDisplayNameOrAccountType Either display name or account type must be specified. The error message returned because neither the display name of the member nor the type of the member is specified.
409 AccountTypeMismatch The type or status of the member account cannot satisfy the current operation. The error message returned because the type or status of the member does not meet the requirements for the current operation.
409 LegalEntityDifferent The account legal entity is different from the one of the Management Account. The error message returned because the legal entity of the account is inconsistent with the legal entity of the management account of the resource directory.
409 CallerIdentityError Please use the RAM user or role of the Management Account. The error message returned because only a RAM user or RAM role within the management account of the resource directory can be used to call this operation.
409 MissingSecurityInfo The current member is not configured with a secure email or mobile phone, and the switchover fails. The error message returned because no mobile phone number or email address is bound to the member and the type of the member fails to be switched.
409 PrimaryAkInUse The root user has an AccessKey pair in use. The error message returned because the AccessKey pair of the root user for the member is in use.

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