Domain name for API request: cdb.intl.tencentcloudapi.com.
This API is used to modify 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.
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: ModifyAuditConfig. |
| 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 | Audit log retention period. Valid values:7 - One week;30 - One month;180 - Six months;365 - One year;1095 - Three years;1825 - Five years. |
| CloseAudit | No | Boolean | Whether to disable the audit service. Valid values: true - Disable; false - Do not disable. Default value: false.Notes:1. When the audit service is disabled, your audit logs and files will be deleted, and all audit policies for this instance will be removed.2. At least one of CloseAudit and LogExpireDay must be provided. If both are provided, CloseAudit takes priority.3. You can use this parameter to disable the audit service. Once disabled, the audit service cannot be re-enabled via this API. |
| HighLogExpireDay | No | Integer | High-frequency audit log retention period. Valid values:7 - One week;30 - One month;180 - Six months;365 - One year;1095 - Three years;1825 - Five years. |
| 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. |
https://cdb.intl.tencentcloudapi.com/?Action=ModifyAuditConfig
&LogExpireDay=365
&InstanceId=cdb-txcniupi
&<Common request parameters>{
"Response": {
"RequestId": "6EF60BEC-0242-43AF-BB20-270359FB54A7"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
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.AuditError | An error occurred in the internal service of the audit service. |
| InternalError.AuditModifyStatusError | Failed to modify audit status. |
| InternalError.DatabaseAccessError | Internal database error. |
| InternalError.InternalHttpServerError | An exception occurred while executing the request. |
| InvalidParameter | Parameter error. |
| InvalidParameter.InvalidParameterError | Invalid parameter value |
| InvalidParameterValue | Invalid parameter value |
| OperationDenied.AuditPolicyNotExistError | Audit policy not found. |
| OperationDenied.ModifyAuditStatusError | Failed to modify audit status. |
| ResourceNotFound | The resource does not exist. |
| ResourceUnavailable | The resource is unavailable. |
文档反馈