{
  "swagger": "2.0",
  "info": {
    "title": "TiDB Cloud Starter and Essential API",
    "description": "TiDB Cloud Starter and Essential API",
    "version": "v1beta1"
  },
  "tags": [
    {
      "name": "ExportService"
    }
  ],
  "host": "serverless.tidbapi.com",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/v1beta1/clusters/{clusterId}/exports": {
      "get": {
        "summary": "List export tasks on a cluster",
        "operationId": "ExportService_ListExports",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ListExportsResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "clusterId",
            "description": "The ID of the cluster to list export tasks for.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "pageSize",
            "description": "The maximum number of exports to return. If not specified, at most 10 exports will be returned. The maximum value is `100`. Values greater than `100` are set to `100`.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32",
            "default": 10
          },
          {
            "name": "pageToken",
            "description": "The pagination token received from a previous [List export tasks](#tag/Export/operation/ExportService_ListExports) request. Use this token to retrieve the next page of results.\n\n**Note**: When paginating, all other parameters must match the original request.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "orderBy",
            "description": "Specifies the sorting order of results. Use a comma-separated list of field names, optionally appending `desc` for descending order. For example, `createTime desc`. By default, fields are sorted in ascending order.\n\nSupported field: `createTime`.",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "Export"
        ],
        "x-codeSamples": [
          {
            "label": "curl",
            "lang": "cURL",
            "source": "curl --location 'https://serverless.tidbapi.com/v1beta1/clusters/{cluster_id}/exports' \\\n--digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n--header 'Content-Type: application/json' \\\n--header 'Accept: application/json' \\\n--data '{\n  \"exportOptions\": {\n    \"fileType\": \"PARQUET\",\n    \"filter\": {\n      \"table\": {\n        \"patterns\": [\n            \"test.*\"\n        ]\n      }\n    },\n    \"parquetFormat\": {\n      \"compression\": \"GZIP\"\n    }\n  },\n  \"target\": {\n    \"type\": \"LOCAL\"\n  }\n}'"
          }
        ]
      },
      "post": {
        "summary": "Create an export task",
        "operationId": "ExportService_CreateExport",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Export"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "clusterId",
            "description": "The ID of the cluster.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ExportService.CreateExportBody"
            }
          }
        ],
        "tags": [
          "Export"
        ],
        "x-codeSamples": [
          {
            "label": "curl",
            "lang": "cURL",
            "source": "curl --location 'https://serverless.tidbapi.com/v1beta1/clusters/{cluster_id}/exports' \\\n--digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n--header 'Content-Type: application/json' \\\n--header 'Accept: application/json' \\\n--data '{\n  \"exportOptions\": {\n    \"fileType\": \"PARQUET\",\n    \"filter\": {\n      \"table\": {\n        \"patterns\": [\n            \"test.*\"\n        ]\n      }\n    },\n    \"parquetFormat\": {\n      \"compression\": \"GZIP\"\n    }\n  },\n  \"target\": {\n    \"type\": \"LOCAL\"\n  }\n}'"
          }
        ]
      }
    },
    "/v1beta1/clusters/{clusterId}/exports/{exportId}": {
      "get": {
        "summary": "Get details of an export task",
        "operationId": "ExportService_GetExport",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Export"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "clusterId",
            "description": "The ID of the cluster.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "exportId",
            "description": "The ID of the export task to retrieve.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Export"
        ],
        "x-codeSamples": [
          {
            "label": "curl",
            "lang": "cURL",
            "source": "curl --location 'https://serverless.tidbapi.com/v1beta1/clusters/{cluster_id}/exports/{export_id}' \\\n--digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n--header 'Accept: application/json'"
          }
        ]
      },
      "delete": {
        "summary": "Delete an export task",
        "operationId": "ExportService_DeleteExport",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Export"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "clusterId",
            "description": "The ID of the cluster.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "exportId",
            "description": "The ID of the export task to delete.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Export"
        ],
        "x-codeSamples": [
          {
            "label": "curl",
            "lang": "cURL",
            "source": "curl --location --request DELETE 'https://serverless.tidbapi.com/v1beta1/clusters/{cluster_id}/exports/{export_id}' \\\n--digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n--header 'Accept: application/json'"
          }
        ]
      }
    },
    "/v1beta1/clusters/{clusterId}/exports/{exportId}:cancel": {
      "post": {
        "summary": "Cancel an export task",
        "operationId": "ExportService_CancelExport",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Export"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "clusterId",
            "description": "The ID of the cluster.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "exportId",
            "description": "The ID of the export task to cancel.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Export"
        ],
        "x-codeSamples": [
          {
            "label": "curl",
            "lang": "cURL",
            "source": "curl --location --request POST 'https://serverless.tidbapi.com/v1beta1/clusters/{cluster_id}/exports/{export_id}:cancel' \\\n--digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n--header 'Accept: application/json'"
          }
        ]
      }
    },
    "/v1beta1/clusters/{clusterId}/exports/{exportId}:download": {
      "post": {
        "summary": "Generate download url",
        "operationId": "ExportService_DownloadExport",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/DownloadExportsResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "clusterId",
            "description": "The ID of the cluster.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "exportId",
            "description": "The ID of the export task to download.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ExportService.DownloadExportBody"
            }
          }
        ],
        "tags": [
          "ExportService"
        ],
        "deprecated": true
      }
    },
    "/v1beta1/clusters/{clusterId}/exports/{exportId}/files": {
      "get": {
        "summary": "List export files",
        "operationId": "ExportService_ListExportFiles",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ListExportFilesResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "clusterId",
            "description": "The ID of the cluster.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "exportId",
            "description": "The ID of the export task.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "pageSize",
            "description": "The maximum number of files to return. If not specified, at most 10 files will be returned. The maximum value is `100`. Values greater than `100` are set to `100`.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "pageToken",
            "description": "The pagination token received from a previous [List export files](#tag/Export/operation/ExportService_ListExportFiles) request. Use this token to retrieve the next page of results.\n\n**Note**: When paginating, all other parameters must match the original request.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "generateUrl",
            "description": "Whether to generate download URLs for the files. Default value is `false`.",
            "in": "query",
            "required": false,
            "type": "boolean"
          }
        ],
        "tags": [
          "ExportService"
        ]
      }
    },
    "/v1beta1/clusters/{clusterId}/exports/{exportId}/files:download": {
      "post": {
        "summary": "Generate export files download url",
        "operationId": "ExportService_DownloadExportFiles",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/DownloadExportFilesResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "clusterId",
            "description": "The ID of the cluster.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "exportId",
            "description": "The ID of the export task.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ExportService.DownloadExportFilesBody"
            }
          }
        ],
        "tags": [
          "ExportService"
        ]
      }
    }
  },
  "definitions": {
    "Any": {
      "type": "object",
      "properties": {
        "@type": {
          "type": "string"
        }
      },
      "additionalProperties": {}
    },
    "AzureBlobTarget": {
      "type": "object",
      "properties": {
        "authType": {
          "description": "The authentication method for accessing Azure Blob Storage.",
          "allOf": [
            {
              "$ref": "#/definitions/ExportAzureBlobAuthType.Enum"
            }
          ]
        },
        "sasToken": {
          "type": "string",
          "description": "The Shared Access Signature (SAS) token for accessing Azure Blob Storage."
        },
        "uri": {
          "type": "string",
          "description": "The Azure Blob URI of the export target, in the format of `azure://<account>.blob.core.windows.net/<container>/<path>` or `https://<account>.blob.core.windows.net/<container>/<path>`."
        }
      },
      "required": [
        "authType",
        "uri"
      ]
    },
    "DownloadExportFilesResponse": {
      "type": "object",
      "properties": {
        "files": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/ExportFile"
          },
          "description": "The files with download url of the export."
        }
      }
    },
    "DownloadExportsResponse": {
      "type": "object",
      "properties": {
        "downloads": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/DownloadUrl"
          },
          "description": "The download urls of the export."
        }
      }
    },
    "DownloadUrl": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the download file."
        },
        "url": {
          "type": "string",
          "description": "The download url."
        },
        "size": {
          "type": "integer",
          "format": "int64",
          "description": "The size in bytes of the download file."
        }
      }
    },
    "Export": {
      "type": "object",
      "properties": {
        "exportId": {
          "type": "string",
          "description": "The unique ID of the export task.",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "The unique identifier for the export task.",
          "readOnly": true
        },
        "clusterId": {
          "type": "string",
          "description": "The ID of the cluster to which the export task belongs."
        },
        "createdBy": {
          "type": "string",
          "description": "The email address of the user who create the export task.",
          "readOnly": true
        },
        "state": {
          "description": "The state of the export task.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/ExportState.Enum"
            }
          ]
        },
        "exportOptions": {
          "description": "The configuration options for the export task.",
          "allOf": [
            {
              "$ref": "#/definitions/ExportOptions"
            }
          ]
        },
        "target": {
          "description": "The destination configuration for where the exported data is stored.",
          "allOf": [
            {
              "$ref": "#/definitions/ExportTarget"
            }
          ]
        },
        "reason": {
          "type": "string",
          "x-nullable": true,
          "description": "An error message if the export task failed. Otherwise, empty.",
          "readOnly": true
        },
        "displayName": {
          "type": "string",
          "description": "The display name of the export task. Default value is `SNAPSHOT_{snapshot_time}`."
        },
        "createTime": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the export task was created, in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
          "readOnly": true
        },
        "updateTime": {
          "type": "string",
          "format": "date-time",
          "x-nullable": true,
          "description": "The timestamp when the export task was last updated, in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
          "readOnly": true
        },
        "completeTime": {
          "type": "string",
          "format": "date-time",
          "x-nullable": true,
          "description": "The timestamp when the export task was completed, in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
          "readOnly": true
        },
        "snapshotTime": {
          "type": "string",
          "format": "date-time",
          "x-nullable": true,
          "description": "The timestamp when the data snapshot was captured for this export.",
          "readOnly": true
        },
        "expireTime": {
          "type": "string",
          "format": "date-time",
          "x-nullable": true,
          "description": "The timestamp when the export will expire and become unavailable.",
          "readOnly": true
        },
        "snapshotTso": {
          "type": "string",
          "x-nullable": true,
          "description": "The TiDB TSO (timestamp oracle) of the data snapshot captured for this\nexport, encoded as a string-formatted uint64. Use this exact value as the\nstart position of a changefeed to get a consistent snapshot and incremental\nhandoff with no gap or overlap.",
          "readOnly": true
        }
      },
      "description": "Message for export task.",
      "required": [
        "clusterId"
      ]
    },
    "ExportAzureBlobAuthType.Enum": {
      "type": "string",
      "enum": [
        "SAS_TOKEN"
      ],
      "description": " - SAS_TOKEN: The access method is sas token."
    },
    "ExportCSVDialect.Enum": {
      "type": "string",
      "enum": [
        "DEFAULT",
        "SNOWFLAKE",
        "BIGQUERY",
        "REDSHIFT"
      ],
      "description": " - DEFAULT: The standard CSV dialect.\n - SNOWFLAKE: The Snowflake CSV dialect.\n - BIGQUERY: The BigQuery CSV dialect.\n - REDSHIFT: The Redshift CSV dialect."
    },
    "ExportCompressionType.Enum": {
      "type": "string",
      "enum": [
        "GZIP",
        "SNAPPY",
        "ZSTD",
        "NONE"
      ],
      "description": " - GZIP: Gzip compression.\n - SNAPPY: Snappy compression.\n - ZSTD: Zstd compression.\n - NONE: No compression."
    },
    "ExportFile": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the file."
        },
        "size": {
          "type": "integer",
          "format": "int64",
          "description": "The size in bytes of the file."
        },
        "url": {
          "type": "string",
          "description": "download url of the file."
        }
      }
    },
    "ExportFileType.Enum": {
      "type": "string",
      "enum": [
        "SQL",
        "CSV",
        "PARQUET"
      ],
      "description": " - SQL: SQL type.\n - CSV: CSV type.\n - PARQUET: PARQUET type."
    },
    "ExportGcsAuthType.Enum": {
      "type": "string",
      "enum": [
        "SERVICE_ACCOUNT_KEY"
      ],
      "description": " - SERVICE_ACCOUNT_KEY: The access method is service account key."
    },
    "ExportOSSAuthType.Enum": {
      "type": "string",
      "enum": [
        "ACCESS_KEY"
      ],
      "description": " - ACCESS_KEY: The access method is access key."
    },
    "ExportOptions": {
      "type": "object",
      "properties": {
        "fileType": {
          "description": "The export file type. Default value is `CSV`.",
          "allOf": [
            {
              "$ref": "#/definitions/ExportFileType.Enum"
            }
          ]
        },
        "database": {
          "type": "string",
          "description": "The database to export. DEPRECATED, use filter instead."
        },
        "table": {
          "type": "string",
          "description": "The table to export. DEPRECATED, use filter instead."
        },
        "compression": {
          "description": "The compression algorithm of the export file. Default value is `GZIP`.",
          "allOf": [
            {
              "$ref": "#/definitions/ExportCompressionType.Enum"
            }
          ]
        },
        "filter": {
          "description": "Defines which tables to include in the export. If not specified, all tables in the cluster are exported.",
          "allOf": [
            {
              "$ref": "#/definitions/ExportOptions.Filter"
            }
          ]
        },
        "csvFormat": {
          "description": "The format specification for the CSV file.",
          "allOf": [
            {
              "$ref": "#/definitions/ExportOptions.CSVFormat"
            }
          ]
        },
        "parquetFormat": {
          "description": "The format specification for the Parquet file.",
          "allOf": [
            {
              "$ref": "#/definitions/ExportOptions.ParquetFormat"
            }
          ]
        },
        "snapshotTso": {
          "type": "string",
          "x-nullable": true,
          "description": "The TiDB TSO (timestamp oracle) at which to take the snapshot, encoded as a\nstring-formatted uint64. When set, the export reads data as of this exact\nTSO. This lets you pin a downstream changefeed to the same point so that the\nsnapshot and the incremental stream hand off consistently with no gap or\noverlap. When not set, the snapshot is taken at the time the export is created.\nThe effective TSO is returned as `snapshot_tso` in the export resource."
        },
        "escapeBackslash": {
          "type": "boolean",
          "x-nullable": true,
          "description": "Controls whether special characters are escaped with a backslash (\\) in the\nexport file. When not set, the server default is used (escaping enabled)."
        }
      }
    },
    "ExportOptions.CSVFormat": {
      "type": "object",
      "properties": {
        "separator": {
          "type": "string",
          "description": "The character used to separate values in the CSV file. Default value is `,`.\nIt is recommended to use uncommon separators like `|+|` to avoid conflicts."
        },
        "delimiter": {
          "type": "string",
          "x-nullable": true,
          "description": "The character used to enclose string values in the CSV file. Default value is `\"`."
        },
        "nullValue": {
          "type": "string",
          "x-nullable": true,
          "description": "The string representation of NULL values in the CSV file. Default is `\\N`."
        },
        "skipHeader": {
          "type": "boolean",
          "description": "Indicates whether to omit the header row in exported CSV files. Default value is `false`."
        },
        "dialect": {
          "description": "The CSV output dialect of the export. Default value is `DEFAULT`, which\nuses the standard CSV format. Set a warehouse-specific dialect (for\nexample `SNOWFLAKE`) so the exported CSV can be loaded losslessly.",
          "allOf": [
            {
              "$ref": "#/definitions/ExportCSVDialect.Enum"
            }
          ]
        }
      }
    },
    "ExportOptions.Filter": {
      "type": "object",
      "properties": {
        "sql": {
          "type": "string",
          "description": "Filters the exported data with the SQL statement."
        },
        "table": {
          "description": "Filters the exported data with table filter patterns.",
          "allOf": [
            {
              "$ref": "#/definitions/ExportOptions.Filter.Table"
            }
          ]
        }
      }
    },
    "ExportOptions.Filter.Table": {
      "type": "object",
      "properties": {
        "patterns": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of [table-filter](https://docs.pingcap.com/tidb/stable/table-filter/#syntax) patterns."
        },
        "where": {
          "type": "string",
          "description": "Filters the exported tables with the `WHERE` condition."
        },
        "partitions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Export only selected partitions."
        }
      }
    },
    "ExportOptions.ParquetFormat": {
      "type": "object",
      "properties": {
        "compression": {
          "description": "The Parquet compression algorithm. Default value is `ZSTD`.",
          "allOf": [
            {
              "$ref": "#/definitions/ExportParquetCompressionType.Enum"
            }
          ]
        }
      }
    },
    "ExportParquetCompressionType.Enum": {
      "type": "string",
      "enum": [
        "GZIP",
        "SNAPPY",
        "ZSTD",
        "NONE"
      ],
      "description": " - GZIP: The parquet compression type is GZIP.\n - SNAPPY: The parquet compression type is SNAPPY.\n - ZSTD: The parquet compression type is ZSTD.\n - NONE: No compression."
    },
    "ExportS3AuthType.Enum": {
      "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."
    },
    "ExportService.CreateExportBody": {
      "type": "object",
      "properties": {
        "exportOptions": {
          "description": "The configuration options for the export task.",
          "allOf": [
            {
              "$ref": "#/definitions/ExportOptions"
            }
          ]
        },
        "target": {
          "description": "The destination configuration for where the exported data is stored.",
          "allOf": [
            {
              "$ref": "#/definitions/ExportTarget"
            }
          ]
        },
        "displayName": {
          "type": "string",
          "description": "The display name of the export task. Default value is `SNAPSHOT_{snapshot_time}`."
        }
      }
    },
    "ExportService.DownloadExportBody": {
      "type": "object"
    },
    "ExportService.DownloadExportFilesBody": {
      "type": "object",
      "properties": {
        "fileNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The names of the files to download."
        }
      },
      "required": [
        "fileNames"
      ]
    },
    "ExportState.Enum": {
      "type": "string",
      "enum": [
        "RUNNING",
        "SUCCEEDED",
        "FAILED",
        "CANCELED",
        "DELETED",
        "EXPIRED"
      ],
      "description": "Export State.\n\n - RUNNING: The export job is being created.\n - SUCCEEDED: The export job is success.\n - FAILED: The export job is failed.\n - CANCELED: The export job is canceled.\n - DELETED: The export job is deleted.\n - EXPIRED: The export is expired, only local export will be expired."
    },
    "ExportTarget": {
      "type": "object",
      "properties": {
        "type": {
          "description": "The export target. Default value is `LOCAL`.",
          "allOf": [
            {
              "$ref": "#/definitions/ExportTargetType.Enum"
            }
          ]
        },
        "s3": {
          "description": "The configuration details for exporting data to Amazon S3. This is required when `type` is `S3`.",
          "allOf": [
            {
              "$ref": "#/definitions/S3Target"
            }
          ]
        },
        "gcs": {
          "description": "The configuration details for exporting data to Google Cloud Storage. This is required when `type` is `GCS`.",
          "allOf": [
            {
              "$ref": "#/definitions/GCSTarget"
            }
          ]
        },
        "azureBlob": {
          "description": "The configuration details for exporting data to Azure Blob Storage. This is required when `type` is `AZURE_BLOB`.",
          "allOf": [
            {
              "$ref": "#/definitions/AzureBlobTarget"
            }
          ]
        },
        "oss": {
          "description": "The configuration details for exporting data to Alibaba Cloud Object Storage Service (OSS). This is required when `type` is `OSS`.",
          "allOf": [
            {
              "$ref": "#/definitions/OSSTarget"
            }
          ]
        }
      }
    },
    "ExportTargetType.Enum": {
      "type": "string",
      "enum": [
        "LOCAL",
        "S3",
        "GCS",
        "AZURE_BLOB",
        "OSS"
      ],
      "title": "- LOCAL: Local target.\n - S3: S3 target.\n - GCS: gcs target\n - AZURE_BLOB: azure blob target\n - OSS: OSS target"
    },
    "GCSTarget": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "description": "The Google Cloud Storage URI of the export target."
        },
        "authType": {
          "description": "The authentication method for accessing Google Cloud Storage.",
          "allOf": [
            {
              "$ref": "#/definitions/ExportGcsAuthType.Enum"
            }
          ]
        },
        "serviceAccountKey": {
          "type": "string",
          "description": "The service account key for accessing Google Cloud Storage."
        }
      },
      "required": [
        "uri",
        "authType"
      ]
    },
    "ListExportFilesResponse": {
      "type": "object",
      "properties": {
        "files": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/ExportFile"
          },
          "description": "The files of the export."
        },
        "nextPageToken": {
          "type": "string",
          "description": "Token provided to retrieve the next page of results."
        }
      }
    },
    "ListExportsResponse": {
      "type": "object",
      "properties": {
        "exports": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/Export"
          },
          "description": "A list of export tasks that match the query."
        },
        "nextPageToken": {
          "type": "string",
          "description": "The token to retrieve the next page of results. Use this value as the `pageToken` parameter in the next request. This field is empty when there are no more pages."
        },
        "totalSize": {
          "type": "integer",
          "format": "int64",
          "description": "The total number of exports that match the query."
        }
      }
    },
    "OSSTarget": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "description": "The Alibaba Cloud OSS URI of the export target."
        },
        "authType": {
          "description": "The authentication method for accessing Alibaba Cloud OSS.",
          "allOf": [
            {
              "$ref": "#/definitions/ExportOSSAuthType.Enum"
            }
          ]
        },
        "accessKey": {
          "description": "The Alibaba Cloud OSS access key credentials used for access.",
          "allOf": [
            {
              "$ref": "#/definitions/OSSTarget.AccessKey"
            }
          ]
        }
      },
      "required": [
        "uri",
        "authType"
      ]
    },
    "OSSTarget.AccessKey": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The AccessKey ID for accessing Alibaba Cloud OSS."
        },
        "secret": {
          "type": "string",
          "description": "The AccessKey secret for accessing Alibaba Cloud OSS."
        }
      },
      "required": [
        "id",
        "secret"
      ]
    },
    "S3Target": {
      "type": "object",
      "properties": {
        "bucketUri": {
          "type": "string",
          "description": "The bucket URI of the s3. DEPRECATED, use uri instead."
        },
        "uri": {
          "type": "string",
          "description": "The S3 URI of the export target."
        },
        "authType": {
          "description": "The authentication method for accessing the S3 bucket.",
          "allOf": [
            {
              "$ref": "#/definitions/ExportS3AuthType.Enum"
            }
          ]
        },
        "accessKey": {
          "description": "The AWS access key credentials used for access.",
          "allOf": [
            {
              "$ref": "#/definitions/S3Target.AccessKey"
            }
          ]
        },
        "roleArn": {
          "type": "string",
          "description": "The AWS IAM role ARN used for access."
        }
      },
      "required": [
        "authType"
      ]
    },
    "S3Target.AccessKey": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The access key ID for accessing the S3 bucket."
        },
        "secret": {
          "type": "string",
          "description": "The secret access key for accessing the S3 bucket."
        }
      },
      "required": [
        "id",
        "secret"
      ]
    },
    "Status": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/Any"
          }
        }
      }
    }
  }
}
