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

Obtaining the Fleet List

Function

This API is used to list all fleets.

URI

GET /v1/clustergroups

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

The number of records allowed on each page when the list is queried by page. The default value is -1.

offset

No

Integer

Start offset when the list is queried by page. The default value is 0.

order_by

No

String

Sorting parameter when the list is queried by page. The value can be create_at or update_at.

order

No

String

Sorting order when the list is queried by page. The value can be desc or asc.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

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.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

items

Array of ClusterGroup objects

Fleet list

total

Integer

Total number of records on all pages

Table 4 ClusterGroup

Parameter

Type

Description

kind

String

API type. The value is fixed at ClusterGroup and cannot be changed.

apiVersion

String

API version. The value is fixed at v1 and cannot be changed.

metadata

ObjectMeta object

Basic information about a fleet. Metadata is a collection of attributes.

spec

ClusterGroupSpec object

Detailed description of an object. UCS creates or updates objects by defining or updating spec.

status

ClusterGroupStatus object

Object status

Table 5 ObjectMeta

Parameter

Type

Description

uid

String

Resource ID

name

String

Resource name

generateName

String

If no name is provided, the server uses the prefix to generate a unique name.

namespace

String

Namespace

labels

Map<String,String>

Label

annotations

Map<String,String>

Annotation

creationTimestamp

String

Creation time

updateTimestamp

String

Update time

resourceVersion

String

Internal version of a resource

generation

String

Generation of the desired resource state

managedFields

Array of ManagedFieldsEntry objects

Fields managed by workflows

ownerReferences

Array of OwnerReference objects

Ownership, dependencies, and garbage collection mechanism of objects. It supports resource management by the controller.

Table 6 ManagedFieldsEntry

Parameter

Type

Description

manager

String

Manager name

operation

String

Operation type that causes this entry being created. The value can only be Apply or Update.

apiVersion

String

Resource API version used by a manager for defining fields

time

String

Timestamp when this entry was created or last updated

fieldsType

String

Field structure format. The value is fixed at "FieldsV1".

fieldsV1

Object

Information about the managed fields

Table 7 OwnerReference

Parameter

Type

Description

apiVersion

String

API version of the referent

kind

String

Type of the referent

name

String

Name of the referent

uid

String

UID of the referent

controller

Boolean

If the value is true, this reference points to the controller that manages the resource.

blockOwnerDeletion

Boolean

If the value is true and the owner has a finalizer named foregroundDeletion, the owner cannot be deleted until this reference is removed.

Table 8 ClusterGroupSpec

Parameter

Type

Description

ruleNamespaces

Array of strings

List of namespaces associated with a permission policy

federationId

String

Fleet federation ID

description

String

Description

dnsSuffix

Array of strings

DNS suffix of the federation corresponding to the fleet. This parameter is visible after federation is enabled.

federationExpirationTimestamp

String

Federation expiration timestamp

policyId

String

Policy ID

federationVersion

String

Fleet federation version

connectGatewayEndpoints

Array of ConnectEndpoint objects

Gateway endpoints connected to the cluster federation. This parameter has a value only when cluster federation is enabled.

Table 9 ConnectEndpoint

Parameter

Type

Description

type

String

Currently, only VPCEP is supported.

name

String

Resource name. When type is set to VPCEP, the value is the VPCEP service name.

id

String

Resource ID. When type is set to VPCEP, the value is the VPCEP service ID.

region

String

Region where the resource is located

Table 10 ClusterGroupStatus

Parameter

Type

Description

conditions

Array of ClusterGroupCondition objects

Federation or permission policy information for a fleet

Table 11 ClusterGroupCondition

Parameter

Type

Description

type

String

Fleet type.

  • Federation: Federation is enabled for the fleet.

  • Policy: Permission policies are enabled for the fleet.

status

String

Status of the federation or permission policy enabled for a fleet

reason

String

Cause of status

message

String

Status information

lastTransitionTime

String

Status update time

Status code: 400

Table 12 Response body parameters

Parameter

Type

Description

-

String

-

Status code: 403

Table 13 Response body parameters

Parameter

Type

Description

-

String

-

Status code: 500

Table 14 Response body parameters

Parameter

Type

Description

-

String

-

Example Requests

None

Example Responses

Status code: 200

The fleet list has been queried.

{
  "items" : [ {
    "kind" : "ClusterGroup",
    "apiVersion" : "v1",
    "metadata" : {
      "name" : "cluster-test",
      "uid" : "bffbb35b-7949-11ee-886c-0255ac100037",
      "creationTimestamp" : "2023-11-02 06:33:35.558128 +0000 UTC",
      "updateTimestamp" : "2023-11-14 06:20:20.446476 +0000 UTC"
    },
    "spec" : {
      "federationId" : "e2f27cc6-82b5-11ee-84e3-0255ac100032",
      "federationVersion" : "v1.7.0-t1109",
      "dnsSuffix" : [ "www.oidc.com" ],
      "connectGatewayEndpoints" : [ {
        "type" : "VPCEP",
        "name" : "cn-north-4.5fc05258-f125-48f5-8a0a-a724a37f5ff1",
        "id" : "5fc05258-f125-48f5-8a0a-a724a37f5ff1",
        "region" : "cn-north-4"
      } ]
    },
    "status" : {
      "conditions" : [ {
        "type" : "Federation",
        "status" : "Unavailable",
        "reason" : "FederationUnavailable",
        "message" : "component volcano-scheduler is unhealthy",
        "lastTransitionTime" : "0001-01-01T00:00:00Z"
      } ]
    }
  }, {
    "kind" : "ClusterGroup",
    "apiVersion" : "v1",
    "metadata" : {
      "name" : "cluster-dev",
      "uid" : "4557ad49-22bf-11ee-b0c9-0255ac10004b",
      "creationTimestamp" : "2023-07-15 03:25:39.253589 +0000 UTC",
      "updateTimestamp" : "2023-10-19 11:52:14.509405 +0000 UTC"
    },
    "spec" : { },
    "status" : { }
  }, {
    "kind" : "ClusterGroup",
    "apiVersion" : "v1",
    "metadata" : {
      "name" : "test0131",
      "uid" : "108f5981-a105-11ed-a23e-0255ac100032",
      "creationTimestamp" : "2023-01-31 01:17:44.309185 +0000 UTC",
      "updateTimestamp" : "2023-06-29 01:02:28.78095 +0000 UTC"
    },
    "spec" : { },
    "status" : { }
  } ],
  "total" : 3
}

Status Codes

Status Code

Description

200

The fleet list has been queried.

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.