全部產品
Search
文件中心

Resource Management:CreateResourceAccount - 建立成員

更新時間:Dec 21, 2025

調用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~37 個字元。

格式:允許輸入英文字母、數字和特殊字元_.-,必須以英文字母或數字開頭和結尾,且不能輸入連續的特殊字元_.-

完整帳號名稱的格式為@.aliyunid.com,例如:alice@rd-3G****.aliyunid.com

帳號名稱在資來源目錄內必須唯一。

alice

Tag

array<object>

成員的標籤。

object

成員的標籤。

Key

string

標籤鍵。

k1

Value

string

標籤值。

v1

ResellAccountType

string

成員的身份類型。取值:

  • resell(預設值):分銷帳號。建立的成員將自動與您的分銷商建立分銷關係,同時您需要使用管理帳號為新成員付款。

  • non_resell :非分銷帳號。建立的成員為阿里雲普通帳號,與您當前的分銷商無關聯關係,該帳號直接從阿里雲購買資源,需自主付款。

說明

該參數僅支援國際站分銷客戶。

resell

DryRun

boolean

是否只預檢此次請求。取值:

  • true:發送檢查請求,不會實際建立成員。檢查項當前包括當前帳號是否允許設定成員的身份類型。如果檢查不通過,則返回對應錯誤碼。

  • false(預設):發送正常請求,通過檢查後直接建立成員。

false

關於公用請求參數的詳情,請參見公用參數

返回參數

名稱

類型

描述

樣本值

object

返回參數。

Account

object

成員資訊。

Status

string

成員加入狀態。取值為 CreateSuccess,表示建立成功。

CreateSuccess

Type

string

成員類型。取值為 ResourceAccount,表示資源帳號。

ResourceAccount

DisplayName

string

成員顯示名稱。

Dev

FolderId

string

資源夾 ID。

fd-r23M55****

ResourceDirectoryId

string

資來源目錄 ID。

rd-3G****

JoinTime

string

成員加入時間(UTC 時間)。

2020-12-31T03:37:39.456Z

AccountId

string

成員 ID。

112730938585****

JoinMethod

string

成員加入方式。取值:

  • invited:邀請。

  • created:建立。

created

ModifyTime

string

成員修改時間(UTC 時間)。

2020-12-31T03:37:39.456Z

AccountName

string

帳號名稱。

alice@rd-3g****.aliyunid.com

RequestId

string

請求 ID。

B356A415-D860-43E5-865A-E2193D62BBD6

樣本

正常返回樣本

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.
400 InvalidParameter.ParentFolderId The ParentFolderId is invalid.
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.

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情