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

Updating a Cross-Account Resource View in CloudCMDB

Function

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

URI

PUT /v1/resource/views/{id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

id

Yes

String

Definition

View ID.

Constraints

N/A

Range

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

Default value

N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

organization_unit_ids

Yes

Array of strings

Definition

List of IDs of OUs aggregated by the view.

Constraints

N/A

Range

N/A

Default value

N/A

resource_types

Yes

Array of strings

Definition

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

organization_id

No

String

Definition

ID of the organization to which the view belongs.

Constraints

N/A

Range

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

Default value

N/A

view_type

Yes

String

Definition

View type.

Constraints

N/A

Range

Currently, only organization is supported.

Default value

N/A

name

Yes

String

Definition

View name.

Constraints

N/A

Range

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

Default value

N/A

domain_ids

No

Array of strings

Definition

List of tenant account IDs contained in the view.

Range

N/A

Example:

  • ID1

  • ID2

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

data

String

Definition

View ID.

Range

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

Example Requests

Update a cross-account resource view in CloudCMDB.

PUT https://{Endpoint}/v1/resource/views/{id}

{
  "name" : "Test modification",
  "view_type" : "organizational",
  "organization_id" : "o-xuglfowux9ks92yrt7q4yc3ubsy6mjhd",
  "domain_ids" : [ "fb858e4f455646259b40065b50e72e61", "dc2d76541f754d68a4c8d150262d92c2" ],
  "resource_types" : [ "dms.kafkas", "dms.queues", "dms.rabbitmqs", "dms.reliabilitys", "dms.kafka_nodes", "dms.rabbitmq_nodes", "dms.rocketmq_nodes", "dcs.redis", "dcs.memcached" ],
  "organization_unit_ids" : [ "unit_id1" ]
}

Example Responses

Status code: 200

The view is updated.

{
  "data" : "686b63cb101fbf1cdab37803"
}

Status Codes

Status Code

Description

200

The view is updated.

Error Codes

See Error Codes.