All Products
Search
Document Center

Elastic Container Instance:DescribeContainerGroupEvents

Last Updated:Mar 25, 2024

Queries the event information about multiple elastic container instances 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

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.
OperationAccess levelResource typeCondition keyAssociated operation
eci:DescribeContainerGroupEventsRead
  • containergroup
    acs:eci:{#regionId}:{#accountId}:containergroup/{#containergroupId}
  • eci:tag
none

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****"]
Tagobject []No

The tag that is added to the elastic container instances.

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
Dataobject []

Details of the events.

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\"}"
Eventsobject []

The events.

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 changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2021-09-27The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: ZoneId