Obtains a list of resources aggregated across regions within all member accounts of a specific account group.
Operation description
This topic provides an example on how to query the resources within the member account 100931896542****
of the account group ca-c560626622af0005****
. The result indicates that eight resources are queried.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
config:ListAggregateDiscoveredResources | List |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ResourceId | string | No | The resource ID. | eni-hp31cqoba96jagtz**** |
ResourceDeleted | integer | No | The status of the resource. Valid values:
| 1 |
MaxResults | integer | Yes | The maximum number of entries to return for a single request. Valid values: 1 to 100. | 10 |
NextToken | string | No | The | IWBjqMYSy0is7zSMGu16**** |
ResourceTypes | string | No | The type of the resource. Separate multiple resource types with commas (,). | ACS::ECS::NetworkInterface |
Regions | string | No | The ID of the region in which the resource resides. Separate multiple region IDs with commas (,). | cn-huhehaote |
AggregatorId | string | Yes | The ID of the account group. For more information about how to obtain the ID of the account group, see ListAggregators . | ca-c560626622af0005**** |
ResourceAccountId | long | No | The ID of the Alibaba Cloud account to which the specified resource belongs in the account group. | 100931896542**** |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"DiscoveredResourceProfiles": {
"DiscoveredResourceProfileList": [
{
"ResourceType": "ACS::ECS::NetworkInterface",
"Region": "cn-huhehaote",
"ResourceCreationTime": 1618675206000,
"Tags": "{\\\"key1\\\":[\\\"value2\\\"]}",
"AccountId": 0,
"ResourceId": "eni-hp31cqoba96jagtz****",
"ResourceName": "Cloud Firewall",
"ResourceDeleted": 1,
"ResourceStatus": "InUse",
"ResourceOwnerId": 0,
"Version": 1,
"AvailabilityZone": "cn-huhehaote-a"
}
],
"NextToken": "IWBjqMYSy0is7zSMGu16****",
"MaxResults": 10,
"TotalCount": 8
},
"RequestId": "C7817373-78CB-4F9A-8AFA-E7A88E9D64A2"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | NoPermission | You are not authorized to perform this operation. | You are not authorized to perform this operation. |
400 | MemberNotBelongToMaster | The specified member does not belong to your organization. | The specified member does not belong to your organization. |
404 | AccountNotExisted | Your account does not exist. | The specified 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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-04-12 | API Description Update. The Error code has changed | see changesets | ||||||||||||
| ||||||||||||||
2023-04-11 | The Error code has changed. The request parameters of the API has changed | see changesets | ||||||||||||
|