Help Center/ Cloud Operations Center/ API Reference/ API/ Application Resource Management/ Resource Views/ This API is used to query a cross-account resource view in CloudCMDB.
Updated on 2025-10-24 GMT+08:00

This API is used to query a cross-account resource view in CloudCMDB.

Function

This API is used to query the 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.

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:list

    List

    -

    -

    -

    -

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

Value range:

It is user-defined. The value ranges from 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

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

Value range:

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

Table 3 data

Parameter

Type

Description

id

String

Definition:

Resource view ID.

Value range:

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

name

String

Definition:

Resource view name.

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

Value range:

N/A

organization_id

String

Definition:

ID of the organization to which the view belongs.

Value range:

N/A

organization_unit_ids

Array of strings

Definition:

List of IDs of OUs aggregated by the view.

Value range:

N/A

domain_ids

Array of strings

Definition:

List of tenant account IDs contained in the view.

Value range:

N/A

resource_types

Array of strings

Definition:

List of resource types contained in the view.

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

view_type

String

Definition:

View type.

Value range:

Currently, only organization is supported.

Example Requests

This API is used to query the cross-account resource view in CloudCMDB.

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

Example Responses

Status code: 200

Query a cross-account resource view in CloudCMDB.

{
  "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

Query a cross-account resource view in CloudCMDB.

Error Codes

See Error Codes.