All Products
Search
Document Center

Resource Management:CreateResourceAccount

Last Updated:Jun 25, 2024

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
DisplayNamestringYes

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
ParentFolderIdstringNo

The ID of the parent folder.

fd-r23M55****
PayerAccountIdstringNo

The ID of the billing account. If you leave this parameter empty, the newly created member is used as its billing account.

12323344****
AccountNamePrefixstringNo

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 (_), periods (.), and hyphens (-).

The complete Alibaba Cloud account name of a member in a resource directory is in the @.aliyunid.com format, such as alice@rd-3G****.aliyunid.com.

Each name must be unique in the resource directory.

alice
Tagobject []No

The tag of the member.

KeystringNo

The key of the tag.

k1
ValuestringNo

The value of the tag.

v1
ResellAccountTypestringNo

The identity type of the member. Valid values:

  • resell: The member is an account for a reseller. This is the default value. A relationship is automatically established between the member and the reseller. The management account of the resource directory must be used as the billing account of the member.
  • non_resell: The member is not an account for a reseller. The member is an account that is not associated with a reseller. You can directly use the account to purchase Alibaba Cloud resources. The member is used as its own billing account.
Note This parameter is available only for resellers at the international site (alibabacloud.com).
resell
DryRunbooleanNo

Specifies whether to perform only a dry run, without performing the actual request. Valid values:

  • true: performs only a dry run. The system checks whether an identity type can be specified for the member. If the request does not pass the dry run, an error code is returned.
  • false (default): performs a dry run and performs the actual request.
false

For more information about common request parameters, see Common parameters.

Response parameters

ParameterTypeDescriptionExample
object

The returned result.

Accountobject

The information of the member.

Statusstring

The status of the member. The value CreateSuccess indicates that the member is created.

CreateSuccess
Typestring

The type of the member. The value ResourceAccount indicates that the member is a resource account.

ResourceAccount
DisplayNamestring

The display name of the member.

Dev
FolderIdstring

The ID of the folder.

fd-r23M55****
ResourceDirectoryIdstring

The ID of the resource directory.

rd-3G****
JoinTimestring

The time when the member joined the resource directory. The time is displayed in UTC.

2020-12-31T03:37:39.456Z
AccountIdstring

The Alibaba Cloud account ID of the member.

112730938585****
JoinMethodstring

The way in which the member joins the resource directory. Valid values:

  • invited: The member is invited to join the resource directory.
  • created: The member is directly created in the resource directory.
created
ModifyTimestring

The time when the member was modified. The time is displayed in UTC.

2020-12-31T03:37:39.456Z
AccountNamestring

The Alibaba Cloud account name of the member.

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

The ID of the request.

B356A415-D860-43E5-865A-E2193D62BBD6

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400MissingParameter.Account.DisplayNameYou must specify DisplayName.The DisplayName parameter is not configured. Configure this parameter.
400InvalidParameter.Account.DisplayNameThe DisplayName of account is invalid.The value of the DisplayName parameter is invalid. The value can contain only letters, digits, underscores (_), periods (.), and hyphens (-).
400InvalidParameter.Account.DisplayName.LengthThe 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.
400InvalidParameter.ParentFolderIdThe 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.
400InvalidParameter.Account.AccountNamePrefixThe account name prefix is invalid.-
400InvalidParameter.Account.AccountNamePrefix.LengthThe account name prefix exceeds the length limit.-
400NotSupport.Site.ActionSite does not allow current action.Site does not allow current action.
404EntityNotExists.ResourceDirectoryThe 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.
404EntityNotExists.FolderThe resource directory folder does not exist.The specified folder does not exist. Create such a folder first.
409LimitExceeded.AccountThe maximum number of member accounts in a resource directory exceeds the limit.The number of members in the resource directory exceeds the upper limit.
409InvalidParameter.Account.DisplayName.AlreadyUsedThe displayname of account has been used.The display name already exists. Specify a valid display name.
409EntityAlreadyExists.ResourceDirectory.AccountThe 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.
409Invalid.PayRelationFailed 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.
409NotSupport.PayerAccountInAnotherResourceDirectoryThe specified settlement account does not exist in the resource directory. You must specify a valid settlement account.-
409CreateAccountDisabledThe specified resource directory cannot create a new account.-
409PaymentAccountEnterpriseVerifyErrorThe type of the payment account is not enterprise verified.The billing account does not pass enterprise real-name verification.
409PaymentAccountFinancialRelationshipVerifyErrorThe payment account must not be the beneficiary account from other financial relationships.A billing account cannot be associated with a financial account.
409PaymentAccountEnterpriseTypeErrorThe type of the payment account is not enterprise.The billing account is not an enterprise account.
409PaymentAccountFinancialRelationshipsChangeFrequencyVerifyErrorThe financial relationship of payment account changes too frequently. Please try again later.The financial relationship of the billing account frequently changes. Try again later.
409MemberAccountVirtualCloudOperatorVerifyErrorThe type of the member account must not be virtual operator.-
409MemberAccountResellerVerifyErrorThe type of the member account must not be reseller.-
409PaymentAccountVirtualCloudOperatorVerifyErrorThe type of the payment account must not be virtual operator.A billing account cannot be an account for a virtual network operator (VNO).
409PaymentAccountResellerVerifyErrorThe type of the payment account must not be reseller.The billing account cannot be an account for a reseller.
409PaymentAccountCreditIdentityTypeErrorThe identity of the payment account is not credit.-
409InconsistentEnterpriseNameErrorThe enterprise name of the payment account and the member account must be consistent.-
409PaymentAccountEnterpriseInvoiceErrorNo enterprise invoice header information is set for the payment account.No invoice title information is specified for the billing account.
409UnknownFinancialErrorAn unknown financial error occurred.An unknown financial error occurred.
409BusinessRestrictedBusiness is restricted. Please contact your customer service manager.Your business is limited. Contact your customer business manager (CBM).
409FundAccountHasArrearsAmountThere 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.
409FundAccountOwnerPayedByOthersIf 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.
409UserOwnFundAccountPayForOthersIf 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.
409EcoRelationCheckFailedAccounts 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.
409NotSupport.SettingResellAccountTypeThe 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 timeSummary of changesOperation
2024-03-14The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 409 change
    delete Error Codes: 400
    delete Error Codes: 404
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: DryRun
2024-01-05The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 409 change
    delete Error Codes: 400
    delete Error Codes: 404
2023-04-27The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 404
    delete Error Codes: 409