調用UpdateAccount修改成員名稱或切換成員類型。
介面說明
前提條件
為確保系統可以記錄到管理操作的具體操作者,請使用管理帳號下具有資來源目錄系統管理權限(AliyunResourceDirectoryFullAccess)的 RAM 使用者或 RAM 角色調用本 API。
資源帳號切換為雲帳號時需要滿足的條件,請參見資源帳號切換為雲帳號。
雲帳號切換為資源帳號時需要滿足的條件,請參見雲帳號切換為資源帳號。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
resourcemanager:UpdateAccount |
update |
*Account
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| NewDisplayName |
string |
否 |
新的成員名稱。 說明
|
admin |
| NewAccountType |
string |
否 |
新的成員類型。取值:
說明
|
ResourceAccount |
| AccountId |
string |
是 |
成員 ID。 |
12323344**** |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
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 | 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. | 請使用管理帳號的RAM使用者或角色進行操作。 |
| 409 | MissingSecurityInfo | The current member is not configured with a secure email or mobile phone, and the switchover fails. | 當前成員未設定安全郵箱或安全手機,切換操作失敗。 |
| 409 | PrimaryAkInUse | The root user has an AccessKey pair in use. | 帳號存在正在使用的根使用者AK。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。