{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-sql/json-schema/google-cloud-sql-workload-captures-start-request-schema.json",
  "title": "WorkloadCapturesStartRequest",
  "description": "Request to start recording traffic from the primary instance (captured workload).",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-sql-workload-captures-api-openapi.yml#/components/schemas/WorkloadCapturesStartRequest",
  "type": "object",
  "properties": {
    "startWorkloadCaptureContext": {
      "$ref": "#/$defs/StartWorkloadCaptureContext",
      "description": "Optional. Contains details about the start workload capture operation."
    }
  },
  "$defs": {
    "StartWorkloadCaptureContext": {
      "description": "The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.",
      "properties": {
        "enableLiveReplay": {
          "description": "Optional. If true, the captured workload is simultaneously executed on a separate, ephemeral Cloud SQL instance. This \"live replay\" instance is automatically provisioned and is cloned from the source instance. If false (the default), the workload is only stored and no live replay occurs. It can be replayed later using a separate `StartWorkloadReplayRequest`. Note: The workload capture runs continuously until an explicit `StopWorkloadCaptureRequest` is issued.",
          "type": "boolean"
        },
        "replayInstance": {
          "type": "string",
          "description": "Optional. Required if `enable_live_replay` is true. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less."
        }
      },
      "type": "object"
    }
  }
}