Queries event information about multiple container groups at a time.
Operation description
You can call this operation to query the event information about multiple elastic container instances at a time. By default, the most recent 50 entries of events of each elastic container instance are returned.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
eci:DescribeContainerGroupEvents | get | *containergroup acs:eci:{#regionId}:{#accountId}:containergroup/{#containergroupId} |
| 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 ID of the resource group. | rg-uf66jeqopgqa9hdn**** |
ContainerGroupIds | string | No | The IDs of the elastic container instances. You can specify up to 20 IDs. Each ID must be a JSON string. | ["eci-bp17gw49eu09yiwm****", "eci-bp19aq49du01abcm****", "eci-2zegym1qhbmdfr1s****"] |
Tag | array<object> | No | The tag that is added to the elastic container instances. | |
object | No | |||
Value | string | No | The value of the tag. | name |
Key | string | No | The key of the tag. | test |
NextToken | string | No | The pagination token that is used in the next request to retrieve a new page of results. If NextToken is empty, no next page exists. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken. | d78f2dd8-5979-42fe-xaee-b16db43be5bc |
EventSource | string | No | The event source. Valid values:
This parameter is empty by default. This indicates that all events are queried. | K8sAgent |
SinceSecond | integer | No | A relative time in seconds before the current time from which to show event information. This parameter is used to poll incremental events. | 60 |
Limit | integer | No | The maximum number of elastic container instances to be returned for this request. Default value: 200. Note
The number of elastic container instances to be returned is no greater than this parameter value.
| 200 |
Response parameters
Examples
Sample success responses
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 |
---|---|---|
400 | InvalidParameter.MismatchInstanceType | The instanceId mismatch instance type. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-09-04 | The Error code has changed | View Change Details |
2023-06-02 | The response structure of the API has changed | View Change Details |
2021-09-27 | The request parameters of the API has changed | View Change Details |