{ "lexicon": 1, "id": "com.fedfork.exec.ops.getVm", "defs": { "main": { "type": "query", "description": "A bidder answers one of its VMs by name: its ComputeVM (as listVms) and its FirecrackerVM (status phase, lostReason, image sha256 and fetched); each null when absent. Read only (GET). Served only when the host has an ops read secret configured (else 404); requires it as Authorization: Bearer.", "parameters": { "type": "params", "required": [ "name" ], "properties": { "name": { "type": "string", "maxLength": 63, "description": "A ComputeVM name (a DNS label)." } } }, "output": { "encoding": "application/json", "schema": { "type": "object", "required": [ "computeVm", "firecrackerVm" ], "nullable": [ "computeVm", "firecrackerVm" ], "properties": { "computeVm": { "type": "ref", "ref": "#vm" }, "firecrackerVm": { "type": "ref", "ref": "#firecrackerVm" } } } }, "errors": [ { "name": "AuthenticationRequired", "description": "401: the ops read secret is missing or wrong." }, { "name": "InvalidRequest", "description": "400: name is not a ComputeVM name (a DNS label of at most 63 characters)." }, { "name": "Unavailable", "description": "503: the bidder's objects are not readable yet." }, { "name": "ReadFailed", "description": "502: the read failed; the host's log has the detail." } ] }, "vm": { "type": "object", "required": [ "metadata", "spec", "status" ], "properties": { "metadata": { "type": "ref", "ref": "#meta" }, "spec": { "type": "ref", "ref": "#vmSpec" }, "status": { "type": "ref", "ref": "#vmStatus" } } }, "vmStatus": { "type": "object", "properties": { "phase": { "type": "string" }, "lostReason": { "type": "string" } } }, "vmSpec": { "type": "object", "required": [ "vm", "requester" ], "properties": { "vm": { "type": "ref", "ref": "#vmShape" }, "requester": { "type": "ref", "ref": "#vmRequester" }, "contract": { "type": "ref", "ref": "#vmContract" } } }, "vmShape": { "type": "object", "required": [ "cpus" ], "properties": { "cpus": { "type": "integer" } } }, "vmRequester": { "type": "object", "required": [ "did" ], "properties": { "did": { "type": "string", "format": "did" } } }, "vmContract": { "type": "object", "required": [ "receipt" ], "properties": { "receipt": { "type": "ref", "ref": "#vmReceipt" } } }, "vmReceipt": { "type": "object", "required": [ "uri" ], "properties": { "uri": { "type": "string", "format": "at-uri" } } }, "meta": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" }, "deletionTimestamp": { "type": "string", "format": "datetime" } } }, "firecrackerVm": { "type": "object", "required": [ "metadata", "status" ], "properties": { "metadata": { "type": "ref", "ref": "#meta" }, "status": { "type": "ref", "ref": "#firecrackerVmStatus" } } }, "firecrackerVmStatus": { "type": "object", "properties": { "phase": { "type": "string" }, "lostReason": { "type": "string" }, "image": { "type": "ref", "ref": "#image" } } }, "image": { "type": "object", "properties": { "sha256": { "type": "string" }, "fetched": { "type": "boolean" } } } } }