{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-deadline-cloud/json-schema/amazon-deadline-cloud-create-queue-request-schema.json",
  "title": "CreateQueueRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-deadline-cloud-queues-api-openapi.yml#/components/schemas/CreateQueueRequest",
  "type": "object",
  "properties": {
    "farmId": {
      "type": "string",
      "description": "The farm ID of the farm to connect to the queue."
    },
    "clientToken": {
      "type": "string",
      "description": "The unique token which the server uses to recognize retries of the same request."
    },
    "displayName": {
      "type": "string",
      "description": "The display name of the queue. This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field."
    },
    "description": {
      "type": "string",
      "description": "The description of the queue. This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field."
    },
    "defaultBudgetAction": {
      "type": "string",
      "enum": [
        "NONE",
        "STOP_SCHEDULING_AND_COMPLETE_TASKS",
        "STOP_SCHEDULING_AND_CANCEL_TASKS"
      ],
      "description": "The default action to take on a queue if a budget isn't configured."
    },
    "jobAttachmentSettings": {
      "$ref": "#/$defs/JobAttachmentSettings"
    },
    "roleArn": {
      "type": "string",
      "description": "The IAM role ARN that workers will use while running jobs for this queue."
    },
    "jobRunAsUser": {
      "$ref": "#/$defs/JobRunAsUser"
    },
    "requiredFileSystemLocationNames": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The file system location name to include in the queue."
    },
    "allowedStorageProfileIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The storage profile IDs to include in the queue."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Each tag consists of a tag key and a tag value. Tag keys and values are both required, but tag values can be empty strings."
    },
    "schedulingConfiguration": {
      "$ref": "#/$defs/SchedulingConfiguration"
    }
  },
  "required": [
    "farmId",
    "displayName"
  ],
  "$defs": {
    "JobAttachmentSettings": {
      "type": "object",
      "properties": {
        "s3BucketName": {
          "type": "string",
          "description": "The Amazon S3 bucket name."
        },
        "rootPrefix": {
          "type": "string",
          "description": "The root prefix."
        }
      },
      "required": [
        "s3BucketName",
        "rootPrefix"
      ]
    },
    "JobRunAsUser": {
      "type": "object",
      "properties": {
        "posix": {
          "$ref": "#/$defs/PosixUser"
        },
        "windows": {
          "$ref": "#/$defs/WindowsUser"
        },
        "runAs": {
          "type": "string",
          "enum": [
            "QUEUE_CONFIGURED_USER",
            "WORKER_AGENT_USER"
          ],
          "description": "Specifies whether the job should run using the queue's system user or if the job should run using the worker agent system user."
        }
      },
      "required": [
        "runAs"
      ]
    },
    "PosixUser": {
      "type": "object",
      "properties": {
        "user": {
          "type": "string",
          "description": "The name of the POSIX user."
        },
        "group": {
          "type": "string",
          "description": "The name of the POSIX user's group."
        }
      },
      "required": [
        "user",
        "group"
      ]
    },
    "PriorityBalancedSchedulingConfiguration": {
      "type": "object",
      "properties": {
        "renderingTaskBuffer": {
          "type": "integer",
          "description": "The rendering task buffer controls worker stickiness. A worker only switches from its current job to another job at the same priority if the other job has fewer rendering tasks by more than this buffer value. Higher values make workers stickier to their current jobs. The default value is 1."
        }
      }
    },
    "PriorityFifoSchedulingConfiguration": {
      "type": "object",
      "properties": {}
    },
    "SchedulingConfiguration": {
      "type": "object",
      "properties": {
        "priorityFifo": {
          "$ref": "#/$defs/PriorityFifoSchedulingConfiguration"
        },
        "priorityBalanced": {
          "$ref": "#/$defs/PriorityBalancedSchedulingConfiguration"
        },
        "weightedBalanced": {
          "$ref": "#/$defs/WeightedBalancedSchedulingConfiguration"
        }
      },
      "description": "Exactly one member is set."
    },
    "SchedulingMaxPriorityOverride": {
      "type": "object",
      "properties": {
        "alwaysScheduleFirst": {
          "$ref": "#/$defs/SchedulingMaxPriorityOverrideAlwaysScheduleFirst"
        }
      },
      "description": "Exactly one member is set."
    },
    "SchedulingMaxPriorityOverrideAlwaysScheduleFirst": {
      "type": "object",
      "properties": {}
    },
    "SchedulingMinPriorityOverride": {
      "type": "object",
      "properties": {
        "alwaysScheduleLast": {
          "$ref": "#/$defs/SchedulingMinPriorityOverrideAlwaysScheduleLast"
        }
      },
      "description": "Exactly one member is set."
    },
    "SchedulingMinPriorityOverrideAlwaysScheduleLast": {
      "type": "object",
      "properties": {}
    },
    "WeightedBalancedSchedulingConfiguration": {
      "type": "object",
      "properties": {
        "priorityWeight": {
          "type": "number",
          "description": "The weight applied to job priority in the scheduling formula. Higher values give more influence to job priority. A value of 0 means priority is ignored. The default value is 100.0."
        },
        "errorWeight": {
          "type": "number",
          "description": "The weight applied to the number of errors on a job. A negative value means jobs without errors are scheduled first. A value of 0 means errors are ignored. The default value is -10.0."
        },
        "submissionTimeWeight": {
          "type": "number",
          "description": "The weight applied to job submission time. A positive value means earlier jobs are scheduled first. A value of 0 means submission time is ignored. The default value is 3.0."
        },
        "renderingTaskWeight": {
          "type": "number",
          "description": "The weight applied to the number of tasks currently rendering on a job. A negative value means jobs that are not already rendering are scheduled next. A value of 0 means the rendering state is ignored. The default value is -100.0."
        },
        "renderingTaskBuffer": {
          "type": "integer",
          "description": "The rendering task buffer is subtracted from the number of rendering tasks before applying the rendering task weight. This creates a stickiness effect where workers prefer to stay with their current job. Higher values make workers stickier. The default value is 1. The buffer is only applied in the weight calculation for a job if the worker is currently assigned to that job."
        },
        "maxPriorityOverride": {
          "$ref": "#/$defs/SchedulingMaxPriorityOverride"
        },
        "minPriorityOverride": {
          "$ref": "#/$defs/SchedulingMinPriorityOverride"
        }
      }
    },
    "WindowsUser": {
      "type": "object",
      "properties": {
        "user": {
          "type": "string",
          "description": "The user."
        },
        "passwordArn": {
          "type": "string",
          "description": "The password ARN for the Windows user."
        }
      },
      "required": [
        "user",
        "passwordArn"
      ]
    }
  }
}