Querying SQL Audit Policy¶
Function¶
This API is used to query the policy for SQL audit logs.
URI¶
URI format
GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/auditlog-policy
Parameter description
¶ 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.
Requests¶
Responses¶
Parameter description
¶ 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.
Response example
{ "keep_days":7, "audit_scope":"all", "audit_types":["insert"] }
Status Code¶
Status Code:200.
For more information, see Status Code.
Error Code¶
For more information, see Error Code.