All Products
Search
Document Center

Cloud Governance Center:EnrollAccount

Last Updated:Oct 25, 2024

Enrolls an account. You can create a new account or manage an existing account in the account factory.

Operation description

You can call this API operation to create a new account or manage an existing account and apply the account baseline to the account.

Accounts are created in asynchronous mode. After you create an account, you can apply the account baseline to the account. You can call the GetEnrolledAccount API operation to view the details about the account to obtain the result of applying the account baseline to the account.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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
governance:EnrollAccountcreate
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
AccountNamePrefixstringNo

The prefix for the account name of the member.

  • If the account baseline is applied to an account that is newly created, you must configure this parameter.
  • If the account baseline is applied to an existing account, you do not need to configure this parameter.
test-account
DisplayNamestringNo

The display name of the account.

  • If the account baseline is applied to an account that is newly created, you must configure this parameter.
  • If the account baseline is applied to an existing account, you do not need to configure this parameter.
test-account
FolderIdstringNo

The ID of the parent folder.

  • If the account baseline is applied to an account that is newly created, you need to specify a parent folder. If you do not configure this parameter, the account is created in the Root folder.
  • If the account baseline is applied to an existing account, you do not need to configure this parameter.
fd-5ESoku****
PayerAccountUidlongNo

The ID of the billing account.

  • If the account baseline is applied to an account that is newly created, you need to specify a billing account. If you do not configure this parameter, the self-pay settlement method is used for the account.
  • If the account baseline is applied to an existing account, you do not need to configure this parameter.
19534534552****
AccountUidlongNo

The account ID.

  • If the account baseline is applied to an account that is newly created, you do not need to configure this parameter.
  • If the account baseline is applied to an existing account, you must configure this parameter.
12868156179****
BaselineItemsarray<object>No

An array that contains baseline items.

If this parameter is specified, the configurations of the baseline items are merged with the baseline of the specified account. The configurations of the same baseline items are subject to the configuration of this parameter. We recommend that you leave this parameter empty and configure the BaselineId parameter to specify an account baseline and apply the configuration of the account baseline to the account.

BaselineItemobjectNo

The configurations of the baseline item.

ConfigstringNo

The configurations of the baseline item.

{\"Notifications\":[{\"GroupKey\":\"account_msg\",\"Contacts\":[{\"Name\":\"aa\"}],\"PmsgStatus\":1,\"EmailStatus\":1,\"SmsStatus\":1}]}
NamestringNo

The name of the baseline item.

ACS-BP_ACCOUNT_FACTORY_VPC
SkipbooleanNo

Specifies whether to skip the baseline item. Valid values:

  • false: The baseline item is not skipped.
  • true: The baseline item is skipped.
false
VersionstringNo

The version of the baseline item.

1.0
BaselineIdstringNo

The baseline ID.

If this parameter is left empty, the default baseline is used.

afb-bp1durvn3lgqe28v****
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
RegionIdstringNo

The region ID.

cn-hangzhou
Tagarray<object>No

The tags. You can specify up to 20 tags.

objectNo

The tag.

KeystringNo

The tag key.

tagKey
ValuestringNo

The tag value.

tagValue

Response parameters

ParameterTypeDescriptionExample
object

The returned result.

AccountUidlong

The account ID.

143165363236****
RequestIdstring

The request ID.

7071E5FA-515E-5F53-B335-B87D619C6A66

Examples

Sample success responses

JSONformat

{
  "AccountUid": 0,
  "RequestId": "7071E5FA-515E-5F53-B335-B87D619C6A66"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameterThe specified parameter %s is not valid.The specified parameter %s is invalid.
400DeployConflict.BlueprintThe %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.
400DependencyViolation.BlueprintThe %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.
400DependencyViolation.BaselineItemThe 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.
400IncorrectBlueprintStatusThe current status of the blueprint does not support this operation.The current status of the blueprint does not support this operation.
403InvalidUser.NotResourceDirectoryMasterThe specified account is not a master account of resource directory.The specified account is not a master account of resource directory.
404InvalidUser.NotFoundThe specified user does not exist.The user does not exist.
404InvalidBlueprint.NotFoundThe specified blueprint does not exist.The specified blueprint does not exist.
404InvalidBaselineItem.NotFoundThe specified baseline item named %s does not exist.The specified baseline item does not exist.
404InvalidEnterpriseRealName.NotFoundThe 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.
500InternalErrorA system error occurred.A system error occurred.

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

Change history

Change timeSummary of changesOperation
2023-03-15The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details