{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/monacloud/main/json-schema/monacloud-lxc-create-request-schema.json",
  "title": "LxcCreateRequest",
  "description": "LXC create payload. Callers may either:\n  • pass `package_slug` (e.g. \"standard-2\") and let the API expand it\n    into cpu/ram_gb/disk_gb from the matching active package, or\n  • pass `cpu`, `ram_gb`, and `disk_gb` directly for a custom spec.\nExactly one of those two shapes is required; mixing them is a 422.",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/monacloud-vn-openapi.json#/components/schemas/LxcCreateRequest",
  "properties": {
    "app_name": {
      "type": "string",
      "maxLength": 80,
      "minLength": 2,
      "title": "App Name"
    },
    "package_slug": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Package Slug"
    },
    "cpu": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 16,
          "minimum": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Cpu"
    },
    "ram_gb": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 64,
          "minimum": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Ram Gb"
    },
    "disk_gb": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 1000,
          "minimum": 10
        },
        {
          "type": "null"
        }
      ],
      "title": "Disk Gb"
    },
    "hostname": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ],
      "title": "Hostname"
    },
    "billing_mode": {
      "type": "string",
      "enum": [
        "hourly",
        "monthly"
      ],
      "title": "Billing Mode",
      "default": "hourly"
    },
    "plan_code": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64,
          "minLength": 2
        },
        {
          "type": "null"
        }
      ],
      "title": "Plan Code"
    },
    "period": {
      "type": "string",
      "enum": [
        "month",
        "year"
      ],
      "title": "Period",
      "default": "month"
    }
  },
  "type": "object",
  "required": [
    "app_name"
  ]
}