tencent cloud

CreateAuditLogFile
最后更新时间:2026-01-19 16:00:11
CreateAuditLogFile
最后更新时间: 2026-01-19 16:00:11

1. API Description

Domain name for API request: cdb.intl.tencentcloudapi.com.

This API is used to create an audit log file for a TencentDB instance.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: CreateAuditLogFile.
Version Yes String Common Params. The value used for this API: 2017-03-20.
Region Yes String Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-bangkok, ap-beijing, ap-chengdu, ap-chongqing, ap-guangzhou, ap-hongkong, ap-jakarta, ap-nanjing, ap-seoul, ap-shanghai, ap-shanghai-fsi, ap-shenzhen-fsi, ap-singapore, ap-tokyo, eu-frankfurt, na-ashburn, na-siliconvalley, sa-saopaulo.
InstanceId Yes String Instance ID, which can be obtained through the DescribeDBInstances API.
StartTime Yes String Start time. We recommend that the interval between start and end time does not exceed 7 days.
EndTime Yes String End time. We recommend that the interval between start and end time does not exceed 7 days.
Order No String Sort order. Valid values: "ASC" - Ascending order, "DESC" - Descending order. Default value: "DESC".
OrderBy No String Field to sort by. Valid values: "timestamp" - Timestamp; "affectRows" - Number of affected rows; "execTime" - Execution time. Default value: "timestamp".
LogFilter.N No Array of InstanceAuditLogFilters Filter conditions. You can filter logs based on these conditions.
ColumnFilter.N No Array of String Columns to include in the download.

3. Output Parameters

Parameter Name Type Description
FileName String Audit log file name.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Creating an Audit Log File

This example shows you how to successfully query audit logs.

Input Example

https://cdb.intl.tencentcloudapi.com/?Action=CreateAuditLogFile
&InstanceId=cdb-qwerasdf
&StartTime=2017-07-12 10:29:20
&EndTime=2017-07-13 10:29:20
&<Common request parameters>

Output Example

{
    "Response": {
        "RequestId": "6EF60BEC-0242-43AF-BB20-270359FB54A7",
        "FileName": "shenji.csv"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation.CreateAuditLogFileError Failed to create an audit log file.
InternalError.AuditCreateLogFileError Error creating an audit log file.
InternalError.DBError Database exception
InternalError.DatabaseAccessError Internal database error.
InternalError.ExecHttpRequestError Failed to execute the HTTP request
InternalError.InternalHttpServerError An exception occurred while executing the request.
InternalError.ServerError Internal error of the system.
InternalError.TransactionBeginError Operation failed
InternalError.UnknownError Unknown error
InvalidParameter Parameter error.
InvalidParameter.ExceptionParam Parameter exception.
InvalidParameter.InvalidParameterError Invalid parameter value
InvalidParameter.JsonUnmarshalError Failed to deserialize JSON.
InvalidParameterValue.DataConvertError Data conversion failed.
InvalidParameterValue.InvalidParameterValueError Invalid parameter value
OperationDenied Operation denied.
OperationDenied.AuditFileOverQuotaError Number of audit log files exceeds the maximum limit.
OperationDenied.AuditPolicyNotExistError Audit policy not found.
OperationDenied.OverQuota Resource quota exceeded.
OverQuota Limit exceeded.
ResourceUnavailable The resource is unavailable.
本页内容是否解决了您的问题?
您也可以 联系销售 提交工单 以寻求帮助。

文档反馈