{
  "typeName" : "AWS::EMR::Step",
  "description" : "Schema for AWS::EMR::Step",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "definitions" : {
    "HadoopJarStepConfig" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Args" : {
          "type" : "array",
          "uniqueItems" : false,
          "items" : {
            "type" : "string"
          }
        },
        "Jar" : {
          "type" : "string"
        },
        "MainClass" : {
          "type" : "string"
        },
        "StepProperties" : {
          "type" : "array",
          "uniqueItems" : true,
          "items" : {
            "$ref" : "#/definitions/KeyValue"
          }
        }
      },
      "required" : [ "Jar" ]
    },
    "KeyValue" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Key" : {
          "type" : "string"
        },
        "Value" : {
          "type" : "string"
        }
      }
    }
  },
  "properties" : {
    "Id" : {
      "description" : "ID generated by service",
      "type" : "string"
    },
    "ActionOnFailure" : {
      "description" : "This specifies what action to take when the cluster step fails. Possible values are CANCEL_AND_WAIT and CONTINUE.",
      "type" : "string"
    },
    "HadoopJarStep" : {
      "description" : "The HadoopJarStepConfig property type specifies a job flow step consisting of a JAR file whose main function will be executed. The main function submits a job for the cluster to execute as a step on the master node, and then waits for the job to finish or fail before executing subsequent steps.",
      "$ref" : "#/definitions/HadoopJarStepConfig"
    },
    "JobFlowId" : {
      "description" : "A string that uniquely identifies the cluster (job flow).",
      "type" : "string"
    },
    "Name" : {
      "description" : "The name of the cluster step.",
      "type" : "string"
    },
    "LogUri" : {
      "description" : "The Amazon S3 destination URI for log publishing. When omitted, EMR falls back to cluster-level logging behavior.",
      "type" : "string"
    },
    "EncryptionKeyArn" : {
      "description" : "The KMS key ARN to encrypt the logs published to the given Amazon S3 destination. When omitted, EMR falls back to cluster-level logging behavior.",
      "type" : "string"
    }
  },
  "additionalProperties" : false,
  "required" : [ "JobFlowId", "HadoopJarStep", "ActionOnFailure", "Name" ],
  "tagging" : {
    "taggable" : false
  },
  "createOnlyProperties" : [ "/properties/JobFlowId", "/properties/HadoopJarStep", "/properties/Name", "/properties/ActionOnFailure", "/properties/LogUri", "/properties/EncryptionKeyArn" ],
  "primaryIdentifier" : [ "/properties/Id" ],
  "readOnlyProperties" : [ "/properties/Id" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "emr:AddJobFlowSteps" ]
    },
    "delete" : {
      "permissions" : [ ]
    },
    "read" : {
      "permissions" : [ ]
    }
  }
}