Queries the DAS Enterprise Edition configuration of a database instance.
Operation description
Before you begin:
Use the latest version of the Alibaba Cloud or DAS SDK.
When calling DAS by using the SDK, set the region to cn-shanghai.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hdm:DescribeSqlLogConfig |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The database instance ID. |
rm-2ze8g2am97624**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The returned status code. |
200 |
| Data |
object |
The returned data. |
|
| ColdEnable |
boolean |
Indicates whether cold data storage is enabled. Valid values:
|
true |
| ColdRetention |
integer |
The cold data storage duration. Unit: days. |
23 |
| ColdStartTime |
integer |
The start time of cold data storage. The value is a UNIX timestamp. Unit: milliseconds. |
1683712800000 |
| CollectorVersion |
string |
The collector version. Valid values:
|
MYSQL_V3 |
| HotEnable |
boolean |
Indicates whether hot data storage is enabled. Valid values:
|
true |
| HotRetention |
integer |
The hot data storage duration. Unit: days. |
7 |
| HotStartTime |
integer |
The start time of hot data storage. The value is a UNIX timestamp. Unit: milliseconds. |
1683712800000 |
| LogFilter |
string |
A reserved parameter. |
None |
| RequestEnable |
boolean |
Indicates whether SQL Explorer is enabled. Valid values:
|
true |
| RequestStartTime |
integer |
The time when SQL Explorer was enabled. The value is a UNIX timestamp. Unit: milliseconds. |
1683712800000 |
| RequestStopTime |
integer |
The expiration time of DAS Enterprise Edition V1. The value is a UNIX timestamp. Unit: milliseconds. |
1715335200000 |
| Retention |
integer |
The total data storage duration, which is the sum of HotRetention and ColdRetention. Unit: days. |
30 |
| SqlLogEnable |
boolean |
Indicates whether DAS Enterprise Edition is enabled. Valid values:
|
true |
| Enable |
boolean |
Indicates whether SQL Explorer is enabled. This parameter is an alias of SqlLogEnable. |
|
| SqlLogSource |
string |
A reserved parameter. |
None |
| SqlLogState |
string |
The data migration status. Valid values:
|
FINISH |
| SqlLogVisibleTime |
integer |
The time when DAS Enterprise Edition was enabled. The value is a UNIX timestamp. Unit: milliseconds. |
1683712800000 |
| SupportMigration |
boolean |
A reserved parameter. |
None |
| SupportVersion |
string |
The latest DAS Enterprise Edition version supported by the current instance. Valid values:
|
SQL_LOG_V3 |
| SupportSecurityAudit |
boolean |
Indicates whether the engine and region of the current instance support security audit activation. This field only indicates product capability and does not indicate that security audit is already enabled. |
|
| Version |
string |
The current DAS Enterprise Edition version that is enabled. Valid values:
|
SQL_LOG_V3 |
| Message |
string |
The returned message. Note
If the request is successful, Successful is returned. If the request fails, an error message is returned, such as an error code. |
Successful |
| RequestId |
string |
The request ID. |
0A74B755-98B7-59DB-8724-1321B394**** |
| Success |
string |
Indicates whether the request was successful. Valid values:
|
true |
For SQL_LOG_V0 (Enterprise Edition V0) and SQL_LOG_V1 (Enterprise Edition V1), data is stored in CStore and is considered hot storage. For database instances with these versions enabled, the query returns SqlLogEnable = HotEnable = true, Retention = HotRetention, ColdEnable = false, ColdRetention = 0.
Examples
Success response
JSON format
{
"Code": "200",
"Data": {
"ColdEnable": true,
"ColdRetention": 23,
"ColdStartTime": 1683712800000,
"CollectorVersion": "MYSQL_V3",
"HotEnable": true,
"HotRetention": 7,
"HotStartTime": 1683712800000,
"LogFilter": "None",
"RequestEnable": true,
"RequestStartTime": 1683712800000,
"RequestStopTime": 1715335200000,
"Retention": 30,
"SqlLogEnable": true,
"Enable": false,
"SqlLogSource": "None",
"SqlLogState": "FINISH",
"SqlLogVisibleTime": 1683712800000,
"SupportMigration": true,
"SupportVersion": "SQL_LOG_V3",
"SupportSecurityAudit": false,
"Version": "SQL_LOG_V3"
},
"Message": "Successful",
"RequestId": "0A74B755-98B7-59DB-8724-1321B394****",
"Success": "true"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParams | The request parameters are invalid. | The request parameters are invalid. |
| 403 | NoPermission | You are not authorized to do this action. | You do not have the permissions to perform this operation. |
| 404 | InstanceNotFound | The specified instance does not exist. | The instance does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.