All Products
Search
Document Center

AnalyticDB:DescribeDBInstanceErrorLog

Last Updated:Jan 24, 2025

Queries the error logs of an AnalyticDB for PostgreSQL instance.

Operation description

You can call this operation to query the error logs of an AnalyticDB for PostgreSQL instance.

Limits

You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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
gpdb:DescribeDBInstanceErrorLogget
*DBInstance
acs:gpdb:*:{#accountId}:dbinstance/{#DBInstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The instance ID.

Note You can call the DescribeDBInstances operation to query the information about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.
gp-bp12ga6v69h86****
PageSizeintegerNo

The number of entries per page. Valid values:

  • 20
  • 50
  • 100

Default value: 20.

20
PageNumberintegerNo

The page number. Pages start from page 1. Default value: 1.

1
StartTimestringNo

The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC.

2022-04-24T06:59Z
EndTimestringNo

The end of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. The end time must be later than the start time.

2022-04-25T06:59Z
LogLevelstringNo

The level of the logs to query. Valid values:

  • ALL: queries all error logs.
  • PANIC: queries only abnormal logs.
  • FATAL: queries only critical logs.
  • ERROR: queries only error logs.
ALL
UserstringNo

The username.

adbpguser
DatabasestringNo

The name of the database.

adbtest
HoststringNo

This parameter is not supported in Alibaba Cloud public cloud.

null
KeywordsstringNo

One or more keywords that are used to query error logs.

error

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

B4CAF581-2AC7-41AD-8940-D56DF7AADF5B
TotalCountinteger

The total number of entries returned.

1
PageNumberinteger

The page number.

1
Itemsarray<object>

The content of the error log.

Itemsobject
Timelong

The time when the log was generated. The time is displayed in UTC.

2022-04-24 11:28:14
LogLevelstring

The level of the queried log.

FATAL
Userstring

The name of the database account.

adbpguser
Databasestring

The name of the database.

adbtest
Hoststring

This parameter is not supported.

null
LogContextstring

The content of the error log.

unsupported frontend protocol 2689.28208: server supports 1.0 to 3.0

Examples

Sample success responses

JSONformat

{
  "RequestId": "B4CAF581-2AC7-41AD-8940-D56DF7AADF5B",
  "TotalCount": 1,
  "PageNumber": 1,
  "Items": [
    {
      "Time": 0,
      "LogLevel": "FATAL",
      "User": "adbpguser",
      "Database": "adbtest",
      "Host": "null",
      "LogContext": "unsupported frontend protocol 2689.28208: server supports 1.0 to 3.0"
    }
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperation
No change history