{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle/json-schema/oracle-create-run-details-schema.json",
  "title": "CreateRunDetails",
  "description": "The create run details. The following properties are optional and override the default values\nset in the associated application:\n  - applicationId\n  - archiveUri\n  - arguments\n  - configuration\n  - definedTags\n  - displayName\n  - driverShape\n  - execute\n  - executorShape\n  - freeformTags\n  - logsBucketUri\n  - metastoreId\n  - numExecutors\n  - parameters\n  - sparkVersion\n  - warehouseBucketUri\nIt is expected that either the applicationId or the execute parameter is specified; but not both.\nIf both or none are set, a Bad Request (HTTP 400) status will be sent as the response.\nIf an appicationId is not specified, then a value for the execute parameter is expected.\nUsing data parsed from the value, a new application will be created and assicated with the new run.\nSee information on the execute parameter for details on the format of this parameter.\n\nThe optional parameter spark version can only be specified when using the execute parameter.  If it\nis not specified when using the execute parameter, the latest version will be used as default.\nIf the execute parameter is not used, the spark version will be taken from the associated application.\n\nIf displayName is not specified, it will be derived from the displayName of associated application or\nset by API using fileUri's application file name.\nOnce a run is created, its properties (except for definedTags and freeformTags) cannot be changed.\nIf the parent application's properties (including definedTags and freeformTags) are updated,\nthe corresponding properties of the run will not update.\n",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-dataflow-api-openapi.yml#/components/schemas/CreateRunDetails",
  "properties": {
    "applicationId": {
      "description": "The OCID of the associated application. If this value is set, then no value for the execute parameter is required. If this value is not set, then a value for the execute parameter is required, and a new application is created and associated with the new run.\n",
      "type": "string"
    },
    "archiveUri": {
      "description": "A comma separated list of one or more archive files as Oracle Cloud Infrastructure URIs. For example, ``oci://path/to/a.zip,oci://path/to/b.zip``. An Oracle Cloud Infrastructure URI of an archive.zip file containing custom dependencies that may be used to support the execution of a Python, Java, or Scala application.\nSee https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/hdfsconnector.htm#uriformat.\n",
      "format": "uri",
      "pattern": "^((?:oci):\\/\\/([^:\\/]+)@([^:\\/]+))(,(?:oci):\\/\\/([^:\\/]+)@([^:\\/]+))*",
      "type": "string"
    },
    "arguments": {
      "description": "The arguments passed to the running application as command line arguments.  An argument is\neither a plain text or a placeholder. Placeholders are replaced using values from the parameters\nmap.  Each placeholder specified must be represented in the parameters map else the request\n(POST or PUT) will fail with a HTTP 400 status code.  Placeholders are specified as\n`${name}`, where `name` is the name of the parameter.\nExample:  `[ \"--input\", \"${input_file}\", \"--name\", \"John Doe\" ]`\nIf \"input_file\" has a value of \"mydata.xml\", then the value above will be translated to\n`--input mydata.xml --name \"John Doe\"`\n",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "compartmentId": {
      "description": "The OCID of a compartment.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "configuration": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "The Spark configuration passed to the running process.\nSee https://spark.apache.org/docs/latest/configuration.html#available-properties.\nExample: { \"spark.app.name\" : \"My App Name\", \"spark.shuffle.io.maxRetries\" : \"4\" }\nNote: Not all Spark properties are permitted to be set.  Attempting to set a property that is\nnot allowed to be overwritten will cause a 400 status to be returned.\n",
      "type": "object"
    },
    "definedTags": {
      "additionalProperties": {
        "additionalProperties": {
          "description": "The value of the tag. Only the String type is supported.\n",
          "type": "object"
        },
        "description": "Key-value pair representing a defined tag key and value, scoped to a namespace.\nExample: `{\"CostCenter\": \"42\"}`\n",
        "type": "object"
      },
      "description": "Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).\nExample: `{\"Operations\": {\"CostCenter\": \"42\"}}`\n",
      "type": "object"
    },
    "displayName": {
      "description": "A user-friendly name that does not have to be unique. Avoid entering confidential information. If this value is not specified, it will be derived from the associated application's displayName or set by API using fileUri's application file name.\n",
      "type": "string"
    },
    "driverShape": {
      "description": "The VM shape for the driver. Sets the driver cores and memory.\n",
      "type": "string"
    },
    "driverShapeConfig": {
      "$ref": "#/$defs/ShapeConfig"
    },
    "execute": {
      "description": "The input used for spark-submit command. For more details see https://spark.apache.org/docs/latest/submitting-applications.html#launching-applications-with-spark-submit.\nSupported options include ``--class``, ``--file``, ``--jars``, ``--conf``, ``--py-files``, and main application file with arguments.\nExample: ``--jars oci://path/to/a.jar,oci://path/to/b.jar --files oci://path/to/a.json,oci://path/to/b.csv --py-files oci://path/to/a.py,oci://path/to/b.py --conf spark.sql.crossJoin.enabled=true --class org.apache.spark.examples.SparkPi oci://path/to/main.jar 10``\nNote: If execute is specified together with applicationId, className, configuration, fileUri, language, arguments, parameters during application create/update, or run create/submit,\nData Flow service will use derived information from execute input only.\n",
      "maxLength": 4000,
      "minLength": 1,
      "type": "string"
    },
    "executorShape": {
      "description": "The VM shape for the executors. Sets the executor cores and memory.\n",
      "type": "string"
    },
    "executorShapeConfig": {
      "$ref": "#/$defs/ShapeConfig"
    },
    "freeformTags": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.\nFor more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).\nExample: `{\"Department\": \"Finance\"}`\n",
      "type": "object"
    },
    "idleTimeoutInMinutes": {
      "default": 2880,
      "description": "The timeout value in minutes used to manage Runs. A Run would be stopped after inactivity for this amount of time period.\nNote: This parameter is currently only applicable for Runs of type `SESSION`. Default value is 2880 minutes (2 days)\n",
      "format": "int64",
      "type": "integer"
    },
    "logsBucketUri": {
      "description": "An Oracle Cloud Infrastructure URI of the bucket where the Spark job logs are to be uploaded.\nSee https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/hdfsconnector.htm#uriformat.\n",
      "format": "uri",
      "pattern": "^(?:oci):\\/\\/([^:\\/]+)@([^:\\/]+)",
      "type": "string"
    },
    "maxDurationInMinutes": {
      "description": "The maximum duration in minutes for which an Application should run. Data Flow Run would be terminated\nonce it reaches this duration from the time it transitions to `IN_PROGRESS` state.\n",
      "format": "int64",
      "type": "integer"
    },
    "metastoreId": {
      "description": "The OCID of OCI Hive Metastore.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "numExecutors": {
      "description": "The number of executor VMs requested.\n",
      "format": "int32",
      "minimum": 1,
      "type": "integer"
    },
    "parameters": {
      "description": "An array of name/value pairs used to fill placeholders found in properties like\n`Application.arguments`.  The name must be a string of one or more word characters\n(a-z, A-Z, 0-9, _).  The value can be a string of 0 or more characters of any kind.\nExample:  [ { name: \"iterations\", value: \"10\"}, { name: \"input_file\", value: \"mydata.xml\" }, { name: \"variable_x\", value: \"${x}\"} ]\n",
      "items": {
        "$ref": "#/$defs/ApplicationParameter"
      },
      "type": "array"
    },
    "poolId": {
      "description": "The OCID of a pool. Unique Id to indentify a dataflow pool resource.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "sparkVersion": {
      "description": "The Spark version utilized to run the application. This value may be set if applicationId is not since the Spark version will be taken from the associated application.\n",
      "type": "string"
    },
    "warehouseBucketUri": {
      "description": "An Oracle Cloud Infrastructure URI of the bucket to be used as default warehouse directory\nfor BATCH SQL runs.\nSee https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/hdfsconnector.htm#uriformat.\n",
      "format": "uri",
      "pattern": "^(?:oci):\\/\\/([^:\\/]+)@([^:\\/]+)",
      "type": "string"
    }
  },
  "required": [
    "compartmentId"
  ],
  "type": "object",
  "$defs": {
    "ApplicationParameter": {
      "description": "The parameter of an application.\n",
      "properties": {
        "name": {
          "description": "The name of the parameter.  It must be a string of one or more word characters\n(a-z, A-Z, 0-9, _).\nExamples: \"iterations\", \"input_file\"\n",
          "minLength": 1,
          "pattern": "^\\w+$",
          "type": "string"
        },
        "value": {
          "description": "The value of the parameter. It must be a string of 0 or more characters of any kind.\nExamples: \"\" (empty string), \"10\", \"mydata.xml\", \"${x}\"\n",
          "minLength": 0,
          "type": "string"
        }
      },
      "required": [
        "name",
        "value"
      ],
      "type": "object"
    },
    "ShapeConfig": {
      "description": "This is used to configure the shape of the driver or executor if a flexible shape is used.\n",
      "properties": {
        "gpus": {
          "description": "The total number of GPUs used for the driver or executors.\nSee [here](https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/20160918/Shape/) for details.\n",
          "format": "int32",
          "minimum": 0,
          "type": "integer"
        },
        "memoryInGBs": {
          "description": "The amount of memory used for the driver or executors.\n",
          "format": "integer",
          "minimum": 16,
          "type": "number"
        },
        "ocpus": {
          "description": "The total number of OCPUs used for the driver or executors.\nSee [here](https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/20160918/Shape/) for details.\n",
          "format": "integer",
          "minimum": 1,
          "type": "number"
        }
      },
      "x-default-description": "null"
    }
  }
}