Updated on 2025-10-24 GMT+08:00

Querying Resources of a User in the Cloud Vendor

Function

This API is used to query resources of a user in the cloud vendor.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    coc:instance:listResources

    List

    -

    -

    -

    -

URI

GET /v1/multicloud-resources

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

vendor

Yes

String

Definition:

Cloud vendor type.

Constraints:

N/A

Value range:

AWS: Amazon Web Services (AWS)

  • AZURE: Microsoft Azure

  • ALI: Alibaba Cloud

  • HCS: Huawei hybrid cloud solution Huawei Cloud Stack

Default value:

N/A

type

No

String

Definition:

Resource type.

Constraints:

N/A

Value 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 server (BMSs)

  • clusters: Cloud Container Engine (CCE) instances

  • 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

Value range:

It is user-defined. The value ranges from 1 to 500.

Default value:

N/A

offset

No

String

Definition:

Offset for pagination query, indicating that the query starts from this offset.

Constraints:

N/A

Value 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

Value range:

N/A

Default value:

N/A

resource_id_list

No

Array of strings

Definition:

List of resource IDs of a cloud vendor.

Constraints:

N/A

Value range:

Resource ID list. The maximum value is 100.

Default value:

N/A

name_list

No

Array of strings

Definition:

List of resource names under a cloud vendor.

Constraints:

N/A

Value range:

List. The maximum value is 100.

Default value:

N/A

region_id_list

No

Array of strings

Definition:

List of region IDs of a cloud vendor.

Constraints:

N/A

Value range:

Region ID list. The maximum value is 100.

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:

Multi-cloud resource list.

Value Range:

N/A

Table 3 data

Parameter

Type

Description

id

String

Definition:

UUID allocated by COC-CMDB.

Value Range:

N/A

resource_id

String

Definition:

Resource ID stored on the cloud vendor.

Value Range:

N/A

name

String

Definition:

Resource name.

Value Range:

The value is a string of 3 to 50 characters.

vendor

String

Definition:

Cloud vendor information.

Value Range:

  • AWS: Amazon

  • Azure: Microsoft

  • ALI: Alibaba Cloud

  • HCS: Huawei hybrid cloud solution

type

String

Definition:

Resource type.

Value 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

  • instances: cloud database instances

datasource

String

Definition:

Cloud vendor account ID.

Value Range:

N/A

region_id

String

Definition:

Region ID.

Value Range:

N/A

agent_id

String

Definition:

ID of the UniAgent.

Value Range:

N/A

agent_state

String

Definition:

UniAgent status.

Value Range:

  • ONLINE: running.

  • OFFLINE: abnormal

  • INSTALLING: being installed

  • FAILED: installation failed

  • UNINSTALLED: uninstalled

  • null: not installed.

properties

Map<String,Object>

Definition:

Resource attributes.

Value Range:

N/A

ingest_properties

Map<String,String>

Definition:

Collection attribute.

Value Range:

N/A

inner_ip

String

Definition:

Internal IP address of the resource.

Value Range:

N/A

is_associate_group

Boolean

Definition:

Whether it has been associated with a specified group.

Value Range:

  • true: It has been associated with a specified group.

  • false: It has not been associated with a specified group.

associated_group_list

Array of strings

Definition:

List of groups associated with a resource.

Value Range:

N/A

create_time

String

Definition:

Time when a resource is created. The value is in the ISO 8601 format.

Value Range:

N/A

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Definition:

Error code.

Value range:

The value contains 8 to 36 characters.

error_msg

String

Definition:

Error description.

Value range:

The value contains 2 to 512 characters.

Example Requests

This API is used to query resources of a user in the cloud vendor.

GET https://{Endpoint} /v1/multicloud-resources?vendor=ALI&limit=10&offset=0&type=ACS::VPC::RouteTable

Example Responses

Status code: 200

The resource information is queried.

{
  "data" : [ {
    "id" : "67f62e99a9f251796893d83a",
    "resource_id" : "8bbaa2e3-5e70-47f5-ba86-60a2829e34fd",
    "name" : "ali-1",
    "vendor" : "ALI",
    "type" : "ACS::ECS::Instance",
    "datasource" : "1719089422411430",
    "region_id" : "xxx",
    "zone_id" : "",
    "agent_id" : "74130352f93141efa4c10ae1a1d0f14a",
    "agent_state" : "FAILED",
    "inner_ip" : "192.168.1.140",
    "properties" : {
      "ip_addresses" : [ "192.168.1.140" ],
      "tags" : [ ]
    },
    "ingest_properties" : {
      "vpc_id" : null
    },
    "is_associate_group" : null,
    "associated_group_list" : null,
    "create_time" : "2025-04-09T08:11:00.000+00:00"
  }, {
    "id" : "67f62e99a9f251796893d82a",
    "resource_id" : "e31a3ac6-2515-4954-96cd-538f749449bd",
    "name" : "ecs-2",
    "vendor" : "ALI",
    "type" : "ACS::ECS::Instance",
    "datasource" : "1719089422411430",
    "region_id" : "xxxx",
    "zone_id" : "",
    "agent_id" : "a89925d906d44a2184f7756f060bef5c",
    "agent_state" : "ONLINE",
    "inner_ip" : "192.168.1.177",
    "properties" : {
      "ip_addresses" : [ "192.168.1.177" ],
      "tags" : [ ]
    },
    "ingest_properties" : {
      "vpc_id" : "02b3d1ce-ae7e-4be6-9444-288bfe12e620"
    },
    "is_associate_group" : null,
    "associated_group_list" : null,
    "create_time" : "2025-04-09T03:18:00.000+00:00"
  } ]
}

Status Codes

Status Code

Description

200

The resource information is queried.

400

Failed to query resource information.

Error Codes

See Error Codes.