Creates an account group. The management account or a delegated administrator account in a resource directory can create account groups to centrally manage resources, compliance packages, and rules for multiple members.
Operation description
Limits
A management account or delegated administrator account can create up to 5 account groups. Each account group can contain up to 200 member accounts.
Background information
For more information about the concepts and common scenarios of account groups, and the impact of member account changes in a resource directory on Cloud Config, see Overview.
Cloud Config supports the following types of account groups:
-
Global account group: A global account group contains all members in the resource directory and automatically detects and synchronizes member changes in the resource directory. A management account or delegated administrator account can create only one global account group.
-
Custom account group: When a management account or delegated administrator account creates a custom account group, it manually selects all or some member accounts from the resource directory.
-
When a new member is added to the resource directory, the custom account group does not perform automatic synchronization. The management account or delegated administrator account must manually add the new member to the account group.
-
When a member is removed from the resource directory, the management account or delegated administrator account no longer has the permissions to manage compliance for that member. The custom account group automatically detects this change and removes the member from the custom account group.
-
-
Folder-based account group: After a management account or delegated administrator account selects a folder to create an account group, the account group automatically detects and performs synchronization of member changes in the folder. The members in a folder-based account group always stay consistent with the folder.
Each time a management account or delegated administrator account creates a folder-based account group, only one non-empty folder can be selected.
Operation description
This topic provides an example of how a management account creates a custom account group named CUSTOM. The account group name is Test_Group, and the account group description is Test group. The member accounts information is as follows:
-
The member accounts ID is
171322098523****, and the member accounts name isAlice. -
The member accounts ID is
100532098349****, and the member accounts name isTom.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
config:CreateAggregator |
create |
*Aggregator
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AggregatorName |
string |
Yes |
The name of the account group. |
Example_Aggregator |
| Description |
string |
No |
The description of the account group. |
Example aggregator used to demonstrate how to create an aggregator. |
| AggregatorAccounts |
array<object> |
No |
All member accounts in the account group. Note
|
|
|
object |
No |
The member account information. |
||
| AccountId |
integer |
No |
The ID of the member account. For information about how to obtain the member account ID, see ListAccounts. |
171322098523**** |
| AccountName |
string |
No |
The name of the member account. For information about how to obtain the member account name, see ListAccounts. |
Alice |
| AccountType |
string |
No |
The affiliation of the member account. Only |
ResourceDirectory |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The ClientToken parameter supports only ASCII characters and cannot exceed 64 characters in length. |
1594295238-f9361358-5843-4294-8d30-b5183fac**** |
| AggregatorType |
string |
No |
The type of the account group. Valid values:
|
CUSTOM |
| FolderId |
string |
No |
The ID of the folder to bind. Multiple folder IDs are supported. Separate multiple folder IDs with commas (,). This parameter is required if AggregatorType is set to |
fd-brHdgv****,fd-brHdgk**** |
| Tag |
array<object> |
No |
The tags of the resource. You can add up to 20 tags. |
|
|
object |
No |
The tags of the resource. You can add up to 20 tags. |
||
| Key |
string |
No |
The tag key of the resource. You can specify up to 20 tag keys. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot start with aliyun or acs:. The tag key cannot contain http:// or https://. |
key-1 |
| Value |
string |
No |
The tag value of the resource. You can specify up to 20 tag values. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with |
value-1 |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
8195B664-9565-4685-89AC-8B5F04B44B92 |
| AggregatorId |
string |
The account group ID. |
ca-dacf86d8314e00eb**** |
Examples
Success response
JSON format
{
"RequestId": "8195B664-9565-4685-89AC-8B5F04B44B92",
"AggregatorId": "ca-dacf86d8314e00eb****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Invalid.AggregatorAccounts.Empty | You must specify AggregatorAccounts. | You must specify AggregatorAccounts. |
| 400 | Invalid.AggregatorAccounts.Value | The specified AggregatorAccounts is invalid. | The specified AggregatorAccounts is invalid. |
| 400 | Invalid.AccountType.Value | The specified AccountType is invalid. | The specified account type is invalid. |
| 400 | AggregatorExceedMaxCount | The maximum number of aggregator is exceeded. | The maximum number of aggregator is exceeded. |
| 400 | AggregatorAccountListDuplicated | The aggregator account list is duplicated. | The aggregator account list is duplicated. |
| 400 | AggregatorAccountListItemDuplicated | The aggregator account list item is duplicated. | The aggregator account list item is duplicated. |
| 400 | AggregatorNameDuplicated | The aggregator name is duplicated. | The aggregator name is duplicated. |
| 403 | NoPermissionCreateAggregator | You are not authorized to create the aggregator. | You are not authorized to create the aggregator. |
| 404 | AccountNotExisted | Your account does not exist. | |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | The request has failed due to a temporary failure of the server. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.