All Products
Search
Document Center

Elastic Container Instance:DescribeContainerGroupEvents

Last Updated:Oct 17, 2025

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

eci:DescribeContainerGroupEvents

get

*containergroup

acs:eci:{#regionId}:{#accountId}:containergroup/{#containergroupId}

  • eci:tag
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:

  • EciService

  • K8sAgent

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

  • Warning

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.