Help Center/ Cloud Operations Center/ API Reference/ API/ Application Resource Management/ Associated Resources/ Querying Huawei Cloud Resources Associated with a Group
Updated on 2025-12-05 GMT+08:00

Querying Huawei Cloud Resources Associated with a Group

Function

This API is used to query the resource information related to a group after a group is associated with resources.

URI

GET /v1/group-resource-relations

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

application_id

No

String

Definition

ID of the application associated with the group.

Constraints

The application ID, group ID, and component ID cannot coexist. At least one of them must be specified.

Range

N/A

Default value

N/A

component_id

No

String

Definition

ID of the component associated with the group.

Constraints

The application ID, group ID, and component ID cannot coexist. At least one of them must be specified.

Range

N/A

Default value

N/A

group_id

No

String

Definition

Group ID.

Constraints

The application ID, group ID, and component ID cannot coexist. At least one of them must be specified.

Range

N/A

Default value

N/A

provider

Yes

String

Definition

Cloud service name.

Constraints

N/A

Range

The value is a string. The value can be ecs, cce, or rds.

Default value

N/A

vendor

Yes

String

Definition

Vendor information.

Constraints

N/A

Range

AWS: Amazon Web Services

  • AZURE: Microsoft Azure

  • ALI: Alibaba Cloud

  • RMS: Huawei Cloud

  • CROSS_ACCOUNT: cross-account resources

  • OTHER: other vendors, for example, on-premises IDCs

Default value

N/A

type

Yes

String

Definition

Resource type.

Constraints

N/A

Range

Resource type. Select a resource type based on the actual service requirements. Common resource types are as follows:

  • cloudservers: Elastic Cloud Servers (ECSs)

  • servers: Bare Metal Servers (BMSs)

  • clusters: Cloud Container Engine (CCE)

  • instances: cloud database instances

Default value

N/A

limit

Yes

Integer

Definition

Number of items displayed on each page when the pagination query is performed.

Constraints

N/A

Range

The value can be customized. The value range is 1 to 500.

Default value

N/A

offset

No

String

Definition

Offset from which the query starts.

Constraints

N/A

Range

0 to 2147483647

Default value

0

marker

No

String

Definition

Pagination query parameter, which is the last ID of the request on the previous page.

Constraints

N/A

Range

N/A

Default value

N/A

resource_id_list

No

Array of strings

Definition

Resource ID list.

Constraints

N/A

Range

Resource ID list. The maximum value is 100.

Default value

N/A

name

No

String

Definition

Cloud resource name.

Constraints

N/A

Range

It is user-defined. For details, see Bare Metal Server (BMS).

Default value

N/A

region_id

No

String

Definition

Region ID list.

Constraints

N/A

Range

Region ID list. The maximum value is 100.

Default value

N/A

az_id

No

String

Definition

AZ ID.

Constraints

N/A

Range

N/A

Default value

N/A

ip_type

No

String

Definition

IP address type.

Constraints

N/A

Range

fixed: internal IP address

floating: EIP

Default value

N/A

ip

No

String

Definition

Cloud resource IP address.

Constraints

N/A

Range

Filtering results for IPv4 addresses, which are fuzzy matched.

Default value

N/A

status

No

String

Description:

Cloud resource status.

Constraints:

N/A

Value range:

Select an ECS status by referring toECS.

Default value:

N/A

agent_state

No

String

Definition

Agent status.

Constraints

N/A

Range

  • ONLINE: The UniAgent is running.

  • OFFLINE: The UniAgent is abnormal.

  • INSTALLING: The UniAgent is being installed.

  • FAILED: The UniAgent fails to be installed.

  • UNINSTALLED: The UniAgent is uninstalled.

  • null: The UniAgent is not installed.

Default value

N/A

image_name

No

String

Definition

Image name, which is used for fuzzy match.

Constraints

N/A

Range

N/A

Default value

N/A

os_type

No

String

Definition

System type.

Constraints

N/A

Range

  • windows: Windows OS.

  • linux: Linux OS.

Default value

N/A

tag

No

String

Definition

Cloud resource tag.

Constraints

A tag is in the format of "key.value". The maximum lengths of the key and value are 36 and 43 characters, respectively.

Range

The key of the tag can contain only letters, digits, underscores (), and hyphens (-). The value of the tag can contain only letters, digits, underscores (), hyphens (-), and periods (.).

Default value

N/A

charging_mode

No

String

Definition

Cloud server billing mode.

Constraints

N/A

Range

Billing mode:

  • 0: pay-per-use

  • 1: yearly/monthly

  • 2: spot price

Default value

N/A

flavor_name

No

String

Definition

Flavor name.

Constraints

N/A

Range

N/A

Default value

N/A

ip_list

No

Array of strings

Definition

IP address list.

Constraints

N/A

Range

List. The maximum value is 100.

Default value

N/A

is_collected

No

Boolean

Definition

Whether to add it to favorites.

Constraints

N/A

Range

  • true: Query the resource associations managed in the group that is added to favorites.

  • false: Query the resource associations managed in the group that is not added to favorites.

Default value

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

data

Array of data objects

Definition

Group resource association information.

Range

The value contains 0 to 500 characters.

Table 3 data

Parameter

Type

Description

id

String

Definition

ID associated with the group resource.

Range

N/A

cmdb_resource_id

String

Definition

UUID of the resource allocated by CloudCMDB.

Range

N/A

group_id

String

Definition

Group ID.

Range

The value is a string. It contains 24 characters.

group_name

String

Definition

Group name.

Range

The value is a string. It contains 3 to 60 characters.

application_id

String

Definition

Application ID.

Range

The value is a string. It contains 24 characters.

resource_id

String

Definition

Resource ID.

Range

The value is a string. It contains 36 characters.

name

String

Definition

Resource name.

Range

The value is a string. It contains 3 to 50 characters.

ep_id

String

Definition

Enterprise project ID.

Range

The value is a string. It contains 0 to 36 characters.

project_id

String

Definition

Project ID.

Range

The value is a string. It contains 32 characters.

ep_name

String

Definition

Enterprise project name.

Range

N/A

provider

String

Definition

Cloud service name.

Range

The value is a string. It contains 1 to 64 characters.

domain_id

String

Definition

Tenant ID.

Range

N/A

type

String

Definition

Resource type.

Range

There are many resource types. Select a resource type based on the actual service. The common resource types are as follows:

  • cloudservers: Elastic Cloud Servers (ECSs)

  • servers: Bare Metal Servers (BMSs)

  • clusters: Cloud Container Engine (CCE)

  • instances: cloud database instances

region_id

String

Definition

Region ID.

Range

The value is a string. It contains 0 to 64 characters.

inner_ip

String

Definition

Internal IP address of the resource.

Range

N/A

agent_id

String

Definition

ID of the UniAgent.

Range

N/A

agent_state

String

Definition

UniAgent status.

Range

  • ONLINE: The UniAgent is running.

  • OFFLINE: The UniAgent is abnormal.

  • INSTALLING: The UniAgent is being installed.

  • FAILED: The UniAgent fails to be installed.

  • UNINSTALLED: The UniAgent is uninstalled.

  • null: The UniAgent is not installed.

tags

Array of tags objects

Definition

The key-value pair of a tag.

Range

N/A

ingest_properties

Object

Definition

Data collection attribute.

Range

N/A

properties

Map<String,String>

Definition

Attribute information.

Range

N/A

operable

String

Definition

Whether a user-defined resource can be maintained.

Range

  • ENABLE: The resource can be maintained.

  • DISABLE: The resource is not maintainable. The operable field does not exist in the target instance.

create_time

String

Definition

Creation time. The value is in the ISO 8601 format.

Range

N/A

Table 4 tags

Parameter

Type

Description

key

String

Definition

The tag key.

Range

A tag key can contain up to 128 characters. It cannot start with sys or a space, and cannot end with a space. Only letters, digits, spaces, and the following special characters are allowed: _ . : = + - @

value

String

Definition

The tag value.

Range

A tag value can contain a maximum of 255 characters. It cannot start or end with a space. Only letters, digits, spaces, and the following special characters are allowed: _ . : / = + - @

Example Requests

Query the resources associated with a group.

GET https://{endpoint}/v1/group-resource-relations?provider=cce&type=clusters&limit=10&offset=0&application_id=660557b2dc48844adc49eaa5&is_collected=false&vendor=RMS

Example Responses

Status code: 200

The resources associated with the group are queried.

{
  "data" : [ {
    "id" : "687740684dbc6000ac47f0af",
    "cmdb_resource_id" : "687733804dbc6000ac3eaf51",
    "group_id" : "66055804dc48844adc49eaae",
    "group_name" : "RMSaUTODDD",
    "resource_id" : "38fbefc2-5c76-11f0-8a3e-0255ac100b06",
    "name" : "cdr-test",
    "provider" : "cce",
    "type" : "clusters",
    "region_id" : "string",
    "ep_id" : "0",
    "ep_name" : null,
    "project_id" : "23a154c6e0be4cd282538462825fca67",
    "domain_id" : "adabd970539e4ebb8141ca2cf3b571f1",
    "tags" : null,
    "agent_id" : null,
    "agent_state" : null,
    "inner_ip" : null,
    "properties" : {
      "clusterEOSVersion" : "false",
      "clusterType" : "VirtualMachine",
      "clusterSubnetId" : "22b498de-32fa-46e8-abf4-2be88693f114",
      "clusterEIP" : "",
      "clusterChargeMode" : "0",
      "clusterVpcId" : "b6e5c685-d16a-4534-a023-bd67049f5cdd",
      "clusterFlavor" : "cce.s2.small",
      "clusterSecGroup" : "99000d1a-2f08-419a-a1d7-c02eb6c3b945",
      "clusterOldestVersion" : "false",
      "clusterVersion" : "v1.30.10-r10",
      "clusterStatus" : "Available"
    },
    "ingest_properties" : null,
    "operable" : null,
    "create_time" : "2025-07-09T03:38:48.000+00:00"
  } ]
}

Status Codes

Status Code

Description

200

The resources associated with the group are queried.

Error Codes

See Error Codes.