BatchEnrollAccounts

Updated at:

Applies an account baseline to multiple existing resource accounts at a time.

Operation description

You can call this operation to apply an account baseline to existing resource accounts.

Accounts are enrolled in the account factory in asynchronous mode. After a resource account is created, an account baseline is applied to the account. You can call the GetEnrolledAccount operation to query the details of the account enrolled in the account factory and check whether the account baseline is applied to the account.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

governance:BatchEnrollAccounts

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Accounts

array<object>

No

The resource accounts.

object

No

The information about the resource account.

AccountUid

integer

No

The account ID. This parameter is required.

12868156179****

BaselineItems

array<object>

No

The baseline items.

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

object

No

The configurations of the baseline item.

Config

string

No

The configurations of the baseline item.

{"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

  • true

false

Version

string

No

The version of the baseline item.

1.0

BaselineId

string

No

The baseline ID.

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

afb-bp1durvn3lgqe28v****

RegionId

string

No

The region ID.

cn-hangzhou

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

16B208DD-86BD-5E7D-AC93-FFD44B6FBDF1

Examples

Success response

JSON format

{
  "RequestId": "16B208DD-86BD-5E7D-AC93-FFD44B6FBDF1"
}

Error codes

HTTP status code

Error code

Error message

Description

500 InternalError A system error occurred. A system error occurred.
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.