{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-emr/json-schema/amazon-emr-start-job-run-request-schema.json",
  "title": "StartJobRunRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-emr-jobruns-api-openapi.yml#/components/schemas/StartJobRunRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the job run."
    },
    "virtualClusterId": {
      "type": "string",
      "description": "The virtual cluster ID for which the job run request is submitted."
    },
    "clientToken": {
      "type": "string",
      "description": "The client idempotency token of the job run request."
    },
    "executionRoleArn": {
      "type": "string",
      "description": "The execution role ARN for the job run."
    },
    "releaseLabel": {
      "type": "string",
      "description": "The Amazon EMR release version to use for the job run."
    },
    "jobDriver": {
      "$ref": "#/$defs/JobDriver"
    },
    "configurationOverrides": {
      "$ref": "#/$defs/ConfigurationOverrides"
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The tags assigned to job runs."
    },
    "jobTemplateId": {
      "type": "string",
      "description": "The job template ID to be used to start the job run."
    },
    "jobTemplateParameters": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The values of job template parameters to start a job run."
    },
    "retryPolicyConfiguration": {
      "$ref": "#/$defs/RetryPolicyConfiguration"
    }
  },
  "required": [
    "virtualClusterId",
    "clientToken"
  ],
  "$defs": {
    "CloudWatchMonitoringConfiguration": {
      "type": "object",
      "properties": {
        "logGroupName": {
          "type": "string",
          "description": "The name of the log group for log publishing."
        },
        "logStreamNamePrefix": {
          "type": "string",
          "description": "The specified name prefix for log streams."
        }
      },
      "required": [
        "logGroupName"
      ]
    },
    "ConfigurationOverrides": {
      "type": "object",
      "properties": {
        "applicationConfiguration": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EmrContainersConfiguration"
          },
          "description": "The configurations for the application running by the job run."
        },
        "monitoringConfiguration": {
          "$ref": "#/$defs/EmrContainersMonitoringConfiguration"
        }
      }
    },
    "ContainerLogRotationConfiguration": {
      "type": "object",
      "properties": {
        "rotationSize": {
          "type": "string",
          "description": "The file size at which to rotate logs. Minimum of 2KB, Maximum of 2GB."
        },
        "maxFilesToKeep": {
          "type": "integer",
          "description": "The number of files to keep in container after rotation."
        }
      },
      "required": [
        "rotationSize",
        "maxFilesToKeep"
      ]
    },
    "EmrContainersConfiguration": {
      "type": "object",
      "properties": {
        "classification": {
          "type": "string",
          "description": "The classification within a configuration."
        },
        "properties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "A set of properties specified within a configuration classification."
        },
        "configurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EmrContainersConfiguration"
          },
          "description": "A list of additional configurations to apply within a configuration object."
        }
      },
      "required": [
        "classification"
      ]
    },
    "EmrContainersMonitoringConfiguration": {
      "type": "object",
      "properties": {
        "managedLogs": {
          "$ref": "#/$defs/ManagedLogs"
        },
        "persistentAppUI": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "Monitoring configurations for the persistent application UI."
        },
        "cloudWatchMonitoringConfiguration": {
          "$ref": "#/$defs/CloudWatchMonitoringConfiguration"
        },
        "s3MonitoringConfiguration": {
          "$ref": "#/$defs/EmrContainersS3MonitoringConfiguration"
        },
        "containerLogRotationConfiguration": {
          "$ref": "#/$defs/ContainerLogRotationConfiguration"
        }
      }
    },
    "EmrContainersS3MonitoringConfiguration": {
      "type": "object",
      "properties": {
        "logUri": {
          "type": "string",
          "description": "Amazon S3 destination URI for log publishing."
        },
        "encryptionKeyArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the encryption key for logs."
        }
      },
      "required": [
        "logUri"
      ]
    },
    "JobDriver": {
      "type": "object",
      "properties": {
        "sparkSubmitJobDriver": {
          "$ref": "#/$defs/SparkSubmitJobDriver"
        },
        "sparkSqlJobDriver": {
          "$ref": "#/$defs/SparkSqlJobDriver"
        }
      }
    },
    "ManagedLogs": {
      "type": "object",
      "properties": {
        "allowAWSToRetainLogs": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "Determines whether Amazon Web Services can retain logs."
        },
        "encryptionKeyArn": {
          "type": "string",
          "description": "The Amazon resource name (ARN) of the encryption key for logs."
        }
      }
    },
    "RetryPolicyConfiguration": {
      "type": "object",
      "properties": {
        "maxAttempts": {
          "type": "integer",
          "description": "The maximum number of attempts on the job's driver."
        }
      },
      "required": [
        "maxAttempts"
      ]
    },
    "SparkSqlJobDriver": {
      "type": "object",
      "properties": {
        "entryPoint": {
          "type": "string",
          "description": "The SQL file to be executed."
        },
        "sparkSqlParameters": {
          "type": "string",
          "description": "The Spark parameters to be included in the Spark SQL command."
        }
      }
    },
    "SparkSubmitJobDriver": {
      "type": "object",
      "properties": {
        "entryPoint": {
          "type": "string",
          "description": "The entry point of job application."
        },
        "entryPointArguments": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The arguments for job application."
        },
        "sparkSubmitParameters": {
          "type": "string",
          "description": "The Spark submit parameters that are used for job runs."
        }
      },
      "required": [
        "entryPoint"
      ]
    }
  }
}