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.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
resourcemanager:UpdateAccount | update | *Account acs:resourcemanager::{#accountId}:account/{#ResourceDirectoryPath} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
NewDisplayName | string | No | The new display name of the member. Note
You can specify either NewDisplayName or NewAccountType .
| admin |
NewAccountType | string | No | The new type of the member. Valid values:
Note
You can specify either NewDisplayName or NewAccountType .
| ResourceAccount |
AccountId | string | Yes | The Alibaba Cloud account ID of the member. | 12323344**** |
DryRun | boolean | No | Specifies whether to perform only a dry run, without performing the actual request. Valid values:
| false |
Response parameters
Examples
Sample success responses
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 account is not 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 member does not exist. Create such a member first. |
409 | InvalidParameter.Account.DisplayName.AlreadyUsed | The displayname of account has been used. | The display name already exists. Specify a valid display name. |
409 | MissingDisplayNameOrAccountType | Either display name or account type must be specified. | You must specify either the display name or type of the member. |
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 | PrimaryAkInUse | The account has the primary AK in use. | - |
409 | MissingSecurityInfo | Security information is missing. | - |
409 | LegalEntityDifferent | The account legal entity is different from the one of the Management Account. | The legal entity of the account is inconsistent with that of the management account. |
409 | CallerIdentityError | Please use the RAM user or role of the Management Account. | Only a RAM user or RAM role within the management account can be used to perform this operation. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-03-14 | The Error code has changed. The request parameters of the API has changed | View Change Details |