すべてのプロダクト
Search
ドキュメントセンター

:CreateResourceAccount

最終更新日:Oct 27, 2026

リソースアカウントタイプのメンバーを作成します。

操作説明

リソースディレクトリにおいて、メンバーはリソースコンテナおよびリソースグループ化単位として機能します。メンバーは通常、プロジェクトまたはアプリケーションを表します。各メンバー内のリソースは、他のメンバー内のリソースと物理的に分離されています。

この Topic では、fd-r23M55**** フォルダにメンバーを作成する方法の例を示します。メンバーの表示名は Dev、アカウント名プレフィックスは alice です。

今すぐお試しください

この API を OpenAPI Explorer でお試しください。手作業による署名は必要ありません。呼び出しに成功すると、入力したパラメーターに基づき、資格情報が組み込まれた SDK コードが自動的に生成されます。このコードをダウンロードしてローカルで使用できます。

テスト

RAM 認証

下表に、この API を呼び出すために必要な認証情報を示します。認証情報は、RAM (Resource Access Management) ポリシーを使用して定義できます。以下で各列名について説明します。

  • アクション:特定のリソースに対して実行可能な操作。ポリシー構文ではAction要素として指定します。

  • API:アクションを具体的に実行するための API。

  • アクセスレベル:各 API に対して事前定義されているアクセスの種類。有効な値:create、list、get、update、delete。

  • リソースタイプ:アクションが作用するリソースの種類。リソースレベルでの権限をサポートするかどうかを示すことができます。ポリシーの有効性を確保するため、アクションの対象として適切なリソースを指定してください。

    • リソースレベルの権限を持つ API の場合、必要なリソースタイプはアスタリスク (*) でマークされます。ポリシーのResource要素で対応する ARN を指定してください。

    • リソースレベルの権限を持たない API の場合、「すべてのリソース」と表示され、ポリシーのResource要素でアスタリスク (*) でマークされます。

  • 条件キー:サービスによって定義された条件のキー。このキーにより、きめ細やかなアクセス制御が可能になります。この制御は、アクション単体に適用することも、特定のリソースに対するアクションに適用することもできます。Alibaba Cloud は、サービス固有の条件キーに加えて、すべての RAM 統合サービスに適用可能な一連の共通条件キーを提供しています。

  • 依存アクション:ある特定のアクションを実行するために、前提として実行が必要となる他のアクション。依存アクションの権限も RAM ユーザーまたは RAM ロールに付与する必要があります。

アクション

アクセスレベル

リソースタイプ

条件キー

依存アクション

resourcemanager:CreateResourceAccount

create

*フォルダ。

acs:resourcemanager:*:{#accountId}:folder/{#ResourceDirectoryPath}

なし なし

リクエストパラメーター

パラメーター

型

必須 / 任意

説明

例

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

任意

メンバーの ID タイプ。有効な値:

  • resell: リセラーアカウント。これがデフォルト値です。作成されたメンバーは、お客様のリセラーとリセラー関係を自動的に確立します。管理アカウントを使用して、新規メンバーの料金を支払う必要があります。

  • non_resell: 非リセラーアカウント。作成されたメンバーは通常の Alibaba Cloud アカウントであり、現在のリセラーとは関係がありません。このアカウントは Alibaba Cloud から直接リソースを購入し、自身の料金を支払います。

説明

このパラメーターは、国際サイトのリセラー顧客に対してのみサポートされています。

resell

DryRun

boolean

任意

リクエストの事前チェックのみを実行するかどうかを指定します。有効な値:

  • true: システムはメンバーを作成せずにリクエストの事前チェックを実行します。事前チェック項目には、現在のアカウントでメンバーの ID タイプを設定できるかどうかが含まれます。リクエストが事前チェックに失敗した場合、対応するエラーコードが返されます。

  • 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

例

成功レスポンス

JSONJSON

{
  "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 ステータスコード

エラーコード

エラーメッセージ

説明

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. 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. 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. 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.
409 InvalidParameter.Email.AlreadyUsed The email has been used.

完全なリストについては、「エラーコード」をご参照ください。

変更履歴

完全なリストについては、「変更履歴」をご参照ください。