Help Center/ Cloud Operations Center/ API Reference/ API/ Application Resource Management/ Resource Views/ Querying a Cross-Account Resource View in CloudCMDB
Updated on 2025-12-05 GMT+08:00

Querying a Cross-Account Resource View in CloudCMDB

Function

Query a cross-account resource view in CloudCMDB.

A view consists of a group of filters. You can configure the filter criteria to access desired resources on Huawei Cloud in cross-account scenarios.

URI

GET /v1/resource/views

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

Range

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

Default value

N/A

marker

No

String

Definition

Pagination parameter. You can use the marker value returned in the previous request as the number of the first page of records to return in this request.

Constraints

N/A

Range

N/A

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.

Range

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

Table 3 data

Parameter

Type

Description

id

String

Definition

Resource view ID.

Range

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

name

String

Definition

Resource view name.

Range

The value can contain 3 to 50 characters, including letters, digits, hyphens (-), and underscores (_).

manager_domain_id

String

Definition

Domain ID of the view creator, which is the owner of the view resource aggregation.

Range

N/A

organization_id

String

Definition

ID of the organization to which the view belongs.

Range

N/A

organization_unit_ids

Array of strings

Definition

List of IDs of OUs aggregated by the view.

Range

N/A

domain_ids

Array of strings

Definition

List of tenant account IDs contained in the view.

Range

N/A

resource_types

Array of strings

Definition

List of resource types contained in the view.

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

view_type

String

Definition

View type.

Range

Currently, only organization is supported.

Example Requests

Query a cross-account resource view in CloudCMDB.

GET https://{Endpoint}/resource/views?limit=120

Example Responses

Status code: 200

The cross-account resource view in CloudCMDB is queried.

{
  "data" : [ {
    "id" : "67eced5bbba8867be02aeac3",
    "name" : "qwgwegwe",
    "manager_domain_id" : "dc2d76541f754d68a4c8d150262d92c2",
    "organization_id" : "o-xuglfowux9ks92yrt7q4yc3ubsy6mjhd",
    "organization_unit_ids" : [ ],
    "domain_ids" : [ "fb858e4f455646259b40065b50e72e61", "dc2d76541f754d68a4c8d150262d92c2", "08fc8d260d00d4900f0ec00c54a17060" ],
    "resource_types" : [ "dms.kafkas", "dms.queues", "dms.rabbitmqs", "dms.reliabilitys", "dms.kafka_nodes", "dms.rabbitmq_nodes", "dms.rocketmq_nodes", "dcs.redis", "dcs.memcached", "dcs.node", "apig.instances" ],
    "view_type" : "organizational"
  }, {
    "id" : "6819f2de5219566befb2880d",
    "name" : "rewrqw",
    "manager_domain_id" : "dc2d76541f754d68a4c8d150262d92c2",
    "organization_id" : "o-xuglfowux9ks92yrt7q4yc3ubsy6mjhd",
    "organization_unit_ids" : [ "r-mxc9k8s74gj2hu96yhn5i6kd8i9wh8k7" ],
    "domain_ids" : [ "dc2d76541f754d68a4c8d150262d92c2", "08fc8d260d00d4900f0ec00c54a17060", "fb858e4f455646259b40065b50e72e61" ],
    "resource_types" : [ "ecs.cloudservers", "bms.servers", "fgs.functions", "hcss.l-instance", "as.scalingGroups", "ims.images", "cph.cloudphoneservers", "deh.dedicatedhosts" ],
    "view_type" : "organizational"
  } ]
}

Status Codes

Status Code

Description

200

The cross-account resource view in CloudCMDB is queried.

Error Codes

See Error Codes.