All Products
Search
Document Center

Cloud Config:GetAggregateDiscoveredResource

Last Updated:Sep 02, 2026

Retrieves the details of a specified resource in an account group.

Operation description

This topic provides an example on how to query the details of the ECS instance i-bp12g4xbl4i0brkn**** in the China (Hangzhou) region within the account group ca-5885626622af0008****.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

config:GetAggregateDiscoveredResource

get

*Resource

acs:config:*:{#accountId}:resource/{#ResourceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

ResourceId

string

Yes

The resource ID.

For information about how to obtain a resource ID, see ListAggregateDiscoveredResources.

i-bp12g4xbl4i0brkn****

ResourceType

string

Yes

The resource type.

For information about how to obtain a resource type, see ListAggregateDiscoveredResources.

ACS::ECS::Instance

Region

string

Yes

The ID of the region in which the resource resides.

For information about how to obtain the region ID, see ListAggregateDiscoveredResources.

cn-hangzhou

AggregatorId

string

Yes

The account group ID.

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

ca-5885626622af0008****

ResourceAccountId

integer

No

Required. The Alibaba Cloud account ID of the resource that you want to query in the account group.

100931896542****

ComplianceOption

integer

No

Specifies whether to query the compliance result of the resource. Valid values:

  • 0 (default): does not query the compliance result.

  • 1: queries the compliance result.

Valid values:

  • 0 :

    Does not query the compliance result.

  • 1 :

    Queries the compliance result.

0

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

Response elements

Element

Type

Description

Example

object

None.

RequestId

string

The request ID.

E4D71ACE-6B0A-46E0-8352-56952378CC7F

DiscoveredResourceDetail

object

The resource details.

AvailabilityZone

string

The zone of the resource.

cn-hangzhou-h

ResourceType

string

The resource type.

ACS::ECS::Instance

Configuration

string

The complete configuration of the resource.

{\"ResourceGroupId\":\"\",\"Memory\":4096,\"InstanceChargeType\":\"PostPaid\",\"Cpu\":2,\"OSName\":\"Windows Server 2022 DataCenter Edition 64bit Chinese Edition\",\"InstanceNetworkType\":\"vpc\",\"InnerIpAddress\":{\"IpAddress\":[]},\"ExpiredTime\":\"2099-12-31T15:59Z\",\"ImageId\":\"win2022_21H2_x64_dtc_zh-cn_40G_alibase_20240110.vhd\",\"EipAddress\":{\"AllocationId\":\"\",\"IpAddress\":\"\",\"InternetChargeType\":\"\"},\"ImageOptions\":{},\"VlanId\":\"\",\"HostName\":\"iZl4i0brknq****\",\"Status\":\"Stopped\",\"HibernationOptions\":{\"Configured\":false},\"MetadataOptions\":{\"HttpTokens\":\"\",\"HttpEndpoint\":\"\"},\"InstanceId\":\"i-bp12g4xbl4i0brkn****\",\"StoppedMode\":\"KeepCharging\",\"CpuOptions\":{\"ThreadsPerCore\":2,\"Numa\":\"ON\",\"CoreCount\":1},\"StartTime\":\"2024-02-29T07:08Z\",\"DeletionProtection\":false,\"VpcAttributes\":{\"PrivateIpAddress\":{\"IpAddress\":[\"172.16.XX.XX\"]},\"VpcId\":\"vpc-bp1wjaw8t272wwmkg****\",\"VSwitchId\":\"vsw-bp103i8xzww5132ul****\",\"NatIpAddress\":\"\"},\"SecurityGroupIds\":{\"SecurityGroupId\":[\"sg-bp1h96fz9fagaegp****\"]},\"InternetChargeType\":\"PayByTraffic\",\"InstanceName\":\"test123\",\"DeploymentSetId\":\"\",\"InternetMaxBandwidthOut\":5,\"SerialNumber\":\"6764f567-28fb-4a39-bfc3-48404995****\",\"OSType\":\"windows\",\"CreationTime\":\"2024-02-29T07:08Z\",\"AutoReleaseTime\":\"\",\"Description\":\"\",\"InstanceTypeFamily\":\"ecs.c7\",\"DedicatedInstanceAttribute\":{\"Tenancy\":\"\",\"Affinity\":\"\"},\"PublicIpAddress\":{\"IpAddress\":[\"47.98.XX.XX\"]},\"GPUSpec\":\"\",\"NetworkInterfaces\":{\"NetworkInterface\":[{\"Type\":\"Primary\",\"PrimaryIpAddress\":\"172.16.XX.XX\",\"MacAddress\":\"00:16:3e:0c:**:**\",\"NetworkInterfaceId\":\"eni-bp19uj35v8won3x9****\",\"PrivateIpSets\":{\"PrivateIpSet\":[{\"PrivateIpAddress\":\"172.16.XX.XX\",\"Primary\":true}]}}]},\"SpotPriceLimit\":0.0,\"SaleCycle\":\"\",\"DeviceAvailable\":true,\"InstanceType\":\"ecs.c7.large\",\"OSNameEn\":\"Windows Server 2022 DataCenter Edition 64bit Chinese Edition\",\"SpotStrategy\":\"NoSpot\",\"IoOptimized\":true,\"ZoneId\":\"cn-hangzhou-b\",\"ClusterId\":\"\",\"EcsCapacityReservationAttr\":{\"CapacityReservationPreference\":\"\",\"CapacityReservationId\":\"\"},\"DedicatedHostAttribute\":{\"DedicatedHostId\":\"\",\"DedicatedHostName\":\"\",\"DedicatedHostClusterId\":\"\"},\"GPUAmount\":0,\"OperationLocks\":{\"LockReason\":[]},\"InternetMaxBandwidthIn\":2000,\"Recyclable\":false,\"RegionId\":\"cn-hangzhou\",\"CreditSpecification\":\"\"}

Region

string

The region ID.

cn-hangzhou

ResourceCreationTime

integer

The time when the resource was created. This value is a UNIX timestamp in milliseconds.

1624961112000

Tags

string

The resource tags.

{\"\"hc\"\":[\"\"value2\"\"]}

AccountId

integer

The Alibaba Cloud account ID of the resource owner.

100931896542****

ResourceId

string

The resource ID.

i-bp12g4xbl4i0brkn****

ResourceDeleted

integer

The deletion status of the resource. Valid values:

  • 1: not deleted.

  • 0: deleted.

1

ResourceName

string

The resource name.

test123

ResourceStatus

string

The resource status. The status of a resource depends on how each cloud service defines it. This parameter may be empty. For example:

  • If the resource type is ACS::ECS::Instance, the ECS instance has a status, so this parameter is Running or Stopped.

  • If the resource type is ACS::OSS::Bucket, the OSS bucket is stateless, so this parameter is empty.

Stopped

ComplianceType

string

The compliance type. Valid values:

  • COMPLIANT: compliant.

  • NON_COMPLIANT: non-compliant.

  • NOT_APPLICABLE: not applicable.

  • INSUFFICIENT_DATA: insufficient data.

COMPLIANT

VpcId

string

The ID of the VPC to which the resource belongs. Format: vpc-t4nhheyvay74fp7n0hxxx. An empty string ("") is returned if the resource does not belong to a VPC.

vpc-t4nhheyvay74fp7n0hxxx

VSwitchId

string

The ID of the vSwitch to which the resource belongs. Format: vsw-t4n7pokxxxxxxxxxxxxxx. Multiple values are separated by commas, such as vsw-t4n7pokxxxxxxxxxxxxxx,vsw-t4n7pokxxxxxxxxxxxxxx. An empty string ("") is returned if the resource does not belong to a vSwitch.

vsw-t4n7pokxxxxxxxxxxxxxx

Examples

Success response

JSON format

{
  "RequestId": "E4D71ACE-6B0A-46E0-8352-56952378CC7F",
  "DiscoveredResourceDetail": {
    "AvailabilityZone": "cn-hangzhou-h",
    "ResourceType": "ACS::ECS::Instance",
    "Configuration": "{\\\"ResourceGroupId\\\":\\\"\\\",\\\"Memory\\\":4096,\\\"InstanceChargeType\\\":\\\"PostPaid\\\",\\\"Cpu\\\":2,\\\"OSName\\\":\\\"Windows Server  2022 数据中心版 64位中文版\\\",\\\"InstanceNetworkType\\\":\\\"vpc\\\",\\\"InnerIpAddress\\\":{\\\"IpAddress\\\":[]},\\\"ExpiredTime\\\":\\\"2099-12-31T15:59Z\\\",\\\"ImageId\\\":\\\"win2022_21H2_x64_dtc_zh-cn_40G_alibase_20240110.vhd\\\",\\\"EipAddress\\\":{\\\"AllocationId\\\":\\\"\\\",\\\"IpAddress\\\":\\\"\\\",\\\"InternetChargeType\\\":\\\"\\\"},\\\"ImageOptions\\\":{},\\\"VlanId\\\":\\\"\\\",\\\"HostName\\\":\\\"iZl4i0brknq****\\\",\\\"Status\\\":\\\"Stopped\\\",\\\"HibernationOptions\\\":{\\\"Configured\\\":false},\\\"MetadataOptions\\\":{\\\"HttpTokens\\\":\\\"\\\",\\\"HttpEndpoint\\\":\\\"\\\"},\\\"InstanceId\\\":\\\"i-bp12g4xbl4i0brkn****\\\",\\\"StoppedMode\\\":\\\"KeepCharging\\\",\\\"CpuOptions\\\":{\\\"ThreadsPerCore\\\":2,\\\"Numa\\\":\\\"ON\\\",\\\"CoreCount\\\":1},\\\"StartTime\\\":\\\"2024-02-29T07:08Z\\\",\\\"DeletionProtection\\\":false,\\\"VpcAttributes\\\":{\\\"PrivateIpAddress\\\":{\\\"IpAddress\\\":[\\\"172.16.XX.XX\\\"]},\\\"VpcId\\\":\\\"vpc-bp1wjaw8t272wwmkg****\\\",\\\"VSwitchId\\\":\\\"vsw-bp103i8xzww5132ul****\\\",\\\"NatIpAddress\\\":\\\"\\\"},\\\"SecurityGroupIds\\\":{\\\"SecurityGroupId\\\":[\\\"sg-bp1h96fz9fagaegp****\\\"]},\\\"InternetChargeType\\\":\\\"PayByTraffic\\\",\\\"InstanceName\\\":\\\"test123\\\",\\\"DeploymentSetId\\\":\\\"\\\",\\\"InternetMaxBandwidthOut\\\":5,\\\"SerialNumber\\\":\\\"6764f567-28fb-4a39-bfc3-48404995****\\\",\\\"OSType\\\":\\\"windows\\\",\\\"CreationTime\\\":\\\"2024-02-29T07:08Z\\\",\\\"AutoReleaseTime\\\":\\\"\\\",\\\"Description\\\":\\\"\\\",\\\"InstanceTypeFamily\\\":\\\"ecs.c7\\\",\\\"DedicatedInstanceAttribute\\\":{\\\"Tenancy\\\":\\\"\\\",\\\"Affinity\\\":\\\"\\\"},\\\"PublicIpAddress\\\":{\\\"IpAddress\\\":[\\\"47.98.XX.XX\\\"]},\\\"GPUSpec\\\":\\\"\\\",\\\"NetworkInterfaces\\\":{\\\"NetworkInterface\\\":[{\\\"Type\\\":\\\"Primary\\\",\\\"PrimaryIpAddress\\\":\\\"172.16.XX.XX\\\",\\\"MacAddress\\\":\\\"00:16:3e:0c:**:**\\\",\\\"NetworkInterfaceId\\\":\\\"eni-bp19uj35v8won3x9****\\\",\\\"PrivateIpSets\\\":{\\\"PrivateIpSet\\\":[{\\\"PrivateIpAddress\\\":\\\"172.16.XX.XX\\\",\\\"Primary\\\":true}]}}]},\\\"SpotPriceLimit\\\":0.0,\\\"SaleCycle\\\":\\\"\\\",\\\"DeviceAvailable\\\":true,\\\"InstanceType\\\":\\\"ecs.c7.large\\\",\\\"OSNameEn\\\":\\\"Windows Server  2022 DataCenter Edition 64bit Chinese Edition\\\",\\\"SpotStrategy\\\":\\\"NoSpot\\\",\\\"IoOptimized\\\":true,\\\"ZoneId\\\":\\\"cn-hangzhou-b\\\",\\\"ClusterId\\\":\\\"\\\",\\\"EcsCapacityReservationAttr\\\":{\\\"CapacityReservationPreference\\\":\\\"\\\",\\\"CapacityReservationId\\\":\\\"\\\"},\\\"DedicatedHostAttribute\\\":{\\\"DedicatedHostId\\\":\\\"\\\",\\\"DedicatedHostName\\\":\\\"\\\",\\\"DedicatedHostClusterId\\\":\\\"\\\"},\\\"GPUAmount\\\":0,\\\"OperationLocks\\\":{\\\"LockReason\\\":[]},\\\"InternetMaxBandwidthIn\\\":2000,\\\"Recyclable\\\":false,\\\"RegionId\\\":\\\"cn-hangzhou\\\",\\\"CreditSpecification\\\":\\\"\\\"}",
    "Region": "cn-hangzhou",
    "ResourceCreationTime": 1624961112000,
    "Tags": "{\\\"\\\"hc\\\"\\\":[\\\"\\\"value2\\\"\\\"]}",
    "AccountId": 0,
    "ResourceId": "i-bp12g4xbl4i0brkn****",
    "ResourceDeleted": 1,
    "ResourceName": "test123",
    "ResourceStatus": "Stopped",
    "ComplianceType": "COMPLIANT",
    "VpcId": "vpc-t4nhheyvay74fp7n0hxxx",
    "VSwitchId": "vsw-t4n7pokxxxxxxxxxxxxxx"
  }
}

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.
404 AccountNotExisted Your 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.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.