{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-emr/json-schema/amazon-emr-create-application-request-schema.json",
  "title": "CreateApplicationRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-emr-applications-api-openapi.yml#/components/schemas/CreateApplicationRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the application."
    },
    "releaseLabel": {
      "type": "string",
      "description": "The Amazon EMR release associated with the application."
    },
    "type": {
      "type": "string",
      "description": "The type of application you want to start, such as Spark or Hive."
    },
    "clientToken": {
      "type": "string",
      "description": "The client idempotency token of the application to create. Its value must be unique for each request."
    },
    "initialCapacity": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/InitialCapacityConfig"
      },
      "description": "The capacity to initialize when the application is created."
    },
    "maximumCapacity": {
      "$ref": "#/$defs/MaximumAllowedResources"
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The tags assigned to the application."
    },
    "autoStartConfiguration": {
      "$ref": "#/$defs/AutoStartConfig"
    },
    "autoStopConfiguration": {
      "$ref": "#/$defs/AutoStopConfig"
    },
    "networkConfiguration": {
      "$ref": "#/$defs/NetworkConfiguration"
    },
    "architecture": {
      "type": "string",
      "description": "The CPU architecture of an application."
    },
    "imageConfiguration": {
      "$ref": "#/$defs/ImageConfigurationInput"
    },
    "workerTypeSpecifications": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/WorkerTypeSpecificationInput"
      },
      "description": "The key-value pairs that specify worker type to WorkerTypeSpecificationInput. This parameter must contain all valid worker types for a Spark or Hive application. Valid worker types include Driver and Executor for Spark applications and HiveDriver and TezTask for Hive applications. You can either set image details in this parameter for each worker type, or in imageConfiguration for all worker types."
    },
    "runtimeConfiguration": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EmrServerlessConfiguration"
      },
      "description": "The Configuration specifications to use when creating an application. Each configuration consists of a classification and properties. This configuration is applied to all the job runs submitted under the application."
    },
    "monitoringConfiguration": {
      "$ref": "#/$defs/EmrServerlessMonitoringConfiguration"
    },
    "diskEncryptionConfiguration": {
      "$ref": "#/$defs/DiskEncryptionConfiguration"
    },
    "interactiveConfiguration": {
      "$ref": "#/$defs/InteractiveConfiguration"
    },
    "schedulerConfiguration": {
      "$ref": "#/$defs/EmrServerlessSchedulerConfiguration"
    },
    "identityCenterConfiguration": {
      "$ref": "#/$defs/IdentityCenterConfigurationInput"
    },
    "jobLevelCostAllocationConfiguration": {
      "$ref": "#/$defs/JobLevelCostAllocationConfiguration"
    }
  },
  "required": [
    "releaseLabel",
    "type",
    "clientToken"
  ],
  "$defs": {
    "AutoStartConfig": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Enables the application to automatically start on job submission. Defaults to true."
        }
      }
    },
    "AutoStopConfig": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Enables the application to automatically stop after a certain amount of time being idle. Defaults to true."
        },
        "idleTimeoutMinutes": {
          "type": "integer",
          "description": "The amount of idle time in minutes after which your application will automatically stop. Defaults to 15 minutes."
        }
      }
    },
    "CloudWatchLoggingConfiguration": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Enables CloudWatch logging."
        },
        "logGroupName": {
          "type": "string",
          "description": "The name of the log group in Amazon CloudWatch Logs where you want to publish your logs."
        },
        "logStreamNamePrefix": {
          "type": "string",
          "description": "Prefix for the CloudWatch log stream name."
        },
        "encryptionKeyArn": {
          "type": "string",
          "description": "The Key Management Service (KMS) key ARN to encrypt the logs that you store in CloudWatch Logs."
        },
        "logTypes": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": "The types of logs that you want to publish to CloudWatch. If you don't specify any log types, driver STDOUT and STDERR logs will be published to CloudWatch Logs by default. For more information including the supported worker types for Hive and Spark, see Logging for EMR Serverless with CloudWatch. Key Valid Values: SPARK_DRIVER, SPARK_EXECUTOR, HIVE_DRIVER, TEZ_TASK Array Members Valid Values: STDOUT, STDERR, HIVE_LOG, TEZ_AM, SYSTEM_LOGS"
        }
      },
      "required": [
        "enabled"
      ]
    },
    "DiskEncryptionConfiguration": {
      "type": "object",
      "properties": {
        "encryptionContext": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Specifies the optional encryption context that will be used when encrypting the data. An encryption context is a collection of non-secret key-value pairs that represent additional authenticated data."
        },
        "encryptionKeyArn": {
          "type": "string",
          "description": "The KMS key ARN to encrypt local disks."
        }
      }
    },
    "EmrServerlessConfiguration": {
      "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/EmrServerlessConfiguration"
          },
          "description": "A list of additional configurations to apply within a configuration object."
        }
      },
      "required": [
        "classification"
      ]
    },
    "EmrServerlessMonitoringConfiguration": {
      "type": "object",
      "properties": {
        "s3MonitoringConfiguration": {
          "$ref": "#/$defs/EmrServerlessS3MonitoringConfiguration"
        },
        "managedPersistenceMonitoringConfiguration": {
          "$ref": "#/$defs/ManagedPersistenceMonitoringConfiguration"
        },
        "cloudWatchLoggingConfiguration": {
          "$ref": "#/$defs/CloudWatchLoggingConfiguration"
        },
        "prometheusMonitoringConfiguration": {
          "$ref": "#/$defs/PrometheusMonitoringConfiguration"
        }
      }
    },
    "EmrServerlessS3MonitoringConfiguration": {
      "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."
        }
      }
    },
    "EmrServerlessSchedulerConfiguration": {
      "type": "object",
      "properties": {
        "queueTimeoutMinutes": {
          "type": "integer",
          "description": "The maximum duration in minutes for the job in QUEUED state. If scheduler configuration is enabled on your application, the default value is 360 minutes (6 hours). The valid range is from 15 to 720."
        },
        "maxConcurrentRuns": {
          "type": "integer",
          "description": "The maximum concurrent job runs on this application. If scheduler configuration is enabled on your application, the default value is 15. The valid range is 1 to 1000."
        }
      }
    },
    "IdentityCenterConfigurationInput": {
      "type": "object",
      "properties": {
        "identityCenterInstanceArn": {
          "type": "string",
          "description": "The ARN of the IAM Identity Center instance."
        },
        "userBackgroundSessionsEnabled": {
          "type": "boolean",
          "description": "Enables user background sessions for this application so Livy sessions can continue running after users log out of their interactive notebook or their Identity Center sessions expire."
        }
      }
    },
    "ImageConfigurationInput": {
      "type": "object",
      "properties": {
        "imageUri": {
          "type": "string",
          "description": "The URI of an image in the Amazon ECR registry. This field is required when you create a new application. If you leave this field blank in an update, Amazon EMR will remove the image configuration."
        },
        "applicationLevelDigestResolution": {
          "type": "boolean",
          "description": "Boolean value indicating if the digest resolution is application level or workload level. If true, a custom image URI is resolved at application start time and all workloads submitted will use that image digest. If false, the custom image URI is resolved at the workload submission time."
        }
      }
    },
    "InitialCapacityConfig": {
      "type": "object",
      "properties": {
        "workerCount": {
          "type": "integer",
          "description": "The number of workers in the initial capacity configuration."
        },
        "workerConfiguration": {
          "$ref": "#/$defs/WorkerResourceConfig"
        }
      },
      "required": [
        "workerCount"
      ]
    },
    "InteractiveConfiguration": {
      "type": "object",
      "properties": {
        "studioEnabled": {
          "type": "boolean",
          "description": "Enables you to connect an application to Amazon EMR Studio to run interactive workloads in a notebook."
        },
        "livyEndpointEnabled": {
          "type": "boolean",
          "description": "Enables an Apache Livy endpoint that you can connect to and run interactive jobs."
        },
        "sessionEnabled": {
          "type": "boolean",
          "description": "Enables interactive sessions on the application. When set to true, you can start interactive sessions using the StartSession operation."
        }
      }
    },
    "JobLevelCostAllocationConfiguration": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Enables job level cost allocation for the application."
        }
      }
    },
    "ManagedPersistenceMonitoringConfiguration": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Enables managed logging and defaults to true. If set to false, managed logging will be turned off."
        },
        "encryptionKeyArn": {
          "type": "string",
          "description": "The KMS key ARN to encrypt the logs stored in managed log persistence."
        }
      }
    },
    "MaximumAllowedResources": {
      "type": "object",
      "properties": {
        "cpu": {
          "type": "string",
          "description": "The maximum allowed CPU for an application."
        },
        "memory": {
          "type": "string",
          "description": "The maximum allowed resources for an application."
        },
        "disk": {
          "type": "string",
          "description": "The maximum allowed disk for an application."
        }
      },
      "required": [
        "cpu",
        "memory"
      ]
    },
    "NetworkConfiguration": {
      "type": "object",
      "properties": {
        "subnetIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The array of subnet Ids for customer VPC connectivity."
        },
        "securityGroupIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The array of security group Ids for customer VPC connectivity."
        }
      }
    },
    "PrometheusMonitoringConfiguration": {
      "type": "object",
      "properties": {
        "remoteWriteUrl": {
          "type": "string",
          "description": "The remote write URL in the Amazon Managed Service for Prometheus workspace to send metrics to."
        }
      }
    },
    "WorkerResourceConfig": {
      "type": "object",
      "properties": {
        "cpu": {
          "type": "string",
          "description": "The CPU requirements for every worker instance of the worker type."
        },
        "memory": {
          "type": "string",
          "description": "The memory requirements for every worker instance of the worker type."
        },
        "disk": {
          "type": "string",
          "description": "The disk requirements for every worker instance of the worker type."
        },
        "diskType": {
          "type": "string",
          "description": "The disk type for every worker instance of the work type. Shuffle optimized disks have higher performance characteristics and are better for shuffle heavy workloads. Default is STANDARD."
        }
      },
      "required": [
        "cpu",
        "memory"
      ]
    },
    "WorkerTypeSpecificationInput": {
      "type": "object",
      "properties": {
        "imageConfiguration": {
          "$ref": "#/$defs/ImageConfigurationInput"
        }
      }
    }
  }
}