This API is used to query the policy for SQL audit logs.
GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/auditlog-policy
Name |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Specifies the project ID of a tenant in a region. |
instance_id |
Yes |
Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. |
Name |
Type |
Description |
---|---|---|
keep_days |
Integer |
Indicates the number of days for storing audit logs. The value is 0 when SQL audit is disabled. |
audit_scope |
String |
Indicates the audit scope. |
audit_types |
Array of strings |
Indicates the audit type. |
{ "keep_days":7, "audit_scope":"all", "audit_types":["insert"] }
For more information, see Error Code.