调用DescribeEvents查询用户操作事件。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求语法
GET /events?cluster_id=String&type=String&page_size=Long&page_number=Long HTTP/1.1
Content-Type:application/json
请求参数
参数名称 | 类型 | 是否必选 | 示例 | 说明 |
---|---|---|---|---|
cluster_id | String | 否 | cf62854ac2130470897be7a27ed1f**** | 集群ID。 |
type | String | 否 | nodepool_upgrade | 事件类型。取值:
|
page_size | Long | 否 | 50 | 每页显示数量。 |
page_number | Long | 否 | 1 | 分页查询页数。 |
响应体语法
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
}
}
响应参数
参数名称 | 类型 | 示例 | 说明 |
---|---|---|---|
events | Array of event | 事件详情。 |
|
event_id | String | A234-1234-1234 | 事件ID。 |
type | String | nodepool_upgrade | 事件类型。取值:
|
source | String | /clusters/cf62854ac2130470897be7a27ed1f****/nodepools | 事件来源。 |
subject | String | nodePool-id | 事件主体。 |
time | String | 2022-11-23T20:48:01+08:00 | 事件开始时间。 |
cluster_id | String | cluster-id | 集群ID。 |
data | Object | 事件描述。 |
|
level | String | info | 事件等级。 |
reason | String | Started | 事件状态。 |
message | String | Start to upgrade NodePool nodePool/nodePool-A | 事件详情。 |
page_info | Object | 分页信息。 |
|
page_size | Long | 50 | 每页显示数量。 |
page_number | Long | 1 | 分页查询页数。 |
total_count | Long | 3 | 结果总数。 |
查询用户事件示例
请求示例
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
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeEventsResponse>
<events>
<event_id>A234-1234-1234</event_id>
<type>nodepool_upgrade</type>
<source>/clusters/cf62854ac2130470897be7a27ed1f****/nodepools</source>
<subject>nodePool-id</subject>
<time>2022-11-23T20:48:01+08:00</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>
</DescribeEventsResponse>
JSON
格式
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" : "2022-11-23T20:48:01+08:00",
"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
}
}
错误码
访问错误中心查看更多错误码。
开发者资源
-
SDK
阿里云为您提供多种语言的SDK,帮助您快速通过API集成阿里云的产品和服务,推荐您使用SDK调用API,已免除您手动签名验证。
-
OpenAPI Explorer
快速检索,可视化调试API,在线命令行工具,同步动态生成可执行的SDK代码示例。
-
阿里云CLI
阿里云资产管理和配置工具,可通过命令方式同时管理多个阿里云产品和服务,简单快捷,是您上云好帮手。