{
  "$id": "https://firefox-ci-tc.services.mozilla.com/schemas/worker-manager/v1/register-worker-request.json#",
  "$schema": "https://firefox-ci-tc.services.mozilla.com/schemas/common/metaschema.json#",
  "additionalProperties": false,
  "description": "Request body to `registerWorker`.",
  "properties": {
    "providerId": {
      "$ref": "worker-full.json#/properties/providerId"
    },
    "systemBootTime": {
      "description": "The time that the worker's system booted.\nThis is used to increase granularity of worker\nregistration time metrics.\nSee https://github.com/taskcluster/taskcluster/issues/8232.\n",
      "format": "date-time",
      "title": "System Boot Time",
      "type": "string"
    },
    "workerGroup": {
      "$ref": "worker-full.json#/properties/workerGroup"
    },
    "workerId": {
      "$ref": "worker-full.json#/properties/workerId"
    },
    "workerIdentityProof": {
      "description": "Proof that this call is coming from the worker identified by the other fields.\nThe form of this proof varies depending on the provider type.\n",
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "token": {
              "description": "A JWT token as defined in [this google documentation](https://cloud.google.com/compute/docs/instances/verifying-instance-identity)\n",
              "title": "Token",
              "type": "string"
            }
          },
          "required": [
            "token"
          ],
          "title": "google provider type",
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "staticSecret": {
              "description": "The secret value that was configured when the worker was created (in `createWorker`).\n",
              "pattern": "^[a-zA-Z0-9_-]{44}$",
              "title": "Secret",
              "type": "string"
            }
          },
          "required": [
            "staticSecret"
          ],
          "title": "static provider type",
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "document": {
              "description": "Instance identity document that is obtained by\ncurl http://169.254.169.254/latest/dynamic/instance-identity/document on the instance\n",
              "title": "Document",
              "type": "string"
            },
            "signature": {
              "description": "The signature for instance identity document. Can be obtained by\ncurl http://169.254.169.254/latest/dynamic/instance-identity/signature on the instance\n",
              "title": "Signature",
              "type": "string"
            }
          },
          "required": [
            "document",
            "signature"
          ],
          "title": "aws provider type",
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "document": {
              "description": "Attested data document that is obtained by\ncurl http://169.254.169.254/metadata/attested/document on the instance\n",
              "title": "Document",
              "type": "string"
            }
          },
          "required": [
            "document"
          ],
          "title": "azure provider type",
          "type": "object"
        }
      ],
      "title": "Worker Identity Proof"
    },
    "workerPoolId": {
      "$ref": "worker-pool-full.json#/properties/workerPoolId"
    }
  },
  "required": [
    "workerPoolId",
    "providerId",
    "workerGroup",
    "workerId",
    "workerIdentityProof"
  ],
  "title": "Register Worker Request",
  "type": "object"
}