調(diào)用CreateCloudAccount創(chuàng)建云賬號(hào)類型的成員。

資源目錄中有資源賬號(hào)和云賬號(hào)兩種不同類型的成員。

  • 資源賬號(hào)(推薦):資源賬號(hào)類型的成員只作為資源的容器并完全依賴于資源目錄存在,是一種更為安全、創(chuàng)建更為簡(jiǎn)單的賬號(hào)。創(chuàng)建資源賬號(hào)類型的成員,請(qǐng)參見CreateResourceAccount
說明 資源賬號(hào)也可以升級(jí)為云賬號(hào),請(qǐng)參見 PromoteResourceAccount
  • 云賬號(hào):云賬號(hào)具備阿里云賬號(hào)的全部特征,包括允許Root登錄訪問。

調(diào)試

您可以在OpenAPI Explorer中直接運(yùn)行該接口,免去您計(jì)算簽名的困擾。運(yùn)行成功后,OpenAPI Explorer可以自動(dòng)生成SDK代碼示例。

請(qǐng)求參數(shù)

名稱 類型 是否必選 示例值 描述
Action String CreateCloudAccount

要執(zhí)行的操作。取值:CreateCloudAccount

DisplayName String admin-****

成員名稱。

長(zhǎng)度為2~50個(gè)字符或漢字,可包含漢字、英文字母、數(shù)字、下劃線(_)、英文句點(diǎn)(.)和短劃線(-)。

成員名稱在資源目錄內(nèi)必須唯一。

ParentFolderId String fd-bVaRIG****

父資源夾ID。

Email String someone@example.com

云賬號(hào)登錄郵箱。

PayerAccountId String 12323344****

結(jié)算賬號(hào)ID。取值為空表示采用當(dāng)前賬號(hào)結(jié)算。

返回?cái)?shù)據(jù)

名稱 類型 示例值 描述
Account Object

成員信息。

Status String CreateVerifying

成員加入狀態(tài)。

  • CreateSuccess:創(chuàng)建成功。
  • CreateVerifying:創(chuàng)建確認(rèn)中。
  • CreateFailed:創(chuàng)建失敗。
  • CreateExpired:創(chuàng)建過期。
  • CreateCancelled:創(chuàng)建取消。
  • PromoteVerifying:升級(jí)確認(rèn)中。
  • PromoteFailed:升級(jí)失敗。
  • PromoteExpired:升級(jí)過期。
  • PromoteCancelled:升級(jí)取消。
  • PromoteSuccess:升級(jí)成功。
  • InviteSuccess:邀請(qǐng)成功。
  • Removed:已移出。
Type String CloudAccount

成員類型。取值為CloudAccount表示云賬號(hào)。

DisplayName String admin-****

成員名稱。

FolderId String fd-bVaRIG****

資源夾ID。

ResourceDirectoryId String rd-k3****

資源目錄ID。

RecordId String 06950264-3f0d-4ca9-82dd-6ee7a3d3****

賬號(hào)記錄ID。

AccountId String 12323344****

賬號(hào)ID。

JoinMethod String created

成員加入方式。

  • invited:邀請(qǐng)。
  • created:創(chuàng)建。
ModifyTime String 2015-01-23T12:33:18Z

成員修改時(shí)間。

AccountName String someone@example.com

賬號(hào)名稱。

RequestId String 9B34724D-54B0-4A51-B34D-4512372FE1BE

請(qǐng)求ID。

示例

請(qǐng)求示例

https://resourcemanager.aliyuncs.com/?Action=CreateCloudAccount
&DisplayName=admin-****
&Email=someone@example.com
&ParentFolderId=fd-bVaRIG****
&<公共請(qǐng)求參數(shù)>

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<?xml version="1.0" encoding="UTF-8" ?>
<CreateCloudAccountResponse>
    <RequestId>9B34724D-54B0-4A51-B34D-4512372FE1BE</RequestId>
    <Account>
        <ResourceDirectoryId>rd-k3****</ResourceDirectoryId>
        <AccountId>12323344****</AccountId>
        <AccountName>someone@example.com</AccountName>
        <DisplayName>admin-****</DisplayName>
        <FolderId>fd-bVaRIG****</FolderId>
        <JoinMethod>created</JoinMethod>
        <Type>CloudAccount</Type>
        <Status>CreateVerifying</Status>
        <RecordId>06950264-3f0d-4ca9-82dd-6ee7a3d3****</RecordId>
        <ModifyTime>2015-01-23T12:33:18Z</ModifyTime>
    </Account>
</CreateCloudAccountResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "9B34724D-54B0-4A51-B34D-4512372FE1BE",
  "Account" : {
    "ResourceDirectoryId" : "rd-k3****",
    "AccountId" : "12323344****",
    "AccountName" : "someone@example.com",
    "DisplayName" : "admin-****",
    "FolderId" : "fd-bVaRIG****",
    "JoinMethod" : "created",
    "Type" : "CloudAccount",
    "Status" : "CreateVerifying",
    "RecordId" : "06950264-3f0d-4ca9-82dd-6ee7a3d3****",
    "ModifyTime" : "2015-01-23T12:33:18Z"
  }
}

錯(cuò)誤碼

HttpCode 錯(cuò)誤碼 錯(cuò)誤信息 描述
400 MissingParameter.Account.DisplayName You must specify DisplayName. 顯示名缺失,請(qǐng)指定顯示名。
400 InvalidParameter.Account.DisplayName The DisplayName of account is invalid. 顯示名無效,請(qǐng)輸入字符或漢字,可包含漢字、英文字母、數(shù)字、下劃線(_)、半角句號(hào)(.)和短劃線(-)。
400 InvalidParameter.Account.DisplayName.Length The DisplayName of the account exceeds the length limit. 顯示名長(zhǎng)度超出限制,長(zhǎng)度為2~50個(gè)字符或漢字。
400 InvalidParameter.ParentFolderId The ParentFolderId is invalid. 父資源夾ID無效,資源夾ID應(yīng)以“r-”開頭+6位數(shù)字或英文字母或以“fd-”開頭+10位數(shù)字或英文字母。
400 MissingParameter.Email You must specify Email. 郵箱缺失,請(qǐng)指定郵箱。
400 InvalidParameter.Email The Email is invalid. 郵箱格式錯(cuò)誤。
404 EntityNotExists.ResourceDirectory The resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account. 當(dāng)前賬號(hào)未啟用資源目錄,請(qǐng)先啟用資源目錄。
404 EntityNotExists.Folder The resource directory folder does not exist. 資源夾不存在,請(qǐng)先創(chuàng)建資源夾。
409 LimitExceeded.Account The maximum number of member accounts in a resource directory exceeds the limit. 資源目錄中的成員數(shù)量超出限制。
409 InvalidParameter.Account.DisplayName.AlreadyUsed The displayname of account has been used. 顯示名已被占用,請(qǐng)更換其他名稱。
409 EntityAlreadyExists.ResourceDirectory.Account The email address that the system generates when you create a member account already exists. Try again later. 創(chuàng)建成員時(shí)系統(tǒng)生成的郵箱已被占用,請(qǐng)重試。
409 InvalidParameter.Email.AlreadyUsed The email has been used. 郵箱已被占用,請(qǐng)更換其他郵箱。
409 Invalid.PayRelation Failed to create a member. The specified billing account is unavailable. Please change to another billing account and try again. 成員創(chuàng)建失敗。您選擇的結(jié)算賬號(hào)不可用,請(qǐng)更換后重新嘗試。
409 PaymentAccountEnterpriseVerifyError The type of the payment account is not enterprise verified. 結(jié)算賬號(hào)不是企業(yè)實(shí)名類型。
409 PaymentAccountFinancialRelationshipVerifyError The payment account must not be the beneficiary account from other financial relationships. 結(jié)算賬號(hào)不能是其他財(cái)務(wù)關(guān)系的財(cái)務(wù)子賬號(hào)。
409 PaymentAccountEnterpriseTypeError The type of the payment account is not enterprise. 結(jié)算賬號(hào)不是企業(yè)類型。
409 PaymentAccountFinancialRelationshipsChangeFrequencyVerifyError The financial relationship of payment account changes too frequently. Please try again later. 結(jié)算賬號(hào)的財(cái)務(wù)關(guān)系變更太頻繁。請(qǐng)稍后重試。
409 PaymentAccountVirtualCloudOperatorVerifyError The type of the payment account must not be virtual operator. 結(jié)算賬號(hào)不能是虛擬運(yùn)營(yíng)商類型。
409 PaymentAccountResellerVerifyError The type of the payment account must not be reseller. 結(jié)算賬號(hào)不能是分銷商類型。
409 PaymentAccountEnterpriseInvoiceError No enterprise invoice header information is set for the payment account. 結(jié)算賬號(hào)的企業(yè)發(fā)票抬頭信息未設(shè)置。
409 UnknownFinancialError An unknown financial error occurred. 未知的財(cái)資錯(cuò)誤。

訪問錯(cuò)誤中心查看更多錯(cuò)誤碼。