{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle/json-schema/oracle-run-schema.json",
  "title": "Run",
  "description": "A run object.\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/Run",
  "properties": {
    "applicationId": {
      "description": "The application ID.\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"
    },
    "className": {
      "description": "The class for the application.\n",
      "type": "string"
    },
    "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"
    },
    "dataReadInBytes": {
      "description": "The data read by the run in bytes.\n",
      "format": "int64",
      "type": "integer"
    },
    "dataWrittenInBytes": {
      "description": "The data written by the run in bytes.\n",
      "format": "int64",
      "type": "integer"
    },
    "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. This name is not necessarily unique.\n",
      "maxLength": 255,
      "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"
    },
    "fileUri": {
      "description": "An Oracle Cloud Infrastructure URI of the file containing the application to execute.\nSee https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/hdfsconnector.htm#uriformat.\n",
      "format": "uri",
      "type": "string"
    },
    "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"
    },
    "id": {
      "description": "The ID of a run.\n",
      "type": "string"
    },
    "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"
    },
    "language": {
      "description": "The Spark language.\n",
      "enum": [
        "SCALA",
        "JAVA",
        "PYTHON",
        "SQL"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/ApplicationLanguage"
    },
    "lifecycleDetails": {
      "description": "The detailed messages about the lifecycle state.\n",
      "type": "string"
    },
    "lifecycleState": {
      "description": "The current state of this run.\n",
      "enum": [
        "ACCEPTED",
        "IN_PROGRESS",
        "CANCELING",
        "CANCELED",
        "FAILED",
        "SUCCEEDED"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/RunLifecycleState"
    },
    "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"
    },
    "opcRequestId": {
      "description": "Unique Oracle assigned identifier for the request.\nIf you need to contact Oracle about a particular request, please provide the request ID.\n",
      "type": "string"
    },
    "ownerPrincipalId": {
      "description": "The OCID of the user who created the resource.\n",
      "type": "string"
    },
    "ownerUserName": {
      "description": "The username of the user who created the resource.  If the username of the owner does not exist,\n`null` will be returned and the caller should refer to the ownerPrincipalId value instead.\n",
      "type": "string"
    },
    "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"
    },
    "privateEndpointDnsZones": {
      "description": "An array of DNS zone names.\nExample: `[ \"app.examplecorp.com\", \"app.examplecorp2.com\" ]`\n",
      "items": {
        "type": "string"
      },
      "maxLength": 255,
      "type": "array"
    },
    "privateEndpointId": {
      "description": "The OCID of a private endpoint.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "privateEndpointMaxHostCount": {
      "description": "The maximum number of hosts to be accessed through the private endpoint. This value is used\nto calculate the relevant CIDR block and should be a multiple of 256.  If the value is not a\nmultiple of 256, it is rounded up to the next multiple of 256. For example, 300 is rounded up\nto 512.\n",
      "format": "int32",
      "minimum": 1,
      "type": "integer"
    },
    "privateEndpointNsgIds": {
      "description": "An array of network security group OCIDs.\n",
      "items": {
        "type": "string"
      },
      "maxLength": 255,
      "type": "array"
    },
    "privateEndpointSubnetId": {
      "description": "The OCID of a subnet.\n",
      "maxLength": 255,
      "type": "string"
    },
    "runDurationInMilliseconds": {
      "description": "The duration of the run in milliseconds.\n",
      "format": "int64",
      "type": "integer"
    },
    "sparkVersion": {
      "description": "The Spark version utilized to run the application.\n",
      "type": "string"
    },
    "timeCreated": {
      "description": "The date and time the resource was created, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format.\nExample: `2018-04-03T21:10:29.600Z`\n",
      "format": "date-time",
      "type": "string"
    },
    "timeUpdated": {
      "description": "The date and time the resource was updated, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format.\nExample: `2018-04-03T21:10:29.600Z`\n",
      "format": "date-time",
      "type": "string"
    },
    "totalOCpu": {
      "description": "The total number of oCPU requested by the run.\n",
      "format": "int32",
      "type": "integer"
    },
    "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": [
    "applicationId",
    "compartmentId",
    "driverShape",
    "executorShape",
    "fileUri",
    "id",
    "language",
    "lifecycleState",
    "numExecutors",
    "sparkVersion",
    "timeCreated",
    "timeUpdated"
  ],
  "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"
    }
  }
}