Help Center/ Cloud Operations Center/ API Reference/ API/ Application Resource Management/ Resource Views/ Querying Resources Aggregated in the Cross-Account Resource View of CloudCMDB
Updated on 2025-10-24 GMT+08:00

Querying Resources Aggregated in the Cross-Account Resource View of CloudCMDB

Function

This API is used to query and filter the resources aggregated in the cross-account resource view of CloudCMDB after a view is created.

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:resourceView:listResources

    List

    resourceView *

    -

    -

    -

URI

GET /v1/resource/views/resources

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

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 from which the query starts.

Constraints:

N/A

Value range:

0 to 2147483647

Default value:

0

view_id

Yes

String

Definition:

View ID

Constraints:

N/A

Value range:

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

Default value:

N/A

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

provider

No

String

Definition:

Cloud service name.

Constraints:

N/A

Value range:

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

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

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

data

Array of data objects

Definition:

Resource data aggregated in a view.

Value range:

N/A

Table 3 data

Parameter

Type

Description

id

String

Definition:

Unique ID.

Value range:

N/A

view_id

String

Definition:

View ID.

Value range:

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

rms_resource_id

String

Definition:

The value corresponds to the ID value in the rms_resource collection.

Value range:

N/A

resource_id

String

Definition:

Resource ID, which is the ID of the resource in the view management module of a cross-account resource.

Value range:

The value contains 36 characters.

domain_id

String

Definition:

ID of the tenant to which a user logs in.

Value range:

N/A

name

String

Definition:

Name of the resource in the view.

Value range:

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

ep_id

String

Definition:

Enterprise project ID.

Value range:

Select a project ID that is available inEnterprise Management.

ep_name

String

Definition:

Enterprise project name.

Value range:

N/A

project_id

String

Definition:

Project ID in OpenStack.

Value range:

N/A

provider

String

Definition:

Cloud service name.

Value range:

The value contains 1 to 64 characters.

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

  • clusters: Cloud Container Engine (CCE) instances

  • instances: cloud database instances

region_id

String

Definition:

Region ID.

Value range:

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

tags

Array of tags objects

Definition:

The key-value pair of a tag.

Value range:

N/A

properties

Object

Definition:

Additional field information of a storage resource, which is usually used for display and filtering.

Value range:

N/A

ingest_properties

Object

Definition:

Data collection attribute, which describes the additional information recorded when the view system collects the resource.

Value range:

N/A

agent_id

String

Definition:

ID of the UniAgent.

Value range:

N/A

agent_state

AnyType

Definition:

UniAgent status.

Value 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.

inner_ip

String

Definition:

Internal IP address of the resource.

Value range:

N/A

associated_group_list

Object

Definition:

List of bound resource group information.

Value range:

N/A

Table 4 tags

Parameter

Type

Description

key

String

Definition:

The tag key.

Value range:

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

value

String

Definition:

The tag values.

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 resources aggregated in the cross-account resource view of CloudCMDB.

GET https://{Endpoint}/v1/resource/views/resources

Example Responses

Status code: 200

Resources aggregated in the cross-account resource view of CloudCMDB are queried.

{
  "data" : [ {
    "id" : "674034ed9de91350a4753232",
    "view_id" : "674034ec9de91350a4753230",
    "rms_resource_id" : "6569f4f04552f23e97babff3",
    "resource_id" : "0228b9bb-7567-49ca-9707-4d851a863ec4",
    "domain_id" : "dc2d76541f754d68a4c8d150262d92c2",
    "name" : "runbook-test-0088ab2 deleted by mistake",
    "ep_id" : "9d414beb-88b7-4ea8-9e61-1ebb64876849",
    "ep_name" : "COC",
    "project_id" : "10a6c23c2a1044779794798beb067c94",
    "provider" : "ecs",
    "type" : "cloudservers",
    "region_id" : "string",
    "tags" : [ {
      "key" : "FASA",
      "value" : "gdsa"
    }, {
      "key" : "ID3",
      "value" : "123456789"
    }, {
      "key" : "ID",
      "value" : "123456789"
    }, {
      "key" : "43243",
      "value" : "45RT"
    }, {
      "key" : "ID2",
      "value" : "123456789"
    } ],
    "properties" : {
      "accessIpv4" : "",
      "hostName" : "runbook-test-0088",
      "addresses" : [ {
        "OsExtIpsType" : "fixed",
        "OsExtIpsPortId" : "1f653e40-423d-4df0-b539-16c3cfd2a2bd",
        "addr" : "192.168.0.94",
        "version" : 4,
        "OsExtIpsMacAddr" : "fa:16:3e:f0:48:a6",
        "primary" : true
      } ],
      "accessIpv6" : "",
      "metadata" : {
        "chargingMode" : "0",
        "meteringImageType" : "gold",
        "imageName" : "Public-CAD-HCE-BaseTemplate-2.0.2312.1-x86_64-Standard",
        "meteringImageId" : "5086e876-a5c2-4d45-a734-1e0c0f664730",
        "meteringResourcesPerCode" : "s6.small.1.linux",
        "vpcId" : "44cec12a-3d51-4101-962e-c973fc4ea948",
        "osBit" : "64",
        "osType" : "Linux",
        "ecmResStatus" : ""
      },
      "OsExtStsVmState" : "stopped",
      "configDrive" : "",
      "OsExtStsPowerState" : 4,
      "hostId" : "387bf199de0b370202251e0db98291285b8b5849b5df74bec036abae",
      "securityGroup" : [ {
        "name" : "default",
        "id" : "9e262f72-2f9a-4534-8a56-412710913895"
      } ],
      "ExtVolumesAttached" : [ {
        "bootIndex" : "0",
        "id" : "f85d484e-f502-43e2-9f99-3add086884ef",
        "device" : "/dev/vda"
      } ],
      "userId" : "9fec03ee5b1040818b91bef6e16213df",
      "flavor" : {
        "disk" : "0",
        "name" : "s6.small.1",
        "id" : "s6.small.1",
        "vcpus" : "1",
        "ram" : "1024"
      },
      "osextsrvattr" : {
        "hostName" : "runbook-test-0088",
        "kernelId" : "",
        "ramdiskId" : "",
        "reservationId" : "r-lljtv8ct",
        "instanceName" : "instance-008def4e",
        "host" : "dd9e17d37e277347b5c29e6ee04c9f5e2aafe6e4a84596c541c48179",
        "rootDeviceName" : "/dev/vda",
        "hypervisorHostName" : "c3a03e89b2504db22be4a695b862662205800ca4ac466a8f8d177e60",
        "launchIndex" : 0
      },
      "OsDcfDiskConfig" : "MANUAL",
      "hostStatus" : "UP",
      "OsSrvUsgLaunchedAt" : "2023-06-27T08:35:10.000000",
      "OsExtAz" : "string",
      "locked" : false,
      "status" : "SHUTOFF",
      "schedulerHints" : { }
    },
    "ingest_properties" : null,
    "agent_id" : null,
    "agent_state" : null,
    "inner_ip" : null,
    "associated_group_list" : null
  } ]
}

Status Codes

Status Code

Description

200

Resources aggregated in the cross-account resource view of CloudCMDB are queried.

Error Codes

See Error Codes.