All Products
Search
Document Center

Elastic Container Instance:DescribeContainerGroupEvents

Last Updated:Jul 22, 2024

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID.

cn-hangzhou
ZoneIdstringNo

The zone ID.

cn-hangzhou-k
VSwitchIdstringNo

The vSwitch ID.

vsw-uf6h3rbwbm90urjwa****
ResourceGroupIdstringNo

The ID of the resource group.

rg-uf66jeqopgqa9hdn****
ContainerGroupIdsstringNo

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****"]
Tagarray<object>No

The tag that is added to the elastic container instances.

objectNo
ValuestringNo

The value of the tag.

name
KeystringNo

The key of the tag.

test
NextTokenstringNo

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
EventSourcestringNo

The event source. Valid values:

  • EciService
  • K8sAgent

This parameter is empty by default. This indicates that all events are queried.

K8sAgent
SinceSecondintegerNo

A relative time in seconds before the current time from which to show event information. This parameter is used to poll incremental events.

60
LimitintegerNo

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

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

1340C38D-6189-54D1-86F6-7D5ECF3E0088
TotalCountinteger

The total number of entries of returned events.

10
Dataarray<object>

Details of the events.

object
ContainerGroupIdstring

The ID of the elastic container instance.

eci-uf6fonnghi50v6nq****
Namestring

The name of the elastic container instance.

test
Namespacestring

The namespace where the elastic container instance resides.

redis
uuidstring

The UUID of the elastic container instance.

3fc6b309-****-****
Annotationsstring

The annotations of the elastic container instance.

"{\"tenancy.x-k8s.io/namespace\":\"redis\"}"
Eventsarray<object>

The events.

object
Typestring

The event type. Valid values:

  • Normal
  • Warning
Normal
Countinteger

The number of events.

10
FirstTimestampstring

The first occurrence time of the event.

2021-10-04T09:08:04Z
LastTimestampstring

The most recent occurrence time of the event.

2021-10-04T09:08:04Z
Messagestring

The message about the event.

Started container
Reasonstring

The cause of the event.

Started
ReportingComponentstring

The component from which the event is reported.

test
ReportingInstancestring

The instance from which the event is reported.

test
Sourceobject

The source.

Componentstring

The component.

kubelet
Hoststring

The host.

eci
involvedObjectobject

The resource object that the event is about.

Kindstring

The resource type.

Pod
Namestring

The resource name.

test
Namespacestring

The namespace where the resource resides.

default
Uidstring

The resource ID.

eci-8vb5nkcq3a5cu0p3****
ApiVersionstring

The version of Kubernetes.

v1
Metadataobject

The metadata of the event.

Namestring

The event name.

eci-uto-created-eci-for-ubuntu.167e3fb73cc7f9cb
Namespacestring

The namespace.

default

Examples

Sample success responses

JSONformat

{
  "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

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-06-02The response structure of the API has changedView Change Details
2021-09-27The request parameters of the API has changedView Change Details