リソースアカウントタイプのメンバーを作成します。
操作説明
メンバーはリソースのコンテナーとして機能し、リソースディレクトリ内の組織単位でもあります。メンバーはプロジェクトまたはアプリケーションを示します。異なるメンバーのリソースは分離されます。
このトピックでは、API 操作を呼び出して、fd-r23M55**** フォルダにメンバーを作成する例を示します。メンバーの表示名は Dev で、メンバーの Alibaba Cloud アカウント名のプレフィックスは alice です。
今すぐお試しください
テスト
RAM 認証
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| DisplayName |
string |
必須 |
メンバーの表示名です。 名前の長さは 2~50 文字です。 名前に使用できる文字は、英字、数字、アンダースコア (_)、ピリオド (.)、ハイフン (-)、スペースです。 名前はリソースディレクトリ内で一意である必要があります。 |
Dev |
| ParentFolderId |
string |
任意 |
親フォルダの ID です。 |
fd-r23M55**** |
| PayerAccountId |
string |
任意 |
請求先アカウントの ID です。このパラメーターを空のままにした場合、新しく作成されたメンバーがその請求先アカウントとして使用されます。 |
12323344**** |
| AccountNamePrefix |
string |
任意 |
メンバーの Alibaba Cloud アカウント名のプレフィックスです。このパラメーターを空のままにした場合、システムはランダムにプレフィックスを生成します。 プレフィックスの長さは 2~37 文字です。 プレフィックスには、英字、数字、特殊文字を使用できますが、特殊文字を連続して使用することはできません。プレフィックスは英字または数字で始まり、英字または数字で終わる必要があります。有効な特殊文字には、アンダースコア ( リソースディレクトリ内のメンバーの完全な Alibaba Cloud アカウント名は、alice@rd-3G****.aliyunid.com のように 各名前はリソースディレクトリ内で一意である必要があります。 |
alice |
| Tag |
array<object> |
任意 |
メンバーのタグです。 |
|
|
object |
任意 |
メンバーのタグです。 |
||
| Key |
string |
任意 |
タグのキーです。 |
k1 |
| Value |
string |
任意 |
タグの値です。 |
v1 |
| ResellAccountType |
string |
任意 |
メンバーの ID タイプです。有効な値:
説明
このパラメーターは、国際サイト (alibabacloud.com) のリセラーのみが利用できます。 |
resell |
| DryRun |
boolean |
任意 |
リクエストを実際には実行せず、ドライランのみを実行するかどうかを指定します。有効な値:
|
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 |
メンバーの Alibaba Cloud アカウント ID です。 |
112730938585**** |
| JoinMethod |
string |
メンバーがリソースディレクトリに参加した方法です。有効な値:
|
created |
| ModifyTime |
string |
メンバーが変更された時刻です。時刻は UTC で表示されます。 |
2020-12-31T03:37:39.456Z |
| AccountName |
string |
メンバーの Alibaba Cloud アカウント名です。 |
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. | |
| 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. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。