获取组件事件列表
功能介绍
获取组件事件列表。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
GET /v1/{project_id}/cae/applications/{application_id}/components/{component_id}/events
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
项目ID,获取项目ID请参见获取项目ID。 |
application_id |
是 |
String |
应用ID。 |
component_id |
是 |
String |
组件ID。 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
X-Auth-Token |
是 |
String |
用户Token。
最大长度:16384 |
X-Enterprise-Project-ID |
否 |
String |
企业项目ID。
说明:
关于企业项目ID的获取及企业项目特性的详细信息,请参见《企业管理服务用户指南》。 |
X-Environment-ID |
是 |
String |
环境ID。
|
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
api_version |
String |
API版本,固定值“v1”,该值不可修改。 枚举值:
|
kind |
String |
API类型,固定值“ComponentEvent”,该值不可修改。 枚举值:
|
items |
Array of EventItem objects |
事件项。 |
请求示例
获取组件事件列表。
GET https://{endpoint}/v1/{project_id}/cae/applications/{application_id}/components/{component_id}/events
响应示例
状态码: 200
请求成功。
{ "api_version" : "v1", "kind" : "ComponentEvent", "items" : [ { "name" : "ScalingReplicaSet", "message" : "Scaled up replica set test-image-5787bf845c to 1", "status" : "Normal", "count" : 1, "involved_object" : "test-image", "involved_object_kind" : "Component", "created_at" : "2023-02-16T17:35:04+08:00", "updated_at" : "2023-02-16T17:35:04+08:00" }, { "name" : "Scheduled", "message" : "Successfully assigned 79c4xxxf5f3a4xxxda92601xxx64b1e8c-test/test-image-5787bf845c-wzz99 to 172.xx.xx.xxx", "status" : "Normal", "count" : 0, "involved_object" : "test-image-5787bf845c-wzz99", "involved_object_kind" : "ComponentInstance", "created_at" : "2023-02-16T17:35:04+08:00", "updated_at" : "2023-02-16T17:35:04+08:00" }, { "name" : "SuccessfulMountVolume", "message" : "Successfully mounted volumes for pod \"test-image-5787bf845c-wzz99_79c4xxxf5f3a4xxxda92601xxx64b1e8c-test(d59a645b-730d-4a1a-951f-822a71dcdb9d)\"", "status" : "Normal", "count" : 2, "involved_object" : "test-image-5787bf845c-wzz99", "involved_object_kind" : "ComponentInstance", "created_at" : "2023-02-16T17:35:04+08:00", "updated_at" : "2023-02-16T17:35:06+08:00" }, { "name" : "Pulled", "message" : "Container image \"nginx:stable-alpine-perl\" already present on machine", "status" : "Normal", "count" : 1, "involved_object" : "test-image-5787bf845c-wzz99", "involved_object_kind" : "ComponentInstance", "created_at" : "2023-02-16T17:35:05+08:00", "updated_at" : "2023-02-16T17:35:05+08:00" }, { "name" : "SuccessfulCreate", "message" : "Created container test-image", "status" : "Normal", "count" : 1, "involved_object" : "test-image-5787bf845c-wzz99", "involved_object_kind" : "ComponentInstance", "created_at" : "2023-02-16T17:35:05+08:00", "updated_at" : "2023-02-16T17:35:05+08:00" }, { "name" : "Started", "message" : "Started container test-image", "status" : "Normal", "count" : 1, "involved_object" : "test-image-5787bf845c-wzz99", "involved_object_kind" : "ComponentInstance", "created_at" : "2023-02-16T17:35:05+08:00", "updated_at" : "2023-02-16T17:35:05+08:00" } ] }
状态码
状态码 |
描述 |
---|---|
200 |
请求成功。 |
错误码
请参见错误码。