Queries account groups.
The sample request in this topic shows you how to query account groups. A maximum
of 10 entries can be returned for the request. As shown in the responses, the account
group returned is named as Test_Group
, its description is Test account group
, and it is of the CUSTOM
type, which indicates a custom account group. The account group contains two member
accounts.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListAggregators |
The operation that you want to perform. Set the value to ListAggregators. |
NextToken | String | No | TGlzdFJlc291cmNlU2hhcmVzJjE1MTI2NjY4NzY5MTAzOTEmMiZORnI4NDhVeEtrUT0 |
The token that is used to initiate the next request. If the response of the current request is truncated, this token is used to initiate another request and obtain the remaining entries. |
MaxResults | Integer | Yes | 10 |
The maximum number of entries to return for a single request. Valid values: 1 to 100. |
For information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 20C8526D-12C5-4336-BC72-EBD5D1BA732F |
The ID of the request. |
AggregatorsResult | Object |
The account groups returned. |
|
NextToken | String | TGlzdFJlc291cmNlU2hhcmVzJjE1MTI2NjY4NzY5MTAzOTEmMiZORnI4NDhVeEtrUT0 |
The token that is used to initiate the next request. If the response of the current request is truncated, this token is used to initiate another request and obtain the remaining entries. |
Aggregators | Array of Aggregators |
The information about the account groups. |
|
AggregatorCreateTimestamp | Long | 1623036305000 |
The timestamp when the account group was created. |
AggregatorAccountCount | Long | 2 |
The number of member accounts in the account group. |
Description | String | Test account group |
The description of the account group. |
AggregatorName | String | Test_Group |
The name of the account group. |
AggregatorStatus | Integer | 1 |
The status of the account group. Valid values:
|
AggregatorType | String | CUSTOM |
The type of the account group. Valid values:
|
AccountId | Long | 100931896542**** |
The ID of the management account used to create the account group. |
AggregatorId | String | ca-88ea626622af0055**** |
The ID of the account group. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ListAggregators
&MaxResults=10
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListAggregatorsResponse>
<RequestId>20C8526D-12C5-4336-BC72-EBD5D1BA732F</RequestId>
<AggregatorsResult>
<NextToken></NextToken>
<Aggregators>
<AggregatorName>Test_Group</AggregatorName>
<Description>Test account group</Description>
<AccountId>100931896542****</AccountId>
<AggregatorCreateTimestamp>1623036305000</AggregatorCreateTimestamp>
<AggregatorAccountCount>2</AggregatorAccountCount>
<AggregatorStatus>1</AggregatorStatus>
<AggregatorType>CUSTOM</AggregatorType>
<AggregatorId>ca-9190626622af00a9****</AggregatorId>
</Aggregators>
</AggregatorsResult>
</ListAggregatorsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "20C8526D-12C5-4336-BC72-EBD5D1BA732F",
"AggregatorsResult" : {
"NextToken" : "",
"Aggregators" : [ {
"AggregatorName" : "Test_Group",
"Description" : "Test account group",
"AccountId" : "100931896542****",
"AggregatorCreateTimestamp" : 1623036305000,
"AggregatorAccountCount" : 2,
"AggregatorStatus" : 1,
"AggregatorType" : "CUSTOM",
"AggregatorId" : "ca-9190626622af00a9****"
} ]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | NoPermission | You are not authorized to perform this operation. | The error message returned because you are not authorized to perform the specified operation. |
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.