Queries events for multiple Elastic Container Instance (ECI) instances in a batch.
Operation description
You can call this operation to query events for multiple ECI instances. By default, the 50 latest event records for each ECI instance are returned.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eci:DescribeContainerGroupEvents |
get |
*containergroup
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. |
cn-hangzhou |
| ZoneId |
string |
No |
The zone ID. |
cn-hangzhou-k |
| VSwitchId |
string |
No |
The vSwitch ID. |
vsw-uf6h3rbwbm90urjwa**** |
| ResourceGroupId |
string |
No |
The resource group ID. |
rg-uf66jeqopgqa9hdn**** |
| ContainerGroupIds |
string |
No |
The IDs of the ECI instances. You can specify up to 20 IDs. The value must be a JSON-formatted string. |
["eci-bp17gw49eu09yiwm****", "eci-bp19aq49du01abcm****", "eci-2zegym1qhbmdfr1s****"] |
| Tag |
array<object> |
No |
The tags that are attached to the ECI instances. |
|
|
object |
No |
The tags that are attached to the ECI instances. |
||
| Value |
string |
No |
The tag value of the ECI instance. |
name |
| Key |
string |
No |
The tag key of the ECI instance. |
test |
| NextToken |
string |
No |
The token that is used to start the next query. If this parameter is left empty, no more data is returned. You do not need to set this parameter for the first query. Obtain the token for subsequent queries from the response. |
d78f2dd8-5979-42fe-xaee-b16db43be5bc |
| EventSource |
string |
No |
The event source. Valid values:
If you leave this parameter empty, all events are queried. |
K8sAgent |
| SinceSecond |
integer |
No |
Returns only new events to enable incremental polling. |
60 |
| Limit |
integer |
No |
The maximum number of ECI instances to return. Default value: 200. Note
The response may contain fewer entries than the specified value. |
200 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response schema. |
||
| RequestId |
string |
The request ID. |
1340C38D-6189-54D1-86F6-7D5ECF3E0088 |
| TotalCount |
integer |
The number of events returned. |
10 |
| Data |
array<object> |
A list of event information. |
|
|
array<object> |
A list of event information. |
||
| ContainerGroupId |
string |
The ID of the ECI instance. |
eci-uf6fonnghi50v6nq**** |
| Name |
string |
The name of the ECI instance. |
test |
| Namespace |
string |
The namespace where the ECI instance resides. |
redis |
| uuid |
string |
The UUID of the ECI instance. |
3fc6b309-****-**** |
| Annotations |
string |
The annotations of the ECI instance. |
"{\"tenancy.x-k8s.io/namespace\":\"redis\"}" |
| Events |
array<object> |
A list of events. |
|
|
array<object> |
A list of events. |
||
| Type |
string |
The event type. Valid values:
|
Normal |
| Count |
integer |
The number of times the event occurred. |
10 |
| FirstTimestamp |
string |
The time when the event first occurred. |
2021-10-04T09:08:04Z |
| LastTimestamp |
string |
The time when the event last occurred. |
2021-10-04T09:08:04Z |
| Message |
string |
The event message. |
Started container |
| Reason |
string |
The reason for the event. |
Started |
| ReportingComponent |
string |
The component that reports the event. |
test |
| ReportingInstance |
string |
The instance that reports the event. |
test |
| Source |
object |
The source. |
|
| Component |
string |
The component. |
kubelet |
| Host |
string |
The host. |
eci |
| involvedObject |
object |
The resource object that is associated with the event. |
|
| Kind |
string |
The resource type. |
Pod |
| Name |
string |
The resource name. |
test |
| Namespace |
string |
The namespace where the resource resides. |
default |
| Uid |
string |
The ID of the resource. |
eci-8vb5nkcq3a5cu0p3**** |
| ApiVersion |
string |
The Kubernetes version. |
v1 |
| Metadata |
object |
The event metadata. |
|
| Name |
string |
The event name. |
eci-uto-created-eci-for-ubuntu.167e3fb73cc7f9cb |
| Namespace |
string |
The namespace. |
default |
Examples
Success response
JSON format
{
"RequestId": "1340C38D-6189-54D1-86F6-7D5ECF3E0088",
"TotalCount": 10,
"Data": [
{
"ContainerGroupId": "eci-uf6fonnghi50v6nq****",
"Name": "test",
"Namespace": "redis",
"uuid": "3fc6b309-****-****",
"Annotations": "\"{\\\"tenancy.x-k8s.io/namespace\\\":\\\"redis\\\"}\"",
"Events": [
{
"Type": "Normal",
"Count": 10,
"FirstTimestamp": "2021-10-04T09:08:04Z",
"LastTimestamp": "2021-10-04T09:08:04Z",
"Message": "Started container",
"Reason": "Started",
"ReportingComponent": "test",
"ReportingInstance": "test",
"Source": {
"Component": "kubelet",
"Host": "eci"
},
"involvedObject": {
"Kind": "Pod",
"Name": "test",
"Namespace": "default",
"Uid": "eci-8vb5nkcq3a5cu0p3****",
"ApiVersion": "v1"
},
"Metadata": {
"Name": "eci-uto-created-eci-for-ubuntu.167e3fb73cc7f9cb",
"Namespace": "default"
}
}
]
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter.MismatchInstanceType | The instanceId mismatch instance type. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.