Files
doc-exports/docs/ucs/api-ref/RegisterClusterGroup.html
qiujiandong1 535e30e292 UCS API initial update 20250523 version
Reviewed-by: Gergo-Bence Lorincz <a200452876@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com>
Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
2026-02-23 09:12:31 +00:00

14 KiB

Creating a Fleet

Function

This API is used to create a fleet. You can select clusters during fleet creation.

URI

POST /v1/clustergroups

Request Parameters

Table 1 Parameters in the request header

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Identity authentication information. Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token.

Content-Type

Yes

String

Message body type (format). Only application/json is supported.

Table 2 Parameters in the request body

Parameter

Mandatory

Type

Description

metadata

Yes

RegisterClusterGroupObjectMeta object

Fleet metadata information

spec

No

RegisterClusterGroupSpec object

Attributes

Table 3 RegisterClusterGroupObjectMeta

Parameter

Mandatory

Type

Description

name

Yes

String

Fleet name

Table 4 RegisterClusterGroupSpec

Parameter

Mandatory

Type

Description

clusterIds

No

Array of strings

IDs of associated clusters

description

No

String

Fleet description

Response Parameters

Status code: 201

Table 5 Parameter in the response body

Parameter

Type

Description

uid

String

Fleet UID

Example Requests

Creating a fleet and (optional) adding clusters to the fleet

{
  "metadata" : {
    "name" : "group02281605"
  },
  "spec" : {
    "clusterIds" : [ "514c1a3c-8ec7-11ec-b384-0255ac100189", "d4804da3-8f03-11ec-b384-0255ac100189" ],
    "description" : "aaaaaaaaa"
  }
}

Example Responses

Status code: 201

The UID of the fleet that has been created is returned.

{
  "uid" : "6efb4a18-2fa4-11ee-ad1d-0255ac1001c4"
}

Status Codes

Status Code

Description

201

The UID of the fleet that has been created is returned.

400

Client request error. The server could not execute the request.

403

The server refused the request.

500

Internal server error.

Error Codes

See Error Codes.