{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/stackit/main/json-schema/stackit-create-nic-payload-schema.json",
  "title": "CreateNicPayload",
  "description": "Object that represents a network interface.",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stackit-iaas-openapi.yml#/components/schemas/CreateNicPayload",
  "properties": {
    "allowedAddresses": {
      "$ref": "#/$defs/AllowedAddresses"
    },
    "createdAt": {
      "allOf": [
        {
          "$ref": "#/$defs/CreatedAt"
        }
      ],
      "readOnly": true
    },
    "description": {
      "$ref": "#/$defs/Description"
    },
    "device": {
      "allOf": [
        {
          "$ref": "#/$defs/UUID"
        }
      ],
      "readOnly": true
    },
    "id": {
      "allOf": [
        {
          "$ref": "#/$defs/UUID"
        }
      ],
      "readOnly": true
    },
    "ipv4": {
      "$ref": "#/$defs/IP"
    },
    "ipv6": {
      "$ref": "#/$defs/IPv6"
    },
    "labels": {
      "$ref": "#/$defs/Labels"
    },
    "mac": {
      "allOf": [
        {
          "$ref": "#/$defs/MAC"
        }
      ],
      "readOnly": true
    },
    "name": {
      "$ref": "#/$defs/GenericName"
    },
    "networkId": {
      "allOf": [
        {
          "$ref": "#/$defs/UUID"
        }
      ],
      "readOnly": true
    },
    "nicSecurity": {
      "allOf": [
        {
          "$ref": "#/$defs/NICSecurity"
        }
      ],
      "default": true
    },
    "securityGroups": {
      "$ref": "#/$defs/UUIDList"
    },
    "status": {
      "description": "Possible values: `ACTIVE`, `DOWN`.",
      "readOnly": true,
      "type": "string",
      "x-extensible-enum": [
        "ACTIVE",
        "DOWN"
      ],
      "x-stackit-logging": true
    },
    "type": {
      "description": "Possible values: `server`, `metadata`, `gateway`, `none`.",
      "readOnly": true,
      "type": "string",
      "x-extensible-enum": [
        "server",
        "metadata",
        "gateway",
        "none"
      ],
      "x-stackit-logging": true
    },
    "updatedAt": {
      "allOf": [
        {
          "$ref": "#/$defs/UpdatedAt"
        }
      ],
      "readOnly": true
    }
  },
  "type": "object",
  "$defs": {
    "AllowedAddresses": {
      "description": "A list of IPs or CIDR notations.",
      "items": {
        "oneOf": [
          {
            "$ref": "#/$defs/IP"
          },
          {
            "$ref": "#/$defs/CIDR"
          }
        ]
      },
      "type": "array"
    },
    "CIDR": {
      "description": "Classless Inter-Domain Routing (CIDR).",
      "pattern": "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$",
      "type": "string"
    },
    "CreatedAt": {
      "description": "Date-time when resource was created.",
      "format": "date-time",
      "type": "string"
    },
    "Description": {
      "description": "Description Object. Allows string up to 255 Characters.",
      "maxLength": 255,
      "type": "string"
    },
    "GenericName": {
      "description": "The name for a General Object. Matches Names and also UUIDs.",
      "maxLength": 127,
      "pattern": "^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$",
      "type": "string"
    },
    "IP": {
      "description": "Object that represents an IP address.",
      "pattern": "((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))",
      "type": "string"
    },
    "IPv6": {
      "description": "String that represents an IPv6 address.",
      "pattern": "^\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$",
      "type": "string"
    },
    "Labels": {
      "description": "Object that represents the labels as key-value pairs of a resource.\nKey constraints: - May contain an optional domain prefix separated by a slash (`/`). - Domain prefix must be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 and 63 characters. - Must begin and end with an alphanumerical character (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics in between. - Keys starting with the prefix `stackit-` or having a domain prefix of `stackit.cloud` (including its subdomains, e.g., `*.stackit.cloud/`) are reserved for system use.\nValue constraints: - Must be less than or equal to 63 characters long (can be empty). - If not empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics in between.\nA resource can have a maximum of 64 labels. Reserved labels are excluded from this count. Providing a `null` value for a key will remove that key.",
      "format": "json",
      "type": "object"
    },
    "MAC": {
      "description": "Object that represents an MAC address.",
      "pattern": "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$",
      "type": "string"
    },
    "NICSecurity": {
      "description": "If this is set to false, then no security groups will apply to this network interface.",
      "type": "boolean"
    },
    "UUID": {
      "description": "Universally Unique Identifier (UUID).",
      "format": "uuid",
      "maxLength": 36,
      "minLength": 36,
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
      "type": "string"
    },
    "UUIDList": {
      "description": "A list of UUIDs.",
      "items": {
        "$ref": "#/$defs/UUID"
      },
      "type": "array"
    },
    "UpdatedAt": {
      "description": "Date-time when resource was last updated.",
      "format": "date-time",
      "type": "string"
    }
  }
}