Creates an account group.

Each management account can create a maximum of five account groups. Each account group can contain a maximum of 200 member accounts.

Cloud Config supports the following types of account groups:

  • Global account group: The global account group contains all the member accounts that are added to the resource directory. A management account can create only one global account group.
  • Custom account group: If you create a custom account group, you must manually add all or specific member accounts from the resource directory to the custom account group.

In the example of this topic, a request is sent to create an account group of the CUSTOM type. The custom account group is named as Test_Group and its description is Test account group. The custom account group contains the following two member accounts:

  • Member account ID: 171322098523****. Member account name: Alice.
  • Member account ID: 100532098349****. Member account name: Tom.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateAggregator

The operation that you want to perform. Set the value to CreateAggregator.

AggregatorName String Yes Test_Group

The name of the account group.

Description String Yes Test account group

The description of the account group.

AggregatorAccounts Array Yes

The information about the member accounts in the account group. Example:


[{
	"accountId": 171322098523****,
	"accountType":"ResourceDirectory",
                "accountName":"Alice"
}, {
	"accountId": 100532098349****,
	"accountType":"ResourceDirectory",
                "accountName":"Tom"
}]
AccountId Long Yes 171322098523****

The member account ID, which indicates the Alibaba Cloud account ID of the member account.

For more information about how to query member account IDs, see ListAccounts.

AccountName String Yes Alice

The member account name, which indicates the name of the Alibaba Cloud account that corresponds to the member account.

For more information about how to query member account names, see ListAccounts.

AccountType String Yes ResourceDirectory

The affiliation of the member account. You can set this parameter to only ResourceDirectory.

ClientToken String No 1594295238-f9361358-5843-4294-8d30-b5183fac****

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. ClientToken can contain only ASCII characters and cannot exceed 64 characters in length.

AggregatorType String No CUSTOM

The type of the account group. Valid values:

  • RD: global account group.
  • CUSTOM: custom account group. This is the default value.

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

Response parameters

Parameter Type Example Description
RequestId String 8195B664-9565-4685-89AC-8B5F04B44B92

The ID of the request.

AggregatorId String ca-dacf86d8314e00eb****

The ID of the account group.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateAggregator
&AggregatorName=Test_Group
&Description=Test account group
&AggregatorAccounts=[{"accountId": 171322098523****,"accountType":"ResourceDirectory","accountName":"Alice"}, {"accountId": 100532098349****,"accountType":"ResourceDirectory","accountName":"Tom"}]
&AggregatorType=CUSTOM
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateAggregatorResponse>
	<RequestId>0093E9C4-F871-4C1F-80C5-7534D287B023</RequestId>
	<AggregatorId>ca-8bde626622af00a9****</AggregatorId>
</CreateAggregatorResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "0093E9C4-F871-4C1F-80C5-7534D287B023",
  "AggregatorId" : "ca-8bde626622af00a9****"
}

Error codes

HTTP status code Error code Error message Description
400 Invalid.AggregatorAccounts.Empty You must specify AggregatorAccounts. The error message returned because no member account is specified.
400 Invalid.AggregatorAccounts.Value The specified AggregatorAccounts is invalid. The error message returned because one or more specified member accounts are invalid.
400 Invalid.AccountType.Value The specified AccountType is invalid. The error message returned because the AccountType parameter in the request is invalid.
400 AggregatorExceedMaxCount The maximum number of aggregator is exceeded. The error message returned because the number of created account groups reaches the upper limit.
400 AggregatorAccountListDuplicated The aggregator account list is duplicated. The error message returned because an existing account group contains the same member accounts that you specify for this account group.
400 AggregatorAccountListItemDuplicated The aggregator account list item is duplicated. The error message returned because two or more specified member accounts are duplicated.
400 AggregatorNameDuplicated The aggregator name is duplicated. The error message returned because the specified group name already exists.
400 Invalid.AggregatorAccounts.SizeExceed The maximum number of AggregatorAccounts is 200. The error message returned because the number of specified member accounts exceeds 200.
403 NoPermissionCreateAggregator You are not authorized to create the aggregator. The error message returned because you are not authorized to create an account group.
404 AccountNotExisted Your account does not exist. The error message returned because your account does not exist.
503 ServiceUnavailable The request has failed due to a temporary failure of the server. The error message returned because the service is unavailable.

For a list of error codes, visit the API Error Center.