{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-emr/json-schema/amazon-emr-add-job-flow-steps-input-schema.json",
  "title": "AddJobFlowStepsInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-emr-operations-api-openapi.yml#/components/schemas/AddJobFlowStepsInput",
  "type": "object",
  "properties": {
    "JobFlowId": {
      "type": "string",
      "description": "A string that uniquely identifies the job flow. This identifier is returned by RunJobFlow and can also be obtained from ListClusters."
    },
    "Steps": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/StepConfig"
      },
      "description": "A list of StepConfig to be executed by the job flow."
    },
    "ExecutionRoleArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the runtime role for a step on the cluster. The runtime role can be a cross-account IAM role. The runtime role ARN is a combination of account ID, role name, and role type using the following format: arn:partition:service:region:account:resource. For example, arn:aws:IAM::1234567890:role/ReadOnly is a correctly formatted runtime role ARN."
    }
  },
  "required": [
    "JobFlowId",
    "Steps"
  ],
  "$defs": {
    "HadoopJarStepConfig": {
      "type": "object",
      "properties": {
        "Properties": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/KeyValue"
          },
          "description": "A list of Java properties that are set when the step runs. You can use these properties to pass key-value pairs to your main function."
        },
        "Jar": {
          "type": "string",
          "description": "A path to a JAR file run during the step."
        },
        "MainClass": {
          "type": "string",
          "description": "The name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file."
        },
        "Args": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of command line arguments passed to the JAR file's main function when executed."
        }
      },
      "required": [
        "Jar"
      ]
    },
    "KeyValue": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The unique identifier of a key-value pair."
        },
        "Value": {
          "type": "string",
          "description": "The value part of the identified key."
        }
      }
    },
    "S3MonitoringConfiguration": {
      "type": "object",
      "properties": {
        "LogUri": {
          "type": "string",
          "description": "The Amazon S3 destination URI for log publishing."
        },
        "EncryptionKeyArn": {
          "type": "string",
          "description": "The KMS key ARN to encrypt the logs published to the given Amazon S3 destination."
        }
      }
    },
    "StepConfig": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string",
          "description": "The name of the step."
        },
        "ActionOnFailure": {
          "type": "string",
          "enum": [
            "TERMINATE_JOB_FLOW",
            "TERMINATE_CLUSTER",
            "CANCEL_AND_WAIT",
            "CONTINUE"
          ],
          "description": "The action to take when the step fails. Use one of the following values: TERMINATE_CLUSTER - Shuts down the cluster. CANCEL_AND_WAIT - Cancels any pending steps and returns the cluster to the WAITING state. CONTINUE - Continues to the next step in the queue. TERMINATE_JOB_FLOW - Shuts down the cluster. TERMINATE_JOB_FLOW is provided for backward compatibility. We recommend using TERMINATE_CLUSTER instead. If a cluster's StepConcurrencyLevel is greater than 1, do not use AddJobFlowSteps to submit a step with this parameter set to CANCEL_AND_WAIT or TERMINATE_CLUSTER. The step is not submitted a"
        },
        "HadoopJarStep": {
          "$ref": "#/$defs/HadoopJarStepConfig"
        },
        "StepMonitoringConfiguration": {
          "$ref": "#/$defs/StepMonitoringConfiguration"
        }
      },
      "required": [
        "Name",
        "HadoopJarStep"
      ]
    },
    "StepMonitoringConfiguration": {
      "type": "object",
      "properties": {
        "S3MonitoringConfiguration": {
          "$ref": "#/$defs/S3MonitoringConfiguration"
        }
      }
    }
  }
}