调用UpdateAccount修改成员名称或切换成员类型。
接口说明
前提条件
为确保系统可以记录到管理操作的具体操作者,请使用管理账号下具有资源目录管理权限(AliyunResourceDirectoryFullAccess)的 RAM 用户或 RAM 角色调用本 API。
资源账号切换为云账号时需要满足的条件,请参见资源账号切换为云账号。
云账号切换为资源账号时需要满足的条件,请参见云账号切换为资源账号。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| NewDisplayName |
string |
否 |
新的成员名称。 说明
|
admin |
| NewAccountType |
string |
否 |
新的成员类型。取值:
说明
|
ResourceAccount |
| AccountId |
string |
是 |
成员 ID。 |
12323344**** |
| DryRun |
boolean |
否 |
是否只预检此次请求。取值:
|
false |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回参数。 |
||
| Account |
object |
成员信息。 |
|
| Status |
string |
成员加入状态。取值:
|
CreateSuccess |
| Type |
string |
成员类型。取值:
|
ResourceAccount |
| DisplayName |
string |
成员名称。 |
admin |
| FolderId |
string |
资源夹 ID。 |
fd-bVaRIG**** |
| ResourceDirectoryId |
string |
资源目录 ID。 |
rd-k3**** |
| JoinTime |
string |
成员加入时间(UTC 时间)。 |
2015-01-23T12:33:18Z |
| AccountId |
string |
成员 ID。 |
12323344**** |
| JoinMethod |
string |
成员加入方式。取值:
|
created |
| ModifyTime |
string |
成员修改时间(UTC 时间)。 |
2015-01-23T12:33:18Z |
| AccountName |
string |
阿里云账号名称。 |
ecs-manager@aliyun.com |
| RequestId |
string |
请求 ID。 |
9B34724D-54B0-4A51-B34D-4512372FE1BE |
示例
正常返回示例
JSON格式
{
"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"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 404 | EntityNotExists.ResourceDirectory | 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. | |
| 409 | InvalidParameter.Account.DisplayName.AlreadyUsed | The displayname of account has been used. | |
| 409 | MissingDisplayNameOrAccountType | Either display name or account type must be specified. | |
| 409 | AccountTypeMismatch | 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. | |
| 409 | CallerIdentityError | Please use the RAM user or role of the Management Account. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。