tencent cloud

DescribeAuditConfig
最后更新时间:2026-01-19 16:00:04
DescribeAuditConfig
最后更新时间: 2026-01-19 16:00:04

1. API Description

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

This API is used to query the service configurations for a TencentDB audit policy, including the audit log retention period.

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: DescribeAuditConfig.
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, in the format such as cdb-c1nl9rpv or cdbro-c1nl9rpv. This matches the instance ID displayed on the TencentDB console.

3. Output Parameters

Parameter Name Type Description
LogExpireDay Integer Audit log retention period. Valid values: [0, 7, 30, 180, 365, 1095, 1825].
LogType String Audit log storage type. Valid value: "storage" - Storage type.
IsClosing String Whether the audit service is being disabled. Valid values: "false" - No, "true" - Yes.
IsOpening String Whether the audit service is being enabled. Valid values: "false" - No, "true" - Yes.
CreateTime String Time when the audit service was activated.
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 Querying Instance Configuration

Input Example

POST / HTTP/1.1
Host: cdb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeAuditConfig
<Common request parameters>

{
    "InstanceId": "cdbro-6zpy4ei1"
}

Output Example

{
    "Response": {
        "RequestId": "507f6863-2827-4c2c-9c3b-fbbcc32e1ed4",
        "CreateTime": "2025-04-11 15:13:07",
        "IsClosing": "false",
        "IsOpening": "false",
        "LogExpireDay": 90,
        "LogType": "storage"
    }
}

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.AuditConfigNotExist Audit not found.
FailedOperation.InstanceQueryError Query failed.
InternalError.DBError Database exception
InternalError.DatabaseAccessError Internal database error.
InvalidParameter.ControllerNotFoundError This API was not found.
OperationDenied.AuditPolicyNotExistError Audit policy not found.
ResourceNotFound The resource does not exist.
本页内容是否解决了您的问题?
您也可以 联系销售 提交工单 以寻求帮助。

文档反馈