Domain name for API request: mongodb.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.
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: 2019-07-25. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| InstanceId | Yes | String | Instance ID, in the format of cmgo-xftsghuy. It is the same as the instance ID displayed on the TencentDB console page. |
| Parameter Name | Type | Description |
|---|---|---|
| InstanceId | String | Instance ID. Note: This field may return null, indicating that no valid values can be obtained. |
| InstanceName | String | Instance name. Note: This field may return null, indicating that no valid values can be obtained. |
| AuditAll | Boolean | true indicates full audit, false indicates rule audit Note: This field may return null, indicating that no valid values can be obtained. |
| CreateTime | String | The time when the instance enables database audit. |
| LogExpireDay | Integer | Audit log retention period. Unit: day. Currently supports retention duration including 0, 30, 180, 365, 1095, 1825. Note: This field may return null, indicating that no valid values can be obtained. |
| LogType | String | Audit log storage type. Currently only support "storage": Storage type. |
| IsClosing | String | Whether the auditing feature is being disabled.
|
| IsOpening | String | Whether the audit feature is being enabled.
|
| 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. |
POST / HTTP/1.1
Host: mongodb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeAuditConfig
<Common request parameters>
{
"InstanceId": "cmgo-bfyv0sy7"
}
{
"Response": {
"AuditAll": true,
"CreateTime": "2025-12-11 11:47:20",
"InstanceId": "cmgo-bfyv****",
"InstanceName": "cmgo-bfyv****",
"IsClosing": "false",
"IsOpening": "false",
"LogExpireDay": 7,
"LogType": "storage",
"RequestId": "d94bc81b-3b76-4104-9270-0582d8227ebc"
}
}
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 |
|---|---|
| InternalError | Internal error |
| InternalError.AuditDescribeLogError | Error querying the audit log. |
| InternalError.CosError | Get file information failed. |
| InternalError.DBError | Database exception. |
| InternalError.DBOperationError | Database operation failed. |
| InternalError.InnerCommonError | Internal service error. |
| InternalError.JSONError | json parsing failure. |
| InternalError.JsonUnmarshalError | Json deserialization error. |
| InternalError.TradeError | Transaction system error. |
| OperationDenied.AuditPolicyConflictError | Audit policy conflict. |
| OperationDenied.AuditPolicyExistError | Audit policy already exists. |
| OperationDenied.AuditPolicyNotExistError | Audit policy not found. |
| OperationDenied.AuditPolicyOverQuotaError | Number of audit policies exceeds the limit. |
| OperationDenied.AuditTaskConflictError | Audit task conflict. |
| OperationDenied.ResourceNotFundError | Resource is not found. |
文档反馈