{
  "$id": "https://firefox-ci-tc.services.mozilla.com/schemas/worker-manager/v1/create-worker-request.json#",
  "$schema": "https://firefox-ci-tc.services.mozilla.com/schemas/common/metaschema.json#",
  "additionalProperties": false,
  "description": "Request to create or update a worker. Capacity will default to 1 if not specified.",
  "properties": {
    "capacity": {
      "$ref": "worker-full.json#/properties/capacity"
    },
    "expires": {
      "description": "Date and time when this worker will be deleted from the DB",
      "format": "date-time",
      "title": "Expires",
      "type": "string"
    },
    "providerInfo": {
      "description": "Provider-specific information",
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "staticSecret": {
              "description": "A secret value shared with the worker.  This value must be passed in the `workerIdentityProof` of the `registerWorker` method.\nThe ideal way to generate a secret of this form is `slugid() + slugid()`.\n\nSecrets are traded for Taskcluster credentials, and should be treated with similar care.\nEach worker should have a distinct secret.\n",
              "pattern": "^[a-zA-Z0-9_-]{44}$",
              "title": "Secret",
              "type": "string"
            }
          },
          "required": [
            "staticSecret"
          ],
          "title": "static provider type",
          "type": "object"
        }
      ],
      "title": "Provider Data"
    }
  },
  "required": [
    "expires"
  ],
  "title": "Worker Creation/Update Request",
  "type": "object"
}