All Products
Search
Document Center

Database Autonomy Service:DescribeSqlLogConfig

更新時間:Aug 21, 2024

Queries the configurations of Database Autonomy Service (DAS) Enterprise Edition that is enabled for a database instance.

Operation description

Before you call this operation, take note of the following items:

  • If you use an Alibaba Cloud SDK or a DAS SDK to call this operation, we recommend that you use the latest version of the SDK.
  • If you use an SDK to call operations of DAS, you must set the region ID to cn-shanghai.

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
hdm:DescribeSqlLogConfigget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the database instance.

rm-2ze8g2am97624****

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The response code.

200
Messagestring

The returned message.

Note If the request was successful, Successful is returned. If the request failed, an error message is returned.
Successful
RequestIdstring

The request ID.

0A74B755-98B7-59DB-8724-1321B394****
Successstring

Indicates whether the request was successful. Valid values:

  • true
  • false
true
Dataobject

The data that is returned.

SqlLogVisibleTimelong

The time when DAS Enterprise Edition was enabled. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1683712800000
CollectorVersionstring

The collector version. Valid values:

  • MYSQL_V0
  • MYSQL_V1
  • MYSQL_V2
  • MYSQL_V3
  • PG_V1
  • rdspg_v1
  • polarpg_v1
MYSQL_V3
SupportVersionstring

The latest version of DAS Enterprise Edition that supports the database instance. Valid values:

  • SQL_LOG_V0: DAS Enterprise Edition V0.
  • SQL_LOG_V1: DAS Enterprise version V1.
  • SQL_LOG_V2: DAS Enterprise Edition V2.
  • SQL_LOG_V3: DAS Enterprise Edition V3.
  • SQL_LOG_NOT_ENABLE: DAS Enterprise Edition is not enabled.
  • SQL_LOG_NOT_SUPPORT: DAS Enterprise Edition is not supported.
SQL_LOG_V3
ColdRetentioninteger

The number of days for which the SQL Explorer and Audit data is stored in cold storage.

23
SqlLogEnableboolean

Indicates whether DAS Enterprise Edition is enabled. Valid values:

  • true
  • false
true
Retentioninteger

The total storage duration of the SQL Explorer and Audit data. The value of this parameter is the sum of the values of HotRetention and ColdRetention. Unit: day.

30
HotRetentioninteger

The number of days for which the SQL Explorer and Audit data is stored in hot storage.

7
RequestEnableboolean

Indicates whether the SQL Explorer feature is enabled. Valid values:

  • true
  • false
true
Versionstring

The version of DAS Enterprise Edition that is enabled for the database instance. Valid values:

  • SQL_LOG_V0: DAS Enterprise Edition V0.
  • SQL_LOG_V1: DAS Enterprise version V1.
  • SQL_LOG_V2: DAS Enterprise Edition V2.
  • SQL_LOG_V3: DAS Enterprise Edition V3.
  • SQL_LOG_NOT_ENABLE: DAS Enterprise Edition is not enabled.
  • SQL_LOG_NOT_SUPPORT: DAS Enterprise Edition is not supported.
SQL_LOG_V3
RequestStartTimelong

The time when the SQL Explorer feature was enabled. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1683712800000
HotEnableboolean

Indicates whether the hot data storage is enabled. Valid values:

  • true
  • false
true
HotStartTimelong

The time when the hot data storage was enabled. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1683712800000
ColdEnableboolean

Indicates whether the cold data storage is enabled. Valid values:

  • true
  • false
true
ColdStartTimelong

The time when the cold data storage was enabled. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1683712800000
SqlLogStatestring

The state of data migration. Valid values:

  • FINISH: The historical data is migrated.
  • RUNNING: The historical data is being migrated.
  • FAILURE: The historical data fails to be migrated.
FINISH
RequestStopTimelong

The time when DAS Enterprise Edition V1 expired. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1715335200000
LogFilterstring

A reserved parameter.

None

For database instances for which DAS Enterprise Edition V0 or DAS Enterprise Edition V1 is enabled, the SQL Explorer and Audit data is stored in CStore, which is considered as hot data storage.******** In this case, the following results are returned is the response: SqlLogEnable = HotEnable = true, Retention = HotRetention, ColdEnable = false, ColdRetention = 0.

Examples

Sample success responses

JSONformat

{
  "Code": "200",
  "Message": "Successful",
  "RequestId": "0A74B755-98B7-59DB-8724-1321B394****",
  "Success": "true",
  "Data": {
    "SqlLogVisibleTime": 1683712800000,
    "CollectorVersion": "MYSQL_V3",
    "SupportVersion": "SQL_LOG_V3",
    "ColdRetention": 23,
    "SqlLogEnable": true,
    "Retention": 30,
    "HotRetention": 7,
    "RequestEnable": true,
    "Version": "SQL_LOG_V3",
    "RequestStartTime": 1683712800000,
    "HotEnable": true,
    "HotStartTime": 1683712800000,
    "ColdEnable": true,
    "ColdStartTime": 1683712800000,
    "SqlLogState": "FINISH",
    "RequestStopTime": 1715335200000,
    "LogFilter": "None",
    "SupportMigration": true,
    "SqlLogSource": ""
  }
}

Error codes

HTTP status codeError codeError message
400InvalidParamsThe request parameters are invalid.
403NoPermissionYou are not authorized to do this action.

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

Change history

Change timeSummary of changesOperation
2024-07-23The Error code has changed. The response structure of the API has changedView Change Details