Help Center/ Cloud Container Engine/ API Reference/ APIs/ Cluster Upgrade/ Obtaining a List of Cluster Upgrade Task Details
Updated on 2024-04-23 GMT+08:00

Obtaining a List of Cluster Upgrade Task Details

Function

Obtain a list of cluster upgrade task details.

URI

GET /api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade/tasks

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI.

cluster_id

Yes

String

Cluster ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

apiVersion

String

API version, which defaults to v3

kind

String

Resource type

metadata

UpgradeTaskMetadata object

Metadata

items

Array of UpgradeTaskResponseBody objects

Cluster upgrade tasks

Table 3 UpgradeTaskResponseBody

Parameter

Type

Description

apiVersion

String

API version. Defaults to v3.

kind

String

Resource type. Defaults to UpgradeTask.

metadata

UpgradeTaskMetadata object

Upgrade task metadata.

spec

UpgradeTaskSpec object

Upgrade task information.

status

UpgradeTaskStatus object

Upgrade task status.

Table 4 UpgradeTaskMetadata

Parameter

Type

Description

uid

String

Upgrade task ID.

creationTimestamp

String

Time when a task was created.

updateTimestamp

String

Time when a task is updated.

Table 5 UpgradeTaskSpec

Parameter

Type

Description

version

String

Source cluster version.

targetVersion

String

Target cluster version to upgrade to.

items

Object

Additional information about the upgrade task.

Table 6 UpgradeTaskStatus

Parameter

Type

Description

phase

String

Indicates the status of the upgrade task. Init: initializing

NOTE:

Queuing: waiting

  • Running: The driver is running.

NOTE:

Pause: paused

  • Success: successful.

NOTE:

Failed: failed

progress

String

Upgrade task progress.

completionTime

String

End time of the upgrade task.

Example Requests

None

Example Responses

Status code: 200

The list of cluster upgrade task details is obtained.

{
  "kind" : "List",
  "apiVersion" : "v3",
  "metadata" : { },
  "items" : [ {
    "kind" : "UpgradeTask",
    "apiVersion" : "v3",
    "metadata" : {
      "uid" : "f40cafed-7bf1-4c3b-b619-80113b4bbb18",
      "creationTimestamp" : "2023-11-24 16:41:12.09236 +0800 CST",
      "updateTimestamp" : "2023-11-24 16:44:05.634206 +0800 CST"
    },
    "spec" : {
      "version" : "v1.17.17-r0",
      "targetVersion" : "v1.19.16-r80"
    },
    "status" : {
      "phase" : "Success",
      "completionTime" : "2023-11-24 16:44:05.634206 +0800 CST"
    }
  }, {
    "kind" : "UpgradeTask",
    "apiVersion" : "v3",
    "metadata" : {
      "uid" : "91755b96-5fd8-4a6a-bda1-983de9055996",
      "creationTimestamp" : "2023-11-24 19:54:35.194306 +0800 CST",
      "updateTimestamp" : "2023-11-24 20:14:35.194306 +0800 CST"
    },
    "spec" : {
      "version" : "v1.19.16-r80",
      "targetVersion" : "v1.23.8-r10"
    },
    "status" : {
      "phase" : "Success",
      "completionTime" : "2023-11-24 20:14:35.194306 +0800 CST"
    }
  } ]
}

Status Codes

Status Code

Description

200

The list of cluster upgrade task details is obtained.

Error Codes

See Error Codes.