Queries the logs of a container.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
ContainerGroupId String Yes eci-uf6fonnghi50v6nqj40l

The ID of the container group.

ContainerName String Yes u1

The name of the container.

RegionId String Yes cn-hangzhou

The region ID of the container group.

Action String No DescribeContainerLog

The operation that you want to perform. Set the value to DescribeContainerLog.

LastTime Boolean No false

Specifies whether to query logs about last termination of the container.

SinceSeconds Integer No 10

The time duration to query logs. Unit: seconds. Example: 10, 20, and 30.

StartTime String No 2018-08-02T15:00:00Z

The beginning of the time range to query. Specify the time in the RFC 3339 standard. The time must be in UTC.

Tail Integer No 2000

The number of log entries to be returned. Default value: 500. Maximum value: 2000. A maximum of 1 MB of logs can be returned.

Response parameters

Parameter Type Example Description
ContainerName String u1

The name of the container.

Content String {}

The log content.

RequestId String CA850ADA-E850-4AC8-8355-5B5990EAB7D0

The unique ID of the request.

Examples

Sample requests


http(s)://eci.aliyuncs.com/? Action=DescribeContainerLog
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<DescribeContainerLogResponse>  
      <RequestId>CA850ADA-E850-4AC8-8355-5B5990EAB7D0</RequestId>
      <ContainerName>u1</ContainerName>
      <Content></Content>
</DescribeContainerLogResponse>

JSON format

{
	"RequestId":"CA850ADA-E850-4AC8-8355-5B5990EAB7D0",
	"ContainerName":"u1",
	"Content":""
}

Error codes