You can call the DescribeEvents operation to query events in a specified 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 /events?cluster_id=String&type=String&page_size=Long&page_number=Long HTTP/1.1
Content-Type:application/json

Request parameters

Table 1. Request query parameters
ParameterTypeRequiredExampleDescription
cluster_idStringNocf62854ac2130470897be7a27ed1f****

The ID of the cluster.

typeStringNonodepool_upgrade

The type of the event. Valid values:

  • cluster_create: cluster creation.
  • cluster_scaleout: cluster scale-out.
  • cluster_attach: adding existing nodes.
  • cluster_delete: cluster deletion.
  • cluster_upgrade: cluster upgrades.
  • cluster_migrate: cluster migration.
  • cluster_node_delete: node removal.
  • cluster_node_drain: node draining.
  • cluster_modify: cluster modifications.
  • cluster_configuration_modify: modifications to cluster control configurations.
  • cluster_addon_install: component installation.
  • cluster_addon_upgrade: component upgrades.
  • cluster_addon_uninstall: component uninstallation.
  • runtime_upgrade: runtime upgrades.
  • nodepool_upgrade: node pool upgrades.
  • nodepool_update: node pool updates.
page_sizeLongNo50

The number of entries to return on each page.

page_numberLongNo1

The number of the page to return.

Response syntax

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

{
  "events" : [ {
    "event_id" : "String",
    "type" : "String",
    "source" : "String",
    "subject" : "String",
    "time" : "String",
    "cluster_id" : "String",
    "data" : {
      "level" : "String",
      "reason" : "String",
      "message" : "String"
    }
  } ],
  "page_info" : {
    "page_size" : Long,
    "page_number" : Long,
    "total_count" : Long
  }
}

Response parameters

Table 2. Response body parameters
ParameterTypeExampleDescription
eventsArray of event

The details of the event.

event_idStringA234-1234-1234

The ID of the event.

typeStringnodepool_upgrade

The type of the event. Valid values:

  • cluster_create: cluster creation.
  • cluster_scaleout: cluster scale-out.
  • cluster_attach: adding existing nodes.
  • cluster_delete: cluster deletion.
  • cluster_upgrade: cluster upgrades.
  • cluster_migrate: cluster migration.
  • cluster_node_delete: node removal.
  • cluster_node_drain: node draining.
  • cluster_modify: cluster modifications.
  • cluster_configuration_modify: modifications to cluster control configurations.
  • cluster_addon_install: component installation.
  • cluster_addon_upgrade: component upgrades.
  • cluster_addon_uninstall: component uninstallation.
  • runtime_upgrade: runtime upgrades.
  • nodepool_upgrade: node pool upgrades.
  • nodepool_update: node pool updates.
sourceString/clusters/cf62854ac2130470897be7a27ed1f****/nodepools

The source of the event.

subjectStringnodePool-id

The subject of the event.

timeString2022-11-23T20:48:01+08:00

The time when the event started.

cluster_idStringcluster-id

The ID of the cluster.

dataobject

The description of the event.

levelStringinfo

The level of the event.

reasonStringStarted

The state of the event.

messageStringStart to upgrade NodePool nodePool/nodePool-A

The details of the event.

page_infoobject

The pagination details.

page_sizeLong50

The number of entries to return on each page.

page_numberLong1

The number of the page to return.

total_countLong3

The total number of entries returned.

Examples

Sample requests

GET /events?cluster_id=cf62854ac2130470897be7a27ed1f****&type=nodePool_upgrade&page_size=50&page_number=1 HTTP/1.1 
Host:cs.aliyuncs.com 
Content-Type:application/json

Sample success responses

XML format

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

<events>
    <event_id>A234-1234-1234</event_id>
    <type>nodePool_upgrade</type>
    <source>/clusters/cf62854ac2130470897be7a27ed1f****/nodepools</source>
    <subject>nodePool-id</subject>
    <time>2020-12-01T17:31:00Z</time>
    <cluster_id>cluster-id</cluster_id>
    <data>
        <level>info</level>
        <reason>Started</reason>
        <message>Start to upgrade NodePool nodePool/nodePool-A</message>
    </data>
</events>
<page_info>
    <page_size>50</page_size>
    <page_number>1</page_number>
    <total_count>3</total_count>
</page_info>

JSON format

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

{
  "events" : [ {
    "event_id" : "A234-1234-1234",
    "type" : "nodePool_upgrade",
    "source" : "/clusters/cf62854ac2130470897be7a27ed1f****/nodepools",
    "subject" : "nodePool-id",
    "time" : "2020-12-01T17:31:00Z",
    "cluster_id" : "cluster-id",
    "data" : {
      "level" : "info",
      "reason" : "Started",
      "message" : "Start to upgrade NodePool nodePool/nodePool-A"
    }
  } ],
  "page_info" : {
    "page_size" : 50,
    "page_number" : 1,
    "total_count" : 3
  }
}

Error codes

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