{
  "swagger": "2.0",
  "info": {
    "title": "Database Audit Log APIs for TiDB Cloud",
    "version": "alpha"
  },
  "tags": [
    {
      "name": "DatabaseAuditLogService"
    }
  ],
  "schemes": ["https"],
  "consumes": ["application/json"],
  "produces": ["application/json"],
  "paths": {
    "/api/v1/serverless/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/auditLog/config": {
      "get": {
        "summary": "Get audit log configuration.",
        "operationId": "DatabaseAuditLogService_GetAuditLogConfig",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/AuditLogConfig"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "Required. The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "Required. The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "Required. The cluster ID",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": ["DatabaseAuditLogService"]
      },
      "patch": {
        "summary": "Update audit log configuration.",
        "operationId": "DatabaseAuditLogService_UpdateAuditLogConfig",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/AuditLogConfig"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "Required. The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "Required. The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "Required. The cluster ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/DatabaseAuditLogService.UpdateAuditLogConfigBody"
            }
          }
        ],
        "tags": ["DatabaseAuditLogService"]
      }
    },
    "/api/v1/serverless/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/auditLog/config:getCloudStorageProfile": {
      "get": {
        "summary": "Get the cloud storage profile of a cluster.",
        "operationId": "DatabaseAuditLogService_GetCloudStorageProfile",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/CloudStorageProfile"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "Required. The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "Required. The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "Required. The cluster ID",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": ["DatabaseAuditLogService"]
      }
    },
    "/api/v1/serverless/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/auditLog/config:precheck": {
      "post": {
        "summary": "PreCheck audit Log configuration.",
        "operationId": "DatabaseAuditLogService_PreCheckAuditLogConfig",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/PreCheckAuditLogConfigResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "Required. The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "Required. The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "Required. The cluster ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/DatabaseAuditLogService.PreCheckAuditLogConfigBody"
            }
          }
        ],
        "tags": ["DatabaseAuditLogService"]
      }
    },
    "/api/v1/serverless/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/auditLog/files": {
      "get": {
        "summary": "List audit log files, only available when audit logs are stored in TiDB Cloud.",
        "operationId": "DatabaseAuditLogService_ListAuditLogFiles",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ListAuditLogFilesResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "Required. The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "Required. The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "Required. The ID of the cluster.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "date",
            "description": "Optional. The UTC date of the audit logs in the format of `YYYY-MM-DD` (e.g. 2025-01-01).",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "page_size",
            "description": "Optional. The maximum number to return, default is 100, and the maximum is 1000.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "page_token",
            "description": "Optional. The page token from the previous response for pagination.",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": ["DatabaseAuditLogService"]
      }
    },
    "/api/v1/serverless/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/auditLog/files:download": {
      "post": {
        "summary": "Generate audit log files download url, only available when audit logs are stored in TiDB Cloud.",
        "operationId": "DatabaseAuditLogService_DownloadAuditLogFiles",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/DownloadAuditLogFilesResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "Required. The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "Required. The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "Required. The ID of the cluster.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/DatabaseAuditLogService.DownloadAuditLogFilesBody"
            }
          }
        ],
        "tags": ["DatabaseAuditLogService"]
      }
    },
    "/api/v1/serverless/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/auditLog/filterRules": {
      "get": {
        "summary": "List audit log filter rules.",
        "operationId": "DatabaseAuditLogService_ListAuditLogFilterRules",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ListAuditLogFilterRulesResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "Required.  The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "Required. The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "Required. The cluster ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "page_size",
            "description": "Optional. The maximum number to return, default is 10, and the maximum is 100.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "page_token",
            "description": "Optional. The page token from the previous response for pagination.",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": ["DatabaseAuditLogService"]
      },
      "post": {
        "summary": "Create audit log filter rule.",
        "operationId": "DatabaseAuditLogService_CreateAuditLogFilterRule",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/AuditLogFilterRule"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "Required. The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "Required. The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "Required. The cluster ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/DatabaseAuditLogService.CreateAuditLogFilterRuleBody"
            }
          }
        ],
        "tags": ["DatabaseAuditLogService"]
      }
    },
    "/api/v1/serverless/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/auditLog/filterRules/{filter_rule_id}": {
      "get": {
        "summary": "Get audit log filter rule.",
        "operationId": "DatabaseAuditLogService_GetAuditLogFilterRule",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/AuditLogFilterRule"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "Required. The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "Required. The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "Required. The cluster ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "filter_rule_id",
            "description": "Required. The id of the filter rule.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": ["DatabaseAuditLogService"]
      },
      "delete": {
        "summary": "Delete audit log filter rule.",
        "operationId": "DatabaseAuditLogService_DeleteAuditLogFilterRule",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/AuditLogFilterRule"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "Required. The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "Required. The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "Required. The cluster ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "filter_rule_id",
            "description": "Required. The id of the filter rule.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": ["DatabaseAuditLogService"]
      },
      "patch": {
        "summary": "Update audit log filter rule.",
        "operationId": "DatabaseAuditLogService_UpdateAuditLogFilterRule",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/AuditLogFilterRule"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "Required. The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "Required. The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "Required. The cluster ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "filter_rule_id",
            "description": "Required. The id of the filter rule.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/DatabaseAuditLogService.UpdateAuditLogFilterRuleBody"
            }
          }
        ],
        "tags": ["DatabaseAuditLogService"]
      }
    }
  },
  "definitions": {
    "Any": {
      "type": "object",
      "properties": {
        "@type": {
          "type": "string"
        }
      },
      "additionalProperties": {}
    },
    "AuditLogConfig": {
      "type": "object",
      "properties": {
        "cluster_id": {
          "type": "string",
          "description": "OUTPUT_ONLY. The ID of the cluster.",
          "readOnly": true
        },
        "enabled": {
          "type": "boolean",
          "description": "Optional. Whether audit log is enabled."
        },
        "unredacted": {
          "type": "boolean",
          "description": "Optional. Whether unredacted the audit log."
        },
        "cloud_storage": {
          "$ref": "#/definitions/CloudStorage",
          "description": "Optional. The cloud storage for audit logs."
        },
        "rotation_interval_minutes": {
          "type": "integer",
          "format": "int32",
          "description": "Optional. The rotation interval in minutes for audit logs. Default to 60 minutes."
        },
        "rotation_size_mib": {
          "type": "integer",
          "format": "int32",
          "description": "Optional. The rotation size in MiB for audit logs. Default to 100 MiB."
        },
        "base_resp": {
          "$ref": "#/definitions/BaseResp"
        }
      }
    },
    "AuditLogFile": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the audit log."
        },
        "size_bytes": {
          "type": "integer",
          "format": "int64",
          "description": "The size in bytes of the audit log."
        },
        "url": {
          "type": "string",
          "description": "download url of the audit log."
        },
        "create_time": {
          "type": "string",
          "format": "date-time",
          "description": "The create time of the audit log."
        }
      }
    },
    "AuditLogFilter": {
      "type": "object",
      "properties": {
        "classes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "OPTIONAL. Classes to include in the filter combined with an OR relationship."
        },
        "tables": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "OPTIONAL. Tables to include in the filter combined with an OR relationship."
        },
        "status_codes": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int32"
          },
          "description": "OPTIONAL. Status codes to include in the filter combined with an OR relationship."
        }
      },
      "description": "Message for filter, only the entry matching all the conditions will be audit logged."
    },
    "AuditLogFilterRule": {
      "type": "object",
      "properties": {
        "filter_rule_id": {
          "type": "string",
          "description": "OUTPUT_ONLY. The audit log filter rule ID.",
          "readOnly": true
        },
        "cluster_id": {
          "type": "string",
          "description": "OUTPUT_ONLY. The cluster ID.",
          "readOnly": true
        },
        "display_name": {
          "type": "string",
          "description": "Required. Unique name of the filter rule within a cluster."
        },
        "users": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "title": "Required. Database users in the format <user>@<host> or <user> (host defaults to %), e.g., %@%, 4C3z3cdMX8iXks5.root"
        },
        "filters": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/AuditLogFilter"
          },
          "description": "Required. List of filters combined with an OR relationship. Set filters to [{}] will filter all logs."
        },
        "disabled": {
          "type": "boolean",
          "description": "OUTPUT_ONLY. Indicates whether the filter rule is disabled.",
          "readOnly": true
        },
        "create_time": {
          "type": "string",
          "format": "date-time",
          "description": "OUTPUT_ONLY. Timestamp when the filter rule was created.",
          "readOnly": true
        },
        "update_time": {
          "type": "string",
          "format": "date-time",
          "description": "OUTPUT_ONLY. Timestamp when the filter rule was updated.",
          "readOnly": true
        },
        "base_resp": {
          "$ref": "#/definitions/BaseResp"
        }
      },
      "required": ["display_name", "users", "filters"]
    },
    "AzureBlobCloudStorage": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "description": "Required. The Azure Blob URI. For example: azure://<account>.blob.core.windows.net/<container>/<path>/ or https://<account>.blob.core.windows.net/<container>/<path>/."
        },
        "auth_type": {
          "$ref": "#/definitions/AzureBlobCloudStorage.AzureBlobAuthType",
          "description": "Required. The auth method of Azure Blob."
        },
        "sas_token": {
          "type": "string",
          "description": "Optional. The sas token."
        }
      },
      "required": ["uri", "auth_type"]
    },
    "AzureBlobCloudStorage.AzureBlobAuthType": {
      "type": "string",
      "enum": ["SAS_TOKEN"],
      "description": " - SAS_TOKEN: The access method is sas token."
    },
    "BaseResp": {
      "type": "object",
      "properties": {
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "title": "such as: request_id, trace_id"
        },
        "err_code": {
          "type": "string",
          "format": "int64"
        },
        "err_msg": {
          "type": "string"
        }
      }
    },
    "CloudStorage": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/definitions/CloudStorageType.Enum",
          "description": "Required. The type of cloud storage."
        },
        "s3": {
          "$ref": "#/definitions/S3CloudStorage"
        },
        "gcs": {
          "$ref": "#/definitions/GCSCloudStorage"
        },
        "azure_blob": {
          "$ref": "#/definitions/AzureBlobCloudStorage"
        },
        "oss": {
          "$ref": "#/definitions/OSSCloudStorage"
        }
      },
      "description": "Message for cloud storage.",
      "required": ["type"]
    },
    "CloudStorageProfile": {
      "type": "object",
      "properties": {
        "cluster_id": {
          "type": "string",
          "description": "OUTPUT_ONLY. The ID of the cluster.",
          "readOnly": true
        },
        "s3_profile": {
          "$ref": "#/definitions/CloudStorageProfile.S3Profile",
          "description": "OUTPUT_ONLY. The s3 profile.",
          "readOnly": true
        }
      }
    },
    "CloudStorageProfile.S3Profile": {
      "type": "object",
      "properties": {
        "aws_account_id": {
          "type": "string",
          "description": "The aws account id."
        },
        "aws_external_id": {
          "type": "string",
          "description": "The aws external id."
        }
      }
    },
    "CloudStorageType.Enum": {
      "type": "string",
      "enum": ["TIDB_CLOUD", "S3", "GCS", "AZURE_BLOB", "OSS"],
      "description": " - TIDB_CLOUD: TiDB Cloud's own cloud storage.\n - S3: Amazon S3 cloud storage.\n - GCS: Google Cloud Storage.\n - AZURE_BLOB: Azure Blob Storage.\n - OSS: Alibaba Cloud OSS."
    },
    "DatabaseAuditLogService.CreateAuditLogFilterRuleBody": {
      "type": "object",
      "properties": {
        "filter_rule": {
          "$ref": "#/definitions/AuditLogFilterRule",
          "title": "Required. The filter rule to create"
        }
      },
      "required": ["filter_rule"]
    },
    "DatabaseAuditLogService.DownloadAuditLogFilesBody": {
      "type": "object",
      "properties": {
        "audit_log_file_names": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Required. The name of the audit log files to download. Up to 100 audit logs can be downloaded at the same time."
        }
      },
      "required": ["audit_log_file_names"]
    },
    "DatabaseAuditLogService.PreCheckAuditLogConfigBody": {
      "type": "object",
      "properties": {
        "cloud_storage": {
          "$ref": "#/definitions/CloudStorage",
          "description": "OPTIONAL. PreCheck the audit log cloud storage configuration."
        }
      }
    },
    "DatabaseAuditLogService.UpdateAuditLogConfigBody": {
      "type": "object",
      "properties": {
        "audit_log_config": {
          "$ref": "#/definitions/AuditLogConfig",
          "description": "Required. The audit log configuration to update."
        }
      },
      "required": ["audit_log_config"]
    },
    "DatabaseAuditLogService.UpdateAuditLogFilterRuleBody": {
      "type": "object",
      "properties": {
        "filters": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/AuditLogFilter"
          },
          "description": "OPTIONAL. List of filters combined with an OR relationship. Set filters to [{}] will filter all logs."
        },
        "users": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "title": "OPTIONAL. Database users in the format <user>@<host> or <user> (host defaults to %), e.g., %@%, 4C3z3cdMX8iXks5.root"
        },
        "disabled": {
          "type": "boolean",
          "description": "OPTIONAL. Indicates whether the filter rule is disabled."
        },
        "display_name": {
          "type": "string",
          "description": "OPTIONAL. Display name of the filter rule."
        }
      }
    },
    "DownloadAuditLogFilesResponse": {
      "type": "object",
      "properties": {
        "audit_log_files": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/AuditLogFile"
          },
          "description": "The audit logs with the download url."
        },
        "base_resp": {
          "$ref": "#/definitions/BaseResp"
        }
      }
    },
    "GCSCloudStorage": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "description": "Required. The GCS URI. For example: gs://<bucket>/<path>/."
        },
        "auth_type": {
          "$ref": "#/definitions/GCSCloudStorage.GCSAuthType",
          "description": "Required. The auth method of GCS."
        },
        "service_account_key": {
          "type": "string",
          "description": "Required. The service account key."
        }
      },
      "required": ["uri", "auth_type"]
    },
    "GCSCloudStorage.GCSAuthType": {
      "type": "string",
      "enum": ["SERVICE_ACCOUNT_KEY"],
      "description": " - SERVICE_ACCOUNT_KEY: The access method is service account key."
    },
    "ListAuditLogFilesResponse": {
      "type": "object",
      "properties": {
        "audit_log_files": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/AuditLogFile"
          },
          "description": "The audit log files without the download url."
        },
        "next_page_token": {
          "type": "string",
          "description": "Token provided to retrieve the next page of results."
        },
        "base_resp": {
          "$ref": "#/definitions/BaseResp"
        }
      }
    },
    "ListAuditLogFilterRulesResponse": {
      "type": "object",
      "properties": {
        "filter_rules": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/AuditLogFilterRule"
          }
        },
        "next_page_token": {
          "type": "string"
        },
        "total_size": {
          "type": "integer",
          "format": "int64"
        },
        "base_resp": {
          "$ref": "#/definitions/BaseResp"
        }
      }
    },
    "OSSCloudStorage": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "description": "Required. The OSS URI. For example: oss://<bucket>/<path>/."
        },
        "auth_type": {
          "$ref": "#/definitions/OSSCloudStorage.OSSAuthType",
          "description": "Required. The auth method of OSS."
        },
        "access_key": {
          "$ref": "#/definitions/OSSCloudStorage.AccessKey",
          "description": "Optional. The access key."
        },
        "role_arn": {
          "type": "string",
          "description": "Optional. The role arn."
        }
      },
      "required": ["uri", "auth_type"]
    },
    "OSSCloudStorage.AccessKey": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Required. The access key id."
        },
        "secret": {
          "type": "string",
          "description": "Required. The access key secret. This field is input-only."
        }
      },
      "required": ["id", "secret"]
    },
    "OSSCloudStorage.OSSAuthType": {
      "type": "string",
      "enum": ["ACCESS_KEY", "ROLE_ARN"],
      "description": " - ACCESS_KEY: The access method is access key.\n - ROLE_ARN: The access method is role arn."
    },
    "PreCheckAuditLogConfigResponse": {
      "type": "object",
      "properties": {
        "base_resp": {
          "$ref": "#/definitions/BaseResp"
        }
      }
    },
    "S3CloudStorage": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "description": "Required. The URI of the S3 folder. For example: s3://<bucket>/<path>/."
        },
        "auth_type": {
          "$ref": "#/definitions/S3CloudStorage.S3AuthType",
          "description": "Required. The auth method of S3."
        },
        "access_key": {
          "$ref": "#/definitions/S3CloudStorage.AccessKey",
          "description": "Optional. The access key of the S3."
        },
        "role_arn": {
          "type": "string",
          "description": "Optional. The role arn of the S3."
        }
      },
      "required": ["uri", "auth_type"]
    },
    "S3CloudStorage.AccessKey": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Required. The access key id of the S3."
        },
        "secret": {
          "type": "string",
          "description": "Required. The secret access key of the S3."
        }
      },
      "required": ["id", "secret"]
    },
    "S3CloudStorage.S3AuthType": {
      "type": "string",
      "enum": ["ROLE_ARN", "ACCESS_KEY"],
      "description": " - ROLE_ARN: The access method is role arn.\n - ACCESS_KEY: The access method is access key."
    },
    "Status": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/Any"
          }
        }
      }
    }
  },
  "securityDefinitions": {
    "bearer": {
      "type": "apiKey",
      "description": "Authentication token, prefixed by Bearer: 'Bearer token'",
      "name": "Authorization",
      "in": "header"
    }
  }
}
