Creates a member of the resource account type.
Operation description
A member serves as a container for resources and is also an organizational unit in a resource directory. A member indicates a project or application. The resources of different members are isolated.
This topic provides an example on how to call the API operation to create a member in the fd-r23M55****
folder. The display name of the member is Dev
, and the prefix for the Alibaba Cloud account name of the member is alice
.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DisplayName | string | Yes | The display name of the member. The name must be 2 to 50 characters in length. The name can contain letters, digits, underscores (_), periods (.), hyphens (-), and spaces. The name must be unique in the resource directory. | Dev |
ParentFolderId | string | No | The ID of the parent folder. | fd-r23M55**** |
PayerAccountId | string | No | The ID of the billing account. If you leave this parameter empty, the newly created member is used as its billing account. | 12323344**** |
AccountNamePrefix | string | No | The prefix for the Alibaba Cloud account name of the member. If you leave this parameter empty, the system randomly generates a prefix. The prefix must be 2 to 37 characters in length. The prefix can contain letters, digits, and special characters but cannot contain consecutive special characters. The prefix must start with a letter or digit and end with a letter or digit. Valid special characters include underscores ( The complete Alibaba Cloud account name of a member in a resource directory is in the @.aliyunid.com format, such as Each name must be unique in the resource directory. | alice |
Tag | object [] | No | The tag of the member. | |
Key | string | No | The key of the tag. | k1 |
Value | string | No | The value of the tag. | v1 |
ResellAccountType | string | No | The identity type of the member. Valid values:
Note
This parameter is available only for resellers at the international site (alibabacloud.com).
| resell |
DryRun | boolean | No | Specifies whether to perform only a dry run, without performing the actual request. Valid values:
| false |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"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"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | MissingParameter.Account.DisplayName | You must specify DisplayName. | The DisplayName parameter is not configured. Configure this parameter. |
400 | InvalidParameter.Account.DisplayName | The DisplayName of account is invalid. | The value of the DisplayName parameter is invalid. The value can contain only letters, digits, underscores (_), periods (.), and hyphens (-). |
400 | InvalidParameter.Account.DisplayName.Length | The DisplayName of the account exceeds the length limit. | The length of the value for the DisplayName parameter exceeds the upper limit. The value must be 2 to 50 characters in length. |
400 | InvalidParameter.ParentFolderId | The ParentFolderId is invalid. | The value of the ParentFolderId parameter is invalid. The value must start with r- followed by 6 characters or start with fd- followed by 10 characters. Valid characters include letters and digits. |
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. | 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 account is not used to enable a resource directory. Use the account to enable a resource directory first. |
404 | EntityNotExists.Folder | The resource directory folder does not exist. | The specified folder does not exist. Create such a folder first. |
409 | LimitExceeded.Account | The maximum number of member accounts in a resource directory exceeds the limit. | The number of members in the resource directory exceeds the upper limit. |
409 | InvalidParameter.Account.DisplayName.AlreadyUsed | The displayname of account has been used. | The display name already exists. Specify a valid display name. |
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 is generated by the system when the member is created 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. | Failed to create the member. The specified billing account is unavailable. Specify a valid 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. | The billing account does not pass enterprise real-name verification. |
409 | PaymentAccountFinancialRelationshipVerifyError | The payment account must not be the beneficiary account from other financial relationships. | A billing account cannot be associated with a financial account. |
409 | PaymentAccountEnterpriseTypeError | The type of the payment account is not enterprise. | The billing account is not an enterprise account. |
409 | PaymentAccountFinancialRelationshipsChangeFrequencyVerifyError | The financial relationship of payment account changes too frequently. Please try again later. | The financial relationship of the billing account frequently changes. 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. | A billing account cannot be an account for a virtual network operator (VNO). |
409 | PaymentAccountResellerVerifyError | The type of the payment account must not be reseller. | The billing account cannot be an account for a 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. | No invoice title information is specified for the billing account. |
409 | UnknownFinancialError | An unknown financial error occurred. | An unknown financial error occurred. |
409 | BusinessRestricted | Business is restricted. Please contact your customer service manager. | Your business is limited. Contact your customer business manager (CBM). |
409 | FundAccountHasArrearsAmount | There are arrears in the current payment account. You cannot change the payment account. Please settle the arrears and try again. | 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. | 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. | 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. | 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. | The current account does not support setting the resellAccountType for members. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-03-14 | The Error code has changed. The request parameters of the API has changed | see changesets | ||||||||||||
| ||||||||||||||
2024-01-05 | The Error code has changed | see changesets | ||||||||||||
| ||||||||||||||
2023-04-27 | The Error code has changed | see changesets | ||||||||||||
|