{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/noderings-com/json-schema/noderings-com-v1-create-virtual-machine-request-schema.json",
  "title": "v1CreateVirtualMachineRequest",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/noderings-com-openapi.json#/components/schemas/v1CreateVirtualMachineRequest",
  "type": "object",
  "properties": {
    "hostname": {
      "type": "string"
    },
    "planId": {
      "type": "string"
    },
    "regionId": {
      "type": "string",
      "title": "Required region ID where the VM should be created"
    },
    "distro": {
      "$ref": "#/$defs/v1Distro"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "title": "Tags for categorizing the virtual machine (e.g., \"database\", \"webserver\")"
    },
    "sshKeyIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "SSH key IDs to use for VM access (one or more). Either user_data, ssh_key_ids, or password must be provided, but only one."
    },
    "password": {
      "type": "string",
      "description": "Password for VM access. Either user_data, ssh_key_ids, or password must be provided, but only one."
    },
    "userData": {
      "type": "string",
      "description": "User data for CloudInit. Either user_data, ssh_key_ids, password, or cloud_init_user_data_id must be provided, but only one."
    },
    "cloudInitUserDataId": {
      "type": "string",
      "description": "Saved client cloud-init user_data profile ID. Replaces provider user_data at VM create."
    },
    "instantAppId": {
      "type": "string",
      "description": "Platform Instant App ID. Replaces provider user_data. Mutually exclusive with\nuser_data and cloud_init_user_data_id. Requires password or ssh_key_ids."
    },
    "idempotencyKey": {
      "type": "string",
      "description": "Client-generated UUID for idempotent create retries. Required for all creates."
    },
    "coupon": {
      "$ref": "#/$defs/v1CouponInput"
    },
    "instantAppVariables": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Optional Instant App form overrides (schema from InstantApp.metadata.variables).\nUnknown keys are rejected. Omitted keys use catalog defaults."
    }
  },
  "$defs": {
    "v1CouponInput": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        }
      },
      "description": "Optional code on a resource create request."
    },
    "v1Distro": {
      "type": "string",
      "enum": [
        "DISTRO_UNSPECIFIED",
        "DISTRO_UBUNTU_22_04",
        "DISTRO_UBUNTU_24_04",
        "DISTRO_UBUNTU_26_04",
        "DISTRO_FEDORA_43",
        "DISTRO_FEDORA_44",
        "DISTRO_DEBIAN_12",
        "DISTRO_DEBIAN_13",
        "DISTRO_CENTOS_9",
        "DISTRO_CENTOS_10",
        "DISTRO_ROCKY_9",
        "DISTRO_ROCKY_10",
        "DISTRO_ALMALINUX_9",
        "DISTRO_ALMALINUX_10"
      ],
      "default": "DISTRO_UNSPECIFIED",
      "description": "- DISTRO_UBUNTU_22_04: Ubuntu distributions\n - DISTRO_FEDORA_43: Fedora distributions\n - DISTRO_DEBIAN_12: Debian distributions\n - DISTRO_CENTOS_9: CentOS distributions\n - DISTRO_ROCKY_9: Rocky Linux distributions\n - DISTRO_ALMALINUX_9: AlmaLinux distributions",
      "title": "Distribution enum for VM templates"
    }
  }
}