doc-exports/docs/dds/api-ref/dds_api_0098.html
Wang , Deng Ke 60010eb9d0 dds api 2.0.38sp24 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com>
Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
2023-01-13 08:55:41 +00:00

6.7 KiB

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
    Table 1 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.

Responses

  • Parameter description
    Table 2 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.