All Products
Search
Document Center

Cloud Config:ListAggregateDiscoveredResources

Last Updated:Mar 08, 2023

Queries the resources in an account group.

Operation Description

This example shows how to query the resources in the ca-c560626622af0005**** account group. The response shows that the account group contains eight resources.

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 keyAssociation operation
config:ListAggregateDiscoveredResourcesList
  • Config
    acs:config:*:{#accountId}:*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ResourceIdstringNo

The ID of the resource.

eni-hp31cqoba96jagtz****
ResourceDeletedintegerNo

Indicates whether the resource is deleted. Valid values:

  • 0: The resource is deleted.
  • 1: The resource is retained. This is the default value.
1
MaxResultsintegerYes

The maximum number of entries to return for a single request. Valid values: 1 to 100.

10
NextTokenstringNo

The token that you want to use to initiate the current request. If the response of the previous request is truncated, you can use this token to initiate another request and obtain the remaining entries.``

IWBjqMYSy0is7zSMGu16****
ResourceTypesstringNo

The type of the resource. Separate multiple resource types with commas (,).

ACS::ECS::NetworkInterface
RegionsstringNo

The ID of the region where the resource resides. Separate multiple region IDs with commas (,).

cn-huhehaote
AggregatorIdstringYes

The ID of the account group.

For more information about how to obtain the ID of an account group, see ListAggregators.

ca-c560626622af0005****

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

Response parameters

ParameterTypeDescriptionExample
object
DiscoveredResourceProfilesobject

The return result of the request.

DiscoveredResourceProfileListarray

The information about resources.

object
ResourceTypestring

The type of the resource.

ACS::ECS::NetworkInterface
Regionstring

The region ID.

cn-huhehaote
ResourceCreationTimelong

The timestamp when the resource was created. Unit: milliseconds.

1618675206000
Tagsstring

The tags of the resource.

{\"key1\":[\"value2\"]}
AccountIdlong

The ID of the Alibaba Cloud account to which the resource belongs.

161259599160****
ResourceIdstring

The ID of the resource.

eni-hp31cqoba96jagtz****
ResourceNamestring

The name of the resource.

Cloud Firewall
ResourceDeletedinteger

Indicates whether the resource is deleted. Valid values:

  • 0: The resource is deleted.
  • 1: The resource is retained.
1
ResourceStatusstring

Indicates whether the resource is deleted. The value of this parameter varies based on the resource type and may be left empty. Example:

  • If the value of the ResourceType parameter is ACS::ECS::Instance, the resource is an Elastic Compute Service (ECS) instance that is in a specific state. In this case, the valid values of this parameter are Running and Stopped.
  • If the value of the ResourceType parameter is ACS::OSS::Bucket, the resource is an Object Storage Service (OSS) bucket that is not in a specific state. In this case, this parameter is left empty.
InUse
ResourceOwnerIdlong

The ID of the Alibaba Cloud account to which the resources belong.

161259599160****
Versionlong

The build version of the resource.

1
AvailabilityZonestring

The ID of the zone where the resource resides.

cn-huhehaote-a
NextTokenstring

The token that was used to initiate the next request.

IWBjqMYSy0is7zSMGu16****
MaxResultsinteger

The maximum number of entries returned on each page.

10
TotalCountinteger

The total number of resources.

8
RequestIdstring

The ID of the request.

C7817373-78CB-4F9A-8AFA-E7A88E9D64A2

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400NoPermissionYou are not authorized to perform this operation.You are not authorized to perform this operation.
400MemberNotBelongToMasterThe specified member does not belong to your organization.The specified member does not belong to your organization.
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.