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

Creating a Group Resource Association Relationship

Function

This API is used to bind resources to an environment created for the corresponding group. Then, you can monitor the resource usage in real time through application monitoring.

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:application:addResources

    Write

    application *

    -

    -

    -

URI

POST /v1/group-resource-relations

Request Parameters

Table 1 Request body parameters

Parameter

Mandatory

Type

Description

group_id

Yes

String

Definition:

UUID of the group allocated by CloudCMDB.

Value range:

N/A

cmdb_resource_id_list

Yes

Array of strings

Definition:

UUID list of the RMS resource allocated by CloudCMDB.

Value range:

N/A

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

data

String

Definition:

UUID allocated by COC-CMDB.

Value range:

N/A

Example Requests

This API is used to create a group resource association relationship.

POST https://{endpoint}/v1/group-resource-relations

{
  "group_id" : "6811e1855a774958c43bab99",
  "cmdb_resource_id_list" : [ "686f4abb38514867b8853970" ]
}

Example Responses

Status code: 200

The group resource association is created.

{
  "data" : [ "687e0526705dd42025d328d8" ]
}

Status Codes

Status Code

Description

200

The group resource association is created.

Error Codes

See Error Codes.