調用CreateResourceAccount創建資源賬號類型的成員。
接口說明
在資源目錄內,成員作為資源容器,是一種資源分組單位。成員通常用于指代一個項目或應用,每個成員中的資源相對其他成員中的資源是物理隔離的。
本文將提供一個示例,在資源夾fd-r23M55****
下創建一個成員,其成員顯示名稱為Dev
,賬號名稱前綴為alice
。
調試
您可以在OpenAPI Explorer中直接運行該接口,免去您計算簽名的困擾。運行成功后,OpenAPI Explorer可以自動生成SDK代碼示例。
授權信息
當前API暫無授權信息透出。
請求參數
名稱 | 類型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
DisplayName | string | 是 | 成員顯示名稱。 長度范圍:2~50 個字符或漢字。 格式:允許輸入漢字、英文字母、數字、下劃線(_)、半角句號(.)、短劃線(-)和空格。 成員顯示名稱在資源目錄內必須唯一。 | Dev |
ParentFolderId | string | 否 | 父資源夾 ID。 | fd-r23M55**** |
PayerAccountId | string | 否 | 結算賬號 ID。置空則采用新創建的成員自主結算。 | 12323344**** |
AccountNamePrefix | string | 否 | 賬號名稱前綴。置空則系統隨機生成。 長度范圍:2~50 個字符或漢字。 格式:允許輸入英文字母、數字和特殊字符 完整賬號名稱的格式為 賬號名稱在資源目錄內必須唯一。 | alice |
Tag | object [] | 否 | 成員的標簽。 | |
Key | string | 否 | 標簽鍵。 | k1 |
Value | string | 否 | 標簽值。 | v1 |
ResellAccountType | string | 否 | 成員的身份類型。取值:
說明
該參數僅支持國際站分銷客戶。
| resell |
DryRun | boolean | 否 | 是否只預檢此次請求。取值:
| false |
關于公共請求參數的詳情,請參見公共參數。
返回參數
示例
正常返回示例
JSON
格式
{
"Account": {
"Status": "CreateSuccess",
"Type": "ResourceAccount",
"DisplayName": "Dev",
"FolderId": "fd-r23M55****",
"ResourceDirectoryId": "rd-3G****",
"JoinTime": "2020-12-31T03:37:39.456Z",
"AccountId": "112730938585****",
"JoinMethod": "created",
"ModifyTime": "2020-12-31T03:37:39.456Z",
"AccountName": "alice@rd-3g****.aliyunid.com"
},
"RequestId": "B356A415-D860-43E5-865A-E2193D62BBD6"
}
錯誤碼
HTTP status code | 錯誤碼 | 錯誤信息 | 描述 |
---|---|---|---|
400 | MissingParameter.Account.DisplayName | You must specify DisplayName. | 顯示名缺失,請指定顯示名。 |
400 | InvalidParameter.Account.DisplayName | The DisplayName of account is invalid. | 顯示名無效,請輸入字符或漢字,可包含漢字、英文字母、數字、下劃線(_)、半角句號(.)和短劃線(-)。 |
400 | InvalidParameter.Account.DisplayName.Length | The DisplayName of the account exceeds the length limit. | 顯示名長度超出限制,長度為2~50個字符或漢字。 |
400 | InvalidParameter.ParentFolderId | The ParentFolderId is invalid. | 父資源夾ID無效,資源夾ID應以“r-”開頭+6位數字或英文字母或以“fd-”開頭+10位數字或英文字母。 |
400 | InvalidParameter.Account.AccountNamePrefix | The account name prefix is invalid. | - |
400 | InvalidParameter.Account.AccountNamePrefix.Length | The account name prefix exceeds the length limit. | - |
400 | NotSupport.Site.Action | Site does not allow current action. | 該操作不支持當前站點。 |
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.Folder | The resource directory folder does not exist. | 資源夾不存在,請先創建資源夾。 |
409 | LimitExceeded.Account | The maximum number of member accounts in a resource directory exceeds the limit. | 資源目錄中的成員數量超出限制。 |
409 | InvalidParameter.Account.DisplayName.AlreadyUsed | The displayname of account has been used. | 顯示名已被占用,請更換其他名稱。 |
409 | EntityAlreadyExists.ResourceDirectory.Account | The email address that the system generates when you create a member account already exists. Try again later. | 創建成員時系統生成的郵箱已被占用,請重試。 |
409 | Invalid.PayRelation | Failed to create a member. The specified billing account is unavailable. Please change to another billing account and try again. | 成員創建失敗。您選擇的結算賬號不可用,請更換后重新嘗試。 |
409 | NotSupport.PayerAccountInAnotherResourceDirectory | The specified settlement account does not exist in the resource directory. You must specify a valid settlement account. | - |
409 | CreateAccountDisabled | The specified resource directory cannot create a new account. | 禁止創建賬號。 |
409 | PaymentAccountEnterpriseVerifyError | The type of the payment account is not enterprise verified. | 結算賬號不是企業實名類型。 |
409 | PaymentAccountFinancialRelationshipVerifyError | The payment account must not be the beneficiary account from other financial relationships. | 結算賬號不能是其他財務關系的財務子賬號。 |
409 | PaymentAccountEnterpriseTypeError | The type of the payment account is not enterprise. | 結算賬號不是企業類型。 |
409 | PaymentAccountFinancialRelationshipsChangeFrequencyVerifyError | The financial relationship of payment account changes too frequently. Please try again later. | 結算賬號的財務關系變更太頻繁。請稍后重試。 |
409 | MemberAccountVirtualCloudOperatorVerifyError | The type of the member account must not be virtual operator. | - |
409 | MemberAccountResellerVerifyError | The type of the member account must not be reseller. | - |
409 | PaymentAccountVirtualCloudOperatorVerifyError | The type of the payment account must not be virtual operator. | 結算賬號不能是虛擬運營商類型。 |
409 | PaymentAccountResellerVerifyError | The type of the payment account must not be reseller. | 結算賬號不能是分銷商類型。 |
409 | PaymentAccountCreditIdentityTypeError | The identity of the payment account is not credit. | - |
409 | InconsistentEnterpriseNameError | The enterprise name of the payment account and the member account must be consistent. | - |
409 | PaymentAccountEnterpriseInvoiceError | No enterprise invoice header information is set for the payment account. | 結算賬號的企業發票抬頭信息未設置。 |
409 | UnknownFinancialError | An unknown financial error occurred. | 未知的財資錯誤。 |
409 | BusinessRestricted | Business is restricted. Please contact your customer service manager. | 業務受限,請聯系您的客戶經理處理。 |
409 | FundAccountHasArrearsAmount | There are arrears in the current payment account. You cannot change the payment account. Please settle the arrears and try again. | 當前付款賬戶存在欠費,您不可變更付款賬戶,請結清欠費后重試。 |
409 | FundAccountOwnerPayedByOthers | If the payment has been made by another account, it is not allowed to be used as the main payment account. | 已經由其他賬號代付的,不允許再作為代付主賬號。 |
409 | UserOwnFundAccountPayForOthers | If the account has been used as the main payment account, it is not allowed to set up payment by others. | 已經作為代付主賬號的,不允許再設置由他人代付。 |
409 | EcoRelationCheckFailed | Accounts associated with partners are not allowed to set up agency payment relationships. | 生態伙伴關聯的賬號,不允許設置代付關系。 |
409 | NotSupport.SettingResellAccountType | The current account does not support setting the resellAccountType for members. | 當前賬號不支持設置成員的身份類型。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
變更時間 | 變更內容概要 | 操作 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-03-14 | OpenAPI 錯誤碼發生變更、OpenAPI 入參發生變更 | 看變更集 | ||||||||||||
| ||||||||||||||
2024-01-05 | OpenAPI 錯誤碼發生變更 | 看變更集 | ||||||||||||
| ||||||||||||||
2023-04-27 | OpenAPI 錯誤碼發生變更 | 看變更集 | ||||||||||||
|