Updated on 2025-12-05 GMT+08:00

Creating a Group

Function

This API is used to create groups for applications, sub-applications, and components to manage resources in a unified manner.

URI

POST /v1/groups

Request Parameters

Table 1 Request body parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Definition

Application name.

Constraints

The value can contain only letters, digits, hyphens (-), and underscores (_).

Range

It contains 3 to 50 characters.

Default value

N/A

component_id

Yes

String

Definition

Component ID.

Constraints

N/A

Range

ID of the component corresponding to the group created after the component is selected.

Default value

N/A

vendor

No

String

Definition

Vendor information.

Constraints

N/A

Range

  • RMS: Huawei Cloud vendor.

  • ALI: Alibaba Cloud vendor.

  • OTHER: other vendors.

Default value

N/A

region_id

Yes

String

Definition

Region ID.

Constraints

N/A

Range

ID of the region with which the application is associated.

Default value

N/A

application_id

No

String

Definition

Application ID.

Constraints

N/A

Range

ID of the application for the component corresponding to the group. There is a clear hierarchy between them.

Default value

N/A

sync_mode

Yes

String

Definition

Resource synchronization method.

Constraints

N/A

Range

  • MANUAL: indicates manual association. You can manually associate resource data with a group for management.

  • AUTO: indicates intelligent association. You can create resources with the same tag in an enterprise project in the same resource group.

Default value

The default value is MANUAL.

sync_rules

No

Array of sync_rules objects

Definition

Automatic association rule.

Constraints

N/A

Range

The selected enterprise project is automatically associated with the existing and future resources of the corresponding tag.

Default value

N/A

relation_configurations

No

Array of GroupRelationConfiguration objects

Definition

Group configuration information.

Constraints

N/A

Range

Associated configuration information of the group, for example, configuration information of the corresponding APM.

Default value

N/A

related_domain_id

No

String

Description:

Associated account ID.

Constraints:

N/A

Value range:

Account ID.

Default value:

N/A

Table 2 sync_rules

Parameter

Mandatory

Type

Description

ep_id

No

String

Definition

Enterprise project ID.

Constraints

N/A

Range

Select a project ID that is available inEnterprise Management.

Default value

N/A

rule_tags

No

String

Definition

Tag that is associated with resources.

In the enterprise project, only resources that match all the configured tags will be automatically allocated to the application group.

Constraints

N/A

Range

This parameter can be customized.

Default value

N/A

Table 3 GroupRelationConfiguration

Parameter

Mandatory

Type

Description

type

No

String

Definition

Configuration type. Configure the application, component, and environment of the APM service corresponding to the group. APM service performance information can be obtained during fault diagnosis.

Constraints

N/A

Range

  • APM: probe developed by the APM service

  • OTEL: the open-source probe OpenTelemetry

  • SKYWALKING: the open-source probe SkyWalking

Default value

N/A

parameters

No

Map<String,String>

Definition

Configuration parameters.

Constraints

N/A

Range

APM configuration parameter app_id->business_id->env_id.

The value contains multiple fields. The maximum length is for reference only.

Default value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

data

data object

Definition

Application management information.

Range

N/A

Table 5 data

Parameter

Type

Description

id

String

Definition

UUID allocated by COC-CMDB.

Range

N/A

name

String

Definition

Group name.

Range

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

vendor

String

Definition

Vendor.

Range

  • RMS: Huawei Cloud vendor.

  • ALI: Alibaba Cloud vendor.

  • OTHER: other vendors.

code

String

Definition

Group code.

Range

N/A

domain_id

String

Description:

Tenant ID.

Value range:

N/A

region_id

String

Description:

Region ID.

Value range:

N/A

component_id

String

Description:

Component ID.

Value range:

N/A

application_id

String

Description:

Application ID.

Value range:

N/A

path

String

Definition

Group path.

Range

N/A

create_time

String

Description:

Creation time. The value is in the ISO 8601 format.

Value range:

N/A

update_time

String

Description:

Update time. The value is in the ISO 8601 format.

Value range:

N/A

sync_mode

String

Description:

Update time.

Value range:

  • MANUAL: manual association

  • AUTO: intelligent association

sync_rules

Array of sync_rules objects

Description:

Automatic association rule.

Value range:

N/A

related_domain_id

String

Description:

ID of the domain to which the cross-account resource belongs.

Value range:

N/A

relation_configurations

Array of GroupRelationConfiguration objects

Description:

Group configuration information.

Value range:

N/A

Table 6 sync_rules

Parameter

Type

Description

ep_id

String

Description:

Enterprise project ID.

Value range:

Select a project ID that is available inEnterprise Management.

rule_tags

String

Description:

Tag that is associated with the target resources.

Value range:

N/A

Table 7 GroupRelationConfiguration

Parameter

Type

Description

type

String

Definition

Configuration type. Configure the application, component, and environment of the APM service corresponding to the group. APM service performance information can be obtained during fault diagnosis.

Constraints

N/A

Range

  • APM: probe developed by the APM service

  • OTEL: the open-source probe OpenTelemetry

  • SKYWALKING: the open-source probe SkyWalking

Default value

N/A

parameters

Map<String,String>

Definition

Configuration parameters.

Constraints

N/A

Range

APM configuration parameter app_id->business_id->env_id.

The value contains multiple fields. The maximum length is for reference only.

Default value

N/A

Example Requests

Create a group.

POST https://{Endpoint}/v1/groups

{
  "name" : "test1212",
  "region_id" : "string",
  "related_domain_id" : null,
  "component_id" : "678236a93f1b240bc02b3e4f",
  "sync_mode" : "AUTO",
  "vendor" : "RMS",
  "sync_rules" : [ {
    "ep_id" : "0",
    "rule_tags" : "string"
  } ],
  "relation_configurations" : null
}

Example Responses

Status code: 200

Response body for creating a group.

{
  "data" : {
    "id" : "685cff9aa2cf591eae464a6a",
    "name" : "test1212",
    "code" : null,
    "domain_id" : "dc2d76541f754d68a4c8d150262d92c2",
    "region_id" : "string",
    "application_id" : "6780dec23f1b240bc0295d11",
    "component_id" : "678236a93f1b240bc02b3e4f",
    "path" : "6835d67559221e2d9a6bfa1b.6895bab5e86fed4474120a77",
    "vendor" : "RMS",
    "create_time" : "2023-06-14T09:44:22.116+00:00",
    "update_time" : "2023-06-14T09:44:22.116+00:00",
    "sync_mode" : "AUTO",
    "sync_rules" : null,
    "relation_configurations" : null,
    "related_domain_id" : null
  }
}

Status Codes

Status Code

Description

200

Response body for creating a group.

Error Codes

See Error Codes.