All Products
Search
Document Center

Cloud Config:CreateAggregator

Last Updated:Jun 17, 2024

Creates an account group.

Operation description

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.

This topic provides an example on how to create an account group of the CUSTOM type. The custom account group is named 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.

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
config:CreateAggregatorWrite
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
AggregatorNamestringYes

The name of the account group.

Test_Group
DescriptionstringYes

The description of the account group.

Aggregator description.
AggregatorAccountsobject []No

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

[{
	"accountId": 171322098523****,
	"accountType":"ResourceDirectory",
                "accountName":"Alice"
}, {
	"accountId": 100532098349****,
	"accountType":"ResourceDirectory",
                "accountName":"Tom"
}]
Note If AggregatorType is set to RD or FOLDER, this parameter can be left empty, which indicates that all accounts in the resource directory are added to the global account group.
AccountIdlongNo

The member account ID. For more information about how to obtain the ID of a member account, see ListAccounts .

171322098523****
AccountNamestringNo

The name of the member account. For more information about how to obtain the name of a member account, see ListAccounts .

Alice
AccountTypestringNo

The type of the member account. Set this parameter to ResourceDirectory.

ResourceDirectory
ClientTokenstringNo

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 token can contain only ASCII characters and cannot exceed 64 characters in length.

1594295238-f9361358-5843-4294-8d30-b5183fac****
AggregatorTypestringNo

The type of the account group. Valid values:

  • RD: global account group.
  • FOLDER: account group of the folder.
  • CUSTOM (default): custom account group.
CUSTOM
FolderIdstringNo

The ID of the folder to which the account group is attached. You must specify this parameter if AggregatorType is set to FOLDER.

fd-brHdgv****

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

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

8195B664-9565-4685-89AC-8B5F04B44B92
AggregatorIdstring

The account group ID.

ca-dacf86d8314e00eb****

Examples

Sample success responses

JSONformat

{
  "RequestId": "8195B664-9565-4685-89AC-8B5F04B44B92",
  "AggregatorId": "ca-dacf86d8314e00eb****"
}

Error codes

HTTP status codeError codeError messageDescription
400Invalid.AggregatorAccounts.EmptyYou must specify AggregatorAccounts.You must specify AggregatorAccounts.
400Invalid.AggregatorAccounts.ValueThe specified AggregatorAccounts is invalid.The specified AggregatorAccounts is invalid.
400Invalid.AccountType.ValueThe specified AccountType is invalid.The specified account type is invalid.
400AggregatorExceedMaxCountThe maximum number of aggregator is exceeded.The maximum number of aggregator is exceeded.
400AggregatorAccountListDuplicatedThe aggregator account list is duplicated.The aggregator account list is duplicated.
400AggregatorAccountListItemDuplicatedThe aggregator account list item is duplicated.The aggregator account list item is duplicated.
400AggregatorNameDuplicatedThe aggregator name is duplicated.The aggregator name is duplicated.
403NoPermissionCreateAggregatorYou are not authorized to create the aggregator.You are not authorized to create the aggregator.
404AccountNotExistedYour account does not exist.The specified account does not exist.
503ServiceUnavailableThe request has failed due to a temporary failure of the server.The request has failed due to a temporary failure of the server.

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

Change history

Change timeSummary of changesOperation
2023-12-20The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 503