{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-healthomics/json-schema/amazon-healthomics-start-run-batch-request-schema.json",
  "title": "StartRunBatchRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-healthomics-runbatch-api-openapi.yml#/components/schemas/StartRunBatchRequest",
  "type": "object",
  "properties": {
    "batchName": {
      "type": "string",
      "description": "An optional user-friendly name for the run batch."
    },
    "requestId": {
      "type": "string",
      "description": "A client token used to deduplicate retry requests and prevent duplicate batches from being created."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Amazon Web Services tags to associate with the batch resource. These tags are not inherited by individual runs. To tag individual runs, use defaultRunSetting.runTags."
    },
    "defaultRunSetting": {
      "$ref": "#/$defs/DefaultRunSetting"
    },
    "batchRunSettings": {
      "$ref": "#/$defs/BatchRunSettings"
    }
  },
  "required": [
    "requestId",
    "defaultRunSetting",
    "batchRunSettings"
  ],
  "$defs": {
    "BatchRunSettings": {
      "type": "object",
      "properties": {
        "inlineSettings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InlineSetting"
          },
          "description": "A list of per-run configurations provided inline in the request. Each entry must include a unique runSettingId. Supports up to 100 entries. For batches with more than 100 runs, use s3UriSettings."
        },
        "s3UriSettings": {
          "type": "string",
          "description": "An Amazon S3 URI pointing to a JSON file containing per-run configurations. The file must be a JSON array in the same format as inlineSettings. Supports up to 100,000 run configurations. The maximum file size is 6 GB. The IAM service role in roleArn must have read access to this S3 object. HealthOmics validates access to the file during the synchronous API call and records the file's ETag. If the file is modified after submission, the batch fails."
        }
      },
      "description": "Exactly one member is set."
    },
    "DefaultRunSetting": {
      "type": "object",
      "properties": {
        "workflowId": {
          "type": "string",
          "description": "The identifier of the workflow to run."
        },
        "workflowType": {
          "type": "string",
          "description": "The type of the originating workflow. Batch runs are not supported with READY2RUN workflows."
        },
        "roleArn": {
          "type": "string",
          "description": "The IAM role ARN that grants HealthOmics permissions to access required Amazon Web Services resources such as Amazon S3 and CloudWatch. The role must have the same permissions required for individual StartRun calls."
        },
        "name": {
          "type": "string",
          "description": "An optional user-friendly name applied to each workflow run. Can be overridden per run."
        },
        "cacheId": {
          "type": "string",
          "description": "The identifier of the run cache to associate with the runs."
        },
        "cacheBehavior": {
          "type": "string",
          "description": "The cache behavior for the runs. Requires cacheId to be set."
        },
        "runGroupId": {
          "type": "string",
          "description": "The ID of the run group to contain all workflow runs in the batch."
        },
        "priority": {
          "type": "integer",
          "description": "An integer priority for the workflow runs. Higher values correspond to higher priority. A value of 0 corresponds to the lowest priority. Can be overridden per run."
        },
        "parameters": {
          "type": "object",
          "description": "Workflow parameter names and values shared across all runs. Merged with per-run parameters; run-specific values take precedence when keys overlap. Can be overridden per run."
        },
        "storageCapacity": {
          "type": "integer",
          "description": "The filesystem size in gibibytes (GiB) provisioned for each workflow run and shared by all tasks in that run. Defaults to 1200 GiB if not specified."
        },
        "outputUri": {
          "type": "string",
          "description": "The destination S3 URI for workflow outputs. Must begin with s3://. The roleArn must grant write permissions to this bucket. Can be overridden per run."
        },
        "logLevel": {
          "type": "string",
          "description": "The verbosity level for CloudWatch Logs emitted during each run."
        },
        "runTags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Amazon Web Services tags to associate with each workflow run. Merged with per-run runTags; run-specific values take precedence when keys overlap."
        },
        "retentionMode": {
          "type": "string",
          "description": "The retention behavior for runs after completion."
        },
        "storageType": {
          "type": "string",
          "description": "The storage type for the workflow runs."
        },
        "workflowOwnerId": {
          "type": "string",
          "description": "The Amazon Web Services account ID of the workflow owner, used for cross-account workflow sharing."
        },
        "outputBucketOwnerId": {
          "type": "string",
          "description": "The expected Amazon Web Services account ID of the owner of the output S3 bucket. Can be overridden per run."
        },
        "workflowVersionName": {
          "type": "string",
          "description": "The version name of the specified workflow."
        },
        "networkingMode": {
          "type": "string",
          "description": "Optional configuration for run networking behavior. If not specified, this will default to RESTRICTED."
        },
        "configurationName": {
          "type": "string",
          "description": "Optional configuration name to use for the workflow run."
        },
        "sessionPolicy": {
          "type": "string",
          "description": "Optional inline policy json for scoping down permissions via a session policy on the IAM role provided in the roleArn parameter."
        },
        "engineSettings": {
          "type": "object",
          "description": "Engine-specific settings for the workflow run. Use this field to specify configuration options that are specific to the workflow engine (for example, Nextflow profiles)."
        },
        "scratchStorageMode": {
          "type": "string",
          "description": "Optional configuration for enabling scratch ephemeral storage mounted at /tmp. If not specified, this will default to SHARED. This configuration is applicable only for CPU tasks. For tasks using GPUs, scratch storage is always LOCAL."
        }
      },
      "required": [
        "workflowId",
        "roleArn"
      ]
    },
    "InlineSetting": {
      "type": "object",
      "properties": {
        "runSettingId": {
          "type": "string",
          "description": "A customer-provided unique identifier for this run configuration within the batch. After submission, use ListRunsInBatch to map each runSettingId to the HealthOmics-generated runId."
        },
        "name": {
          "type": "string",
          "description": "An optional user-friendly name for this run."
        },
        "outputUri": {
          "type": "string",
          "description": "Override the destination S3 URI for this run's outputs."
        },
        "priority": {
          "type": "integer",
          "description": "Override the priority for this run."
        },
        "parameters": {
          "type": "object",
          "description": "Per-run workflow parameters. Merged with defaultRunSetting.parameters; values in this object take precedence when keys overlap."
        },
        "outputBucketOwnerId": {
          "type": "string",
          "description": "The expected Amazon Web Services account ID of the owner of the output S3 bucket for this run."
        },
        "runTags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Per-run Amazon Web Services tags. Merged with defaultRunSetting.runTags; values in this object take precedence when keys overlap."
        },
        "engineSettings": {
          "type": "object",
          "description": "Per-run engine-specific settings. Use this field to specify configuration options that are specific to the workflow engine (for example, Nextflow profiles). Overrides defaultRunSetting.engineSettings for this run."
        }
      },
      "required": [
        "runSettingId"
      ]
    }
  }
}