You can call this operation to view the error logs of an instance during a certain period of time.

The error logs include the time when they are generated and error messages.

Debugging

You can use OpenAPI Explorer to perform debugging. OpenAPI Explorer allows you to perform various operations to simplify API usage. For example, you can retrieve APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required? Example Description
Action String Yes DescribeErrorLogs

The operation that you want to perform. Set this parameter to DescribeErrorLogs.

DBInstanceId String Yes rm-uf6wjk5xxxxxxx

The ID of the instance.

StartTime String Yes 2011-05-01T20:10Z

The start time of the query. Format: yyyy-MM-ddTHH:mmZ.

EndTime String Yes 2011-05-30T20:10Z

The end time of the query. It must be later than the start time. The time span between the start and end time must be less than 31 days. Format: yyyy-MM-ddTHH:mmZ.

PageSize Integer No 30

The number of records on each page. Valid values:

  • 30
  • 50
  • 100

Default value: 30.

PageNumber Integer No 1

The page number. It must be greater than 0 and cannot exceed the maximum value of the given Integer.

Default value: 1.

AccessKeyId String No LTAIfCxxxxxxx

The AccessKey ID issued by Alibaba Cloud for users to access services.

Response parameters

Parameter Type Example Description
TotalRecordCount Integer 100

The total number of records.

PageNumber Integer 1

The page number.

PageRecordCount Integer 30

The number of error logs on the current page.

Items N/A N/A

The detailed list of error logs.

ErrorInfo String spid52 DBCC TRACEON 3499, server process ID (SPID) 52. This is an informational message only; no user action is required

The error message.

CreateTime String 2011-05-30T12:11:04Z

The time when the error log is generated. Format: yyyy-MM-ddTHH:mm:ssZ.

RequestId String 98504E07-BB0E-40FC-B152-E4882615812C

The ID of the request.

Examples

Sample requests


http(s)://rds.aliyuncs.com/? Action=DescribeErrorLogs
&DBInstanceId=rm-uf6wjk5xxxxxxx 
&StartTime=2011-05-01T20:10Z 
&EndTime=2011-05-30T20:10Z 
&<Common request parameters>

Successful response examples

XML format

<DescribeErrorLogsResponse>
	  <RequestId>98504E07-BB0E-40FC-B152-E4882615812C</RequestId>
	  <PageNumber>1</PageNumber>
	  <TotalRecordCount>1</TotalRecordCount>
	  <PageRecordCount>1</PageRecordCount>
	  <Items>
		    <ErrorLog>
			      <ErrorInfo>spid52 DBCC TRACEON 3499, server process ID (SPID) 52. This is an informational message only; no user action is required</ErrorInfo>
			      <CreateTime>2013-06-04T15:00:00</CreateTime>
		    </ErrorLog>
	  </Items></DescribeErrorLogsResponse>

JSON format

{
	"Items":{
		"ErrorLog":[
			{
				"ErrorInfo":"spid52 DBCC TRACEON 3499, server process ID (SPID) 52. This is an informational message only; no user action is required",
				"CreateTime":"2013-06-04T15:00:00"
			}
		]
	},
	"TotalRecordCount":1,
	"PageNumber":1,
	"RequestId":"98504E07-BB0E-40FC-B152-E4882615812C",
	"PageRecordCount":1
}

Error codes

For a list of error codes, visit the API Error Center.