Creates a new resource account or registers an existing resource account by using Account Factory.
Operation description
You can use this API operation to create a new resource account or register an existing resource account, and apply an account baseline to the account.
The operation to create an account is an asynchronous procedure. After a resource account is created, the Account Factory baseline is implemented on the account. You can call the GetEnrolledAccount operation to query the account details and obtain the implementation result.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
governance:EnrollAccount |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AccountNamePrefix |
string |
No |
The prefix of the account name.
|
test-account |
| DisplayName |
string |
No |
The display name of the account.
|
test-account |
| FolderId |
string |
No |
The ID of the parent folder.
|
fd-5ESoku**** |
| PayerAccountUid |
integer |
No |
The ID of the billing account.
|
19534534552**** |
| AccountUid |
integer |
No |
The ID of the account to create an account.
|
12868156179**** |
| BaselineItems |
array<object> |
No |
The baseline item configurations. If this parameter is specified, the baseline item configurations are merged with the specified account baseline. For identical baseline items, the configurations in this parameter take precedence. Leave this parameter empty, specify the account baseline by using the |
|
|
object |
No |
The baseline item configuration. |
||
| Config |
string |
No |
The baseline item configuration. |
{\"Notifications\":[{\"GroupKey\":\"account_msg\",\"Contacts\":[{\"Name\":\"aa\"}],\"PmsgStatus\":1,\"EmailStatus\":1,\"SmsStatus\":1}]} |
| Name |
string |
No |
The name of the baseline item. |
ACS-BP_ACCOUNT_FACTORY_VPC |
| Skip |
boolean |
No |
Specifies whether to skip the baseline item. Valid values:
|
false |
| Version |
string |
No |
The version of the baseline item. |
1.0 |
| BaselineId |
string |
No |
The ID of the baseline. If this parameter is left empty, the system default baseline is used by default. |
afb-bp1durvn3lgqe28v**** |
| ResellAccountType |
string |
No |
The identity type of the member. Valid values:
Note
This parameter is supported only for reseller customers on the Alibaba Cloud International website. |
resell |
| RegionId |
string |
No |
The region ID. |
cn-hangzhou |
| Tag |
array<object> |
No |
The list of tags. A maximum of 20 tags can be specified. |
|
|
object |
No |
The tags. |
||
| Key |
string |
No |
The tag key. |
tagKey |
| Value |
string |
No |
The tag value. |
tagValue |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| AccountUid |
integer |
The ID of the account to create an account. |
143165363236**** |
| RequestId |
string |
The request ID. |
7071E5FA-515E-5F53-B335-B87D619C6A66 |
Examples
Success response
JSON format
{
"AccountUid": 0,
"RequestId": "7071E5FA-515E-5F53-B335-B87D619C6A66"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter %s is not valid. | The specified parameter %s is invalid. |
| 400 | DeployConflict.Blueprint | The %s blueprint is being deployed. Please wait for its deployment to complete and try again. | A blueprint is being implemented. Try again later after the blueprint is implemented. |
| 400 | DependencyViolation.Blueprint | The %s blueprint has not been deployed. Please deploy the resource structure first. | You have not deployed a dependent blueprint. You must deploy the dependent blueprint. |
| 400 | DependencyViolation.BaselineItem | The dependency of %s baseline item has not been configured. Please config %s first. | No dependency baseline items are configured. Before you can proceed, you must configure a dependency baseline item. |
| 400 | IncorrectBlueprintStatus | The current status of the blueprint does not support this operation. | The current status of the blueprint does not support this operation. |
| 500 | InternalError | A system error occurred. | A system error occurred. |
| 403 | InvalidUser.NotResourceDirectoryMaster | The specified account is not a master account of resource directory. | The specified account is not a master account of resource directory. |
| 404 | InvalidUser.NotFound | The specified user does not exist. | The user does not exist. |
| 404 | InvalidBlueprint.NotFound | The specified blueprint does not exist. | The specified blueprint does not exist. |
| 404 | InvalidBaselineItem.NotFound | The specified baseline item named %s does not exist. | The specified baseline item does not exist. |
| 404 | InvalidEnterpriseRealName.NotFound | The specified account has not passed enterprise real name verification. Please complete the verification for the account first. | The specified account has not passed enterprise real-name verification. Please complete the verification for the account first. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.