{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-compute-engine/json-schema/google-cloud-compute-engine-node-template-schema.json",
  "title": "NodeTemplate",
  "description": "Represent a sole-tenant Node Template resource.\n\nYou can use a template to define properties for nodes in a node group. For\nmore information, readCreating node groups\nand instances.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-compute-engine-node-templates-api-openapi.yml#/components/schemas/NodeTemplate",
  "properties": {
    "selfLink": {
      "readOnly": true,
      "description": "Output only. [Output Only] Server-defined URL for the resource.",
      "type": "string"
    },
    "nodeTypeFlexibility": {
      "$ref": "#/$defs/NodeTemplateNodeTypeFlexibility",
      "description": "Do not use. Instead, use the node_type property."
    },
    "serverBinding": {
      "$ref": "#/$defs/ServerBinding",
      "description": "Sets the binding properties for the physical server. Valid values include:\n   \n   - *[Default]* RESTART_NODE_ON_ANY_SERVER:\n   Restarts VMs on any available\n   physical server\n   - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same\n   physical server whenever possible\n\n\n\nSee Sole-tenant\nnode options for more information."
    },
    "statusMessage": {
      "type": "string",
      "description": "Output only. [Output Only] An optional, human-readable explanation of the status.",
      "readOnly": true
    },
    "status": {
      "enum": [
        "CREATING",
        "DELETING",
        "INVALID",
        "READY"
      ],
      "readOnly": true,
      "description": "Output only. [Output Only] The status of the node template. One of the following values:CREATING, READY, and DELETING.",
      "type": "string"
    },
    "name": {
      "type": "string",
      "description": "The name of the resource, provided by the client when initially creating\nthe resource. The resource name must be 1-63 characters long, and comply\nwithRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which\ncannot be a dash."
    },
    "nodeAffinityLabels": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Labels to use for node affinity, which will be used in instance scheduling.",
      "type": "object"
    },
    "disks": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LocalDisk"
      }
    },
    "cpuOvercommitType": {
      "type": "string",
      "description": "CPU overcommit.",
      "enum": [
        "CPU_OVERCOMMIT_TYPE_UNSPECIFIED",
        "ENABLED",
        "NONE"
      ]
    },
    "id": {
      "description": "Output only. [Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.",
      "type": "string",
      "format": "uint64",
      "readOnly": true
    },
    "region": {
      "description": "Output only. [Output Only] The name of the region where the node template resides,\nsuch as us-central1.",
      "readOnly": true,
      "type": "string"
    },
    "accelerators": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AcceleratorConfig"
      }
    },
    "kind": {
      "type": "string",
      "readOnly": true,
      "default": "compute#nodeTemplate",
      "description": "Output only. [Output Only] The type of the resource. Alwayscompute#nodeTemplate for node templates."
    },
    "nodeType": {
      "description": "The node type to use for nodes group that are created from this template.",
      "type": "string"
    },
    "creationTimestamp": {
      "type": "string",
      "readOnly": true,
      "description": "Output only. [Output Only] Creation timestamp inRFC3339\ntext format."
    },
    "description": {
      "description": "An optional description of this resource. Provide this property when you\ncreate the resource.",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "AcceleratorConfig": {
      "type": "object",
      "properties": {
        "acceleratorCount": {
          "type": "integer",
          "format": "int32",
          "description": "The number of the guest accelerator cards exposed to this instance."
        },
        "acceleratorType": {
          "description": "Full or partial URL of the accelerator type resource to attach to this\ninstance. For example:projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100\nIf you are creating an instance template, specify only the\naccelerator name.\nSee GPUs on Compute Engine\nfor a full list of accelerator types.",
          "type": "string"
        }
      },
      "description": "A specification of the type and number of accelerator cards attached to the\ninstance."
    },
    "LocalDisk": {
      "type": "object",
      "properties": {
        "diskSizeGb": {
          "description": "Specifies the size of the disk in base-2 GB.",
          "format": "int32",
          "type": "integer"
        },
        "diskType": {
          "type": "string",
          "description": "Specifies the desired disk type on the node. This disk type must be a\nlocal storage type (e.g.: local-ssd).\nNote that for nodeTemplates, this should be the name of the disk type and\nnot its URL."
        },
        "diskCount": {
          "type": "integer",
          "description": "Specifies the number of such disks.",
          "format": "int32"
        }
      }
    },
    "NodeTemplateNodeTypeFlexibility": {
      "type": "object",
      "properties": {
        "localSsd": {
          "type": "string"
        },
        "memory": {
          "type": "string"
        },
        "cpus": {
          "type": "string"
        }
      }
    },
    "ServerBinding": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "RESTART_NODE_ON_ANY_SERVER",
            "RESTART_NODE_ON_MINIMAL_SERVERS",
            "SERVER_BINDING_TYPE_UNSPECIFIED"
          ]
        }
      }
    }
  }
}