All Products
Search
Document Center

:DescribeClusterAddonsUpgradeStatus

更新时间:Dec 12, 2023

Queries the upgrade status of the specified components in a Container Service for Kubernetes (ACK) cluster.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request syntax

GET /clusters/[ClusterId]/components/upgradestatus?componentIds=["String"] HTTP/1.1 
Content-Type:application/json

Request parameters

Table 1. Request path parameters
ParameterTypeRequiredExampleDescription
ClusterIdStringYesc23421cfa74454bc8b37163fd19af****

The ID of the ACK cluster.

Table 2. Request query parameters
ParameterTypeRequiredExampleDescription
componentIdsArray of StringNometric-server

The name of the components that you want to query.

Response syntax

HTTP/1.1 200
Content-Type:application/json
{
  "key" : {
    "addon_info" : {
      "component_name" : "String",
      "version" : "String",
      "ready_to_upgrade" : "String"
    },
    "tasks" : {
      "created_at" : "String",
      "finished_at" : "String",
      "status" : "String",
      "is_canceled" : Boolean
    }
  }
}

Response parameters

Table 3. Response body parameters
ParameterTypeExampleDescription
Map

The returned data.

object

The details of the upgrade status of the queried components.

addon_infoobject

The information about the component.

component_nameStringcloud-controller-manager

The name of the component.

versionStringv1.9.3.340-g9830b58-aliyun

The current version of the component.

ready_to_upgradeStringtrue

Indicates whether the component is upgradable. Valid values:

  • true: The component is upgradable.
  • false: The component is not upgradable.
tasksobject

The details of the upgrade task.

created_atString2020-12-28T17:00:50Z

The beginning time of the task.

finished_atString2020-12-28T17:05:36Z

The end time of the task.

statusStringSuccess

The state of the upgrade task. Valid values:

  • Upgrading: The upgrade is in progress.
  • Success: The upgrade is successful.
  • Failed: The upgrade failed.
  • Running: The upgrade is installing.
  • Paused: The upgrade is paused.
  • Canceled: The upgrade is canceled.
is_canceledBooleanfalse

Indicates whether the upgrade task was canceled. Valid values:

  • true: The upgrade task was canceled.
  • false: The upgrade task was not canceled.

Examples

Sample requests

GET /clusters/[ClusterId]/components/upgradestatus?componentIds=["metric-server"] HTTP/1.1 
Content-Type:application/json

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<cloud-controller-manager>
    <tasks>
        <created_at>2020-12-28T17:01:55Z</created_at>
        <finished_at>2020-12-28T17:05:11Z</finished_at>
        <is_canceled>false</is_canceled>
        <status>Success</status>
    </tasks>
    <addon_info>
        <component_name>cloud-controller-manager</component_name>
        <version>v1.9.3.340-g9830b58-aliyun</version>
        <ready_to_upgrade>true</ready_to_upgrade>
    </addon_info>
</cloud-controller-manager>
<metric-server>
    <tasks>
        <created_at>2020-12-28T17:00:32Z</created_at>
        <finished_at>2020-12-28T17:05:54Z</finished_at>
        <is_canceled>false</is_canceled>
        <status>Success</status>
    </tasks>
    <addon_info>
        <component_name>metric-server</component_name>
        <version/>
        <ready_to_upgrade>true</ready_to_upgrade>
    </addon_info>
</metric-server>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "cloud-controller-manager" : {
    "tasks" : {
      "created_at" : "2020-12-28T17:01:55Z",
      "finished_at" : "2020-12-28T17:05:11Z",
      "is_canceled" : false,
      "status" : "Success"
    },
    "addon_info" : {
      "component_name" : "cloud-controller-manager",
      "version" : "v1.9.3.340-g9830b58-aliyun",
      "ready_to_upgrade" : "true"
    }
  },
  "metric-server" : {
    "tasks" : {
      "created_at" : "2020-12-28T17:00:32Z",
      "finished_at" : "2020-12-28T17:05:54Z",
      "is_canceled" : false,
      "status" : "Success"
    },
    "addon_info" : {
      "component_name" : "metric-server",
      "version" : "",
      "ready_to_upgrade" : "true"
    }
  }
}

Error codes

For a list of error codes, visit the API Error Center.