tencent cloud

ModifyAuditService
最后更新时间:2026-01-19 15:59:54
ModifyAuditService
最后更新时间: 2026-01-19 15:59:54

1. API Description

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

This API is used to modify the service configurations for a TencentDB instance, including the audit log retention period and the audit rules.

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: ModifyAuditService.
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.
LogExpireDay No Integer Log retention period. Valid values:7 - One week;30 - One month;90 - Three months;180 - Six months;365 - One year;1095 - Three years;1825 - Five years.
HighLogExpireDay No Integer High-frequency log retention period. Default value: 7. This value must be less than or equal to LogExpireDay. Valid values include:3 - 3 days;7 - One week;30 - One month;90 - Three months;180 - Six months;365 - One year;1095 - Three years;1825 - Five years.
AuditAll No Boolean Modifies the instance audit rule to Full audit.
RuleTemplateIds.N No Array of String Rule template ID, which can be obtained through the DescribeAuditRuleTemplates API.

3. Output Parameters

Parameter Name Type Description
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 Modifying the Audit Service

None

Input Example

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

{
    "InstanceId": "cdb-6990cckk",
    "LogExpireDay": 30,
    "HighLogExpireDay": 7,
    "AuditAll": true
}

Output Example

{
    "Response": {
        "RequestId": "43-12121-812w1221213-62usf9093"
    }
}

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.
InternalError.HttpError Exceptional HTTP request
InternalError.UnknownError Unknown error
InvalidParameter.ControllerNotFoundError This API was not found.
InvalidParameter.ExceptionParam Parameter exception.
OperationDenied.AuditPolicyNotExistError Audit policy not found.
OperationDenied.AuditStatusError Exceptional audit status.
OperationDenied.AuditTaskConflictError The audit tasks conflict.
OperationDenied.ModifyAuditStatusError Failed to modify audit status.
本页内容是否解决了您的问题?
您也可以 联系销售 提交工单 以寻求帮助。

文档反馈