All Products
Search
Document Center

Resource Management:UpdateAccount

Last Updated:Aug 28, 2026

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

Operation description

  • 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.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

resourcemanager:UpdateAccount

update

*Account

acs:resourcemanager:*:{#accountId}:account/{#ResourceDirectoryPath}

None None

Request parameters

Parameter

Type

Required

Description

Example

NewDisplayName

string

No

The new display name of the member.

Note

You can configure either the NewDisplayName or NewAccountType parameter.

admin

NewAccountType

string

No

The new type of the member. Valid values:

  • ResourceAccount: resource account

  • CloudAccount: cloud account

Note

You can configure either the NewDisplayName or NewAccountType parameter.

ResourceAccount

AccountId

string

Yes

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

12323344****

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

Response elements

Element

Type

Description

Example

object

Account

object

The information of the member.

Status

string

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.

CreateSuccess

Type

string

The type of the member. Valid values:

  • CloudAccount: cloud account

  • ResourceAccount: resource account

ResourceAccount

DisplayName

string

The display name of the member.

admin

FolderId

string

The ID of the folder.

fd-bVaRIG****

ResourceDirectoryId

string

The ID of the resource directory.

rd-k3****

JoinTime

string

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

2015-01-23T12:33:18Z

AccountId

string

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

12323344****

JoinMethod

string

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.

created

ModifyTime

string

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

2015-01-23T12:33:18Z

AccountName

string

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

ecs-manager@aliyun.com

RequestId

string

The ID of the request.

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

Examples

Success response

JSON format

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

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 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. The specified member account does not exist. We recommend that you first create a member account.
409 InvalidParameter.Account.DisplayName.AlreadyUsed The displayname of account has been used. The display name of account has been used. You must specify a valid display name.
409 MissingDisplayNameOrAccountType Either display name or account type must be specified. Either display name or account type must be specified.
409 AccountTypeMismatch The type or status of the member account cannot satisfy the current operation. The type or status of the member account cannot satisfy the current operation.
409 LegalEntityDifferent The account legal entity is different from the one of the Management Account. The legal entity of the account is different from that of the management account.
409 CallerIdentityError Please use the RAM user or role of the Management Account. Use the RAM user or role of the management account to perform this operation.
409 MissingSecurityInfo The current member is not configured with a secure email or mobile phone, and the switchover fails. The current member fails to be switched because no mobile phone number or email address is specified for the member.
409 PrimaryAkInUse The root user has an AccessKey pair in use. The root user has an AccessKey pair in use.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.