All Products
Search
Document Center

Resource Management:CreateResourceAccount

Last Updated:Jun 06, 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.

Debugging

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

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
resourcemanager:CreateResourceAccountWrite
  • All Resources
    *
    none
none

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 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 tag key.

k1
ValuestringNo

The tag value.

v1
ResellAccountTypestringNo

The identity type of the member. Valid values:

  • resell (default): The member is an account for a reseller. 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

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

Response parameters

ParameterTypeDescriptionExample
object

The returned result.

Accountobject

The information about 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 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 ID of the member.

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

The request ID.

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.You must specify the display name.
400InvalidParameter.Account.DisplayNameThe DisplayName of account is invalid.The display name is invalid. The display name can contain only letters, digits, underscores (_), periods (.), and hyphens (-).
400InvalidParameter.Account.DisplayName.LengthThe DisplayName of the account exceeds the length limit.The display name of account exceeds the length limit. The name must be 2 to 50 characters in length.
400InvalidParameter.ParentFolderIdThe ParentFolderId is invalid.The specified ID of the parent folder is invalid. The ID must either be a 6-character string that starts with r- or a 10-character string that starts with fd-. The ID can contain letters and digits.
400InvalidParameter.Account.AccountNamePrefixThe account name prefix is invalid.The account name prefix is invalid.
400InvalidParameter.Account.AccountNamePrefix.LengthThe account name prefix exceeds the length limit.The length of the account name prefix exceeds the upper 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 resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account.
404EntityNotExists.FolderThe resource directory folder does not exist.The specified resource directory does not exist. We recommend that you first create a resource directory.
409LimitExceeded.AccountThe 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.
409InvalidParameter.Account.DisplayName.AlreadyUsedThe displayname of account has been used.The display name of account has been used. You must 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 the system generates when you create a member account 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 a member. The specified billing account is unavailable. Please change to another 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 type of the payment account must be enterprise verified.
409PaymentAccountFinancialRelationshipVerifyErrorThe payment account must not be the beneficiary account from other financial relationships.The payment account must not be the beneficiary account from other financial relationships.
409PaymentAccountEnterpriseTypeErrorThe type of the payment account is not enterprise.The type of the payment account must be enterprise.
409PaymentAccountFinancialRelationshipsChangeFrequencyVerifyErrorThe financial relationship of payment account changes too frequently. Please try again later.The financial relationship of payment account changes too frequently. Please 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.The type of the member account must not be virtual operator.
409PaymentAccountResellerVerifyErrorThe type of the payment account must not be reseller.The type of the member account must not be reseller.
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 enterprise invoice header information is set for the payment account.
409UnknownFinancialErrorAn unknown financial error occurred.An unknown financial error occurred.
409BusinessRestrictedBusiness is restricted. Please contact your customer service manager.Business is restricted. Please contact your customer service manager.
409PaymentAccountCreditIdentityTypeErrorNon-credit identity type or insufficient credit limit, cannot be used as payment account.The account cannot be used as a billing account because the account is not of the credit identity type or the balance in your credit card is insufficient.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
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