{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-clean-rooms/json-schema/amazon-clean-rooms-start-protected-job-input-schema.json",
  "title": "StartProtectedJobInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-clean-rooms-protectedjobs-api-openapi.yml#/components/schemas/StartProtectedJobInput",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "PYSPARK"
      ],
      "description": "The type of protected job to start."
    },
    "membershipIdentifier": {
      "type": "string",
      "description": "A unique identifier for the membership to run this job against. Currently accepts a membership ID."
    },
    "jobParameters": {
      "$ref": "#/$defs/ProtectedJobParameters"
    },
    "resultConfiguration": {
      "$ref": "#/$defs/ProtectedJobResultConfigurationInput"
    },
    "computeConfiguration": {
      "$ref": "#/$defs/ProtectedJobComputeConfiguration"
    },
    "jobComputePayerAccountId": {
      "type": "string",
      "description": "The account ID of the member that pays for the job compute costs."
    }
  },
  "required": [
    "type",
    "membershipIdentifier",
    "jobParameters"
  ],
  "$defs": {
    "ProtectedJobComputeConfiguration": {
      "type": "object",
      "properties": {
        "worker": {
          "$ref": "#/$defs/ProtectedJobWorkerComputeConfiguration"
        }
      },
      "description": "Exactly one member is set."
    },
    "ProtectedJobMemberOutputConfigurationInput": {
      "type": "object",
      "properties": {
        "accountId": {
          "type": "string",
          "description": "The account ID."
        }
      },
      "required": [
        "accountId"
      ]
    },
    "ProtectedJobOutputConfigurationInput": {
      "type": "object",
      "properties": {
        "member": {
          "$ref": "#/$defs/ProtectedJobMemberOutputConfigurationInput"
        }
      },
      "description": "Exactly one member is set."
    },
    "ProtectedJobParameters": {
      "type": "object",
      "properties": {
        "analysisTemplateArn": {
          "type": "string",
          "description": "The ARN of the analysis template."
        },
        "parameters": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Runtime configuration values passed to the PySpark analysis script. Parameter names and types must match those defined in the analysis template."
        }
      },
      "required": [
        "analysisTemplateArn"
      ]
    },
    "ProtectedJobResultConfigurationInput": {
      "type": "object",
      "properties": {
        "outputConfiguration": {
          "$ref": "#/$defs/ProtectedJobOutputConfigurationInput"
        }
      },
      "required": [
        "outputConfiguration"
      ]
    },
    "ProtectedJobWorkerComputeConfiguration": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "CR.1X",
            "CR.4X"
          ],
          "description": "The worker compute configuration type."
        },
        "number": {
          "type": "integer",
          "description": "The number of workers for a PySpark job."
        },
        "properties": {
          "$ref": "#/$defs/WorkerComputeConfigurationProperties"
        }
      },
      "required": [
        "type",
        "number"
      ]
    },
    "WorkerComputeConfigurationProperties": {
      "type": "object",
      "properties": {
        "spark": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The Spark configuration properties for SQL and PySpark workloads. This map contains key-value pairs that configure Apache Spark settings to optimize performance for your data processing jobs. You can specify up to 50 Spark properties, with each key being 1-200 characters and each value being 0-500 characters. These properties allow you to adjust compute capacity for large datasets and complex workloads."
        }
      },
      "description": "Exactly one member is set."
    }
  }
}