{
  "$id": "https://firefox-ci-tc.services.mozilla.com/schemas/queue/v1/workertype-response.json#",
  "$schema": "https://firefox-ci-tc.services.mozilla.com/schemas/common/metaschema.json#",
  "additionalProperties": false,
  "description": "Response to a worker-type request from a provisioner.\n",
  "properties": {
    "actions": {
      "items": {
        "additionalProperties": false,
        "description": "Actions provide a generic mechanism to expose additional features of a\nprovisioner, worker type, or worker to Taskcluster clients.\n\nAn action is comprised of metadata describing the feature it exposes,\ntogether with a webhook for triggering it.\n\nThe Taskcluster tools site, for example, retrieves actions when displaying\nprovisioners, worker types and workers. It presents the provisioner/worker\ntype/worker specific actions to the user. When the user triggers an action,\nthe web client takes the registered webhook, substitutes parameters into the\nURL (see `url`), signs the requests with the Taskcluster credentials of the\nuser operating the web interface, and issues the HTTP request.\n\nThe level to which the action relates (provisioner, worker type, worker) is\ncalled the action context. All actions, regardless of the action contexts,\nare registered against the provisioner when calling\n`queue.declareProvisioner`.\n\nThe action context is used by the web client to determine where in the web\ninterface to present the action to the user as follows:\n\n| `context`   | Tool where action is displayed |\n|-------------|--------------------------------|\n| provisioner | Provisioner Explorer           |\n| worker-type | Workers Explorer               |\n| worker      | Worker Explorer                |\n\nSee [actions docs](/docs/reference/platform/taskcluster-queue/docs/actions)\nfor more information.\n",
        "properties": {
          "context": {
            "description": "Only actions with the context `worker-type` are included.\n",
            "enum": [
              "worker-type"
            ],
            "title": "Context",
            "type": "string"
          },
          "description": {
            "description": "Description of the provisioner.\n",
            "title": "Description",
            "type": "string"
          },
          "method": {
            "description": "Method to indicate the desired action to be performed for a given resource.\n",
            "enum": [
              "POST",
              "PUT",
              "DELETE",
              "PATCH"
            ],
            "title": "Method",
            "type": "string"
          },
          "name": {
            "description": "Short names for things like logging/error messages.\n",
            "title": "Name",
            "type": "string"
          },
          "title": {
            "description": "Appropriate title for any sort of Modal prompt.\n",
            "title": "Title"
          },
          "url": {
            "description": "When an action is triggered, a request is made using the `url` and `method`.\nDepending on the `context`, the following parameters will be substituted in the url:\n\n| `context`   | Path parameters                                          |\n|-------------|----------------------------------------------------------|\n| provisioner | <provisionerId>                                          |\n| worker-type | <provisionerId>, <workerType>                            |\n| worker      | <provisionerId>, <workerType>, <workerGroup>, <workerId> |\n\n_Note: The request needs to be signed with the user's Taskcluster credentials._\n",
            "title": "URL",
            "type": "string"
          }
        },
        "required": [
          "name",
          "title",
          "context",
          "url",
          "method",
          "description"
        ],
        "title": "Worker-type Action",
        "type": "object"
      },
      "title": "Worker-type Actions",
      "type": "array",
      "uniqueItems": false
    },
    "description": {
      "description": "Description of the worker-type.\n",
      "title": "Description",
      "type": "string"
    },
    "expires": {
      "description": "Date and time after which the worker-type will be automatically\ndeleted by the queue.\n",
      "format": "date-time",
      "title": "Worker-type Expiration",
      "type": "string"
    },
    "lastDateActive": {
      "description": "Date of the last time this worker-type was seen active. `lastDateActive` is updated every half hour\nbut may be off by up-to half an hour. Nonetheless, `lastDateActive` is a good indicator\nof when the worker-type was last seen active.\n",
      "format": "date-time",
      "title": "Worker-type Last Date Active",
      "type": "string"
    },
    "provisionerId": {
      "$ref": "task.json#/properties/provisionerId"
    },
    "stability": {
      "description": "This is the stability of the worker-type. Accepted values:\n  * `experimental`\n  * `stable`\n  * `deprecated`\n",
      "enum": [
        "experimental",
        "stable",
        "deprecated"
      ],
      "title": "Stability",
      "type": "string"
    },
    "taskQueueId": {
      "$ref": "task.json#/properties/taskQueueId"
    },
    "workerType": {
      "$ref": "task.json#/properties/workerType"
    }
  },
  "required": [
    "workerType",
    "provisionerId",
    "taskQueueId",
    "description",
    "stability",
    "expires",
    "lastDateActive",
    "actions"
  ],
  "title": "Worker-type Response",
  "type": "object"
}