All Products
Search
Document Center

Database Autonomy Service:DescribeSqlLogStatistic

Last Updated:Dec 23, 2024

Queries the statistics of Database Autonomy Service (DAS) Enterprise Edition.

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

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

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the database instance.

rm-2ze1jdv45i7l6****

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.

B6D17591-B48B-4D31-9CD6-9B9796B2****
Successstring

Indicates whether the request was successful. Valid values:

  • true
  • false
true
Dataobject

The data returned.

Timestamplong

The timestamp. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1712568564928
HotSqlSizelong

The size of the SQL Explorer and Audit data that is stored in hot storage. Unit: bytes.

1118042
ColdSqlSizelong

The size of the SQL Explorer and Audit data that is stored in cold storage. Unit: bytes.

8585901
ImportSqlSizelong

The size of the SQL Explorer and Audit data that was generated in the most recent day. Unit: bytes.

23
FreeHotSqlSizelong

The free quota for hot data storage. Unit: bytes.

297245
FreeColdSqlSizelong

The free quota for cold data storage. Unit: bytes.

5041450

Examples

Sample success responses

JSONformat

{
  "Code": "200",
  "Message": "Successful",
  "RequestId": "B6D17591-B48B-4D31-9CD6-9B9796B2****",
  "Success": "true",
  "Data": {
    "Timestamp": 1712568564928,
    "HotSqlSize": 1118042,
    "ColdSqlSize": 8585901,
    "ImportSqlSize": 23,
    "FreeHotSqlSize": 297245,
    "FreeColdSqlSize": 5041450
  }
}

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.