{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/stackit/main/json-schema/stackit-list-instances-response-schema.json",
  "title": "ListInstancesResponse",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stackit-model-experiments-openapi.yml#/components/schemas/ListInstancesResponse",
  "properties": {
    "instances": {
      "items": {
        "$ref": "#/$defs/Instance"
      },
      "type": "array"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "instances"
  ],
  "type": "object",
  "$defs": {
    "DeletedExperimentRetention": {
      "description": "The duration to retain experiments marked for deletion before they are permanently purged. Min: 1d, Max: 90d.",
      "pattern": "^([0-9]+(\\.[0-9]+)?d)?([0-9]+(\\.[0-9]+)?h)?([0-9]+(\\.[0-9]+)?m)?([0-9]+(\\.[0-9]+)?s)?$",
      "type": "string"
    },
    "Instance": {
      "properties": {
        "bucketName": {
          "pattern": "^model-experiments-[a-zA-Z0-9]+$",
          "type": "string"
        },
        "deletedExperimentRetention": {
          "$ref": "#/$defs/DeletedExperimentRetention"
        },
        "description": {
          "maxLength": 160,
          "pattern": "^[0-9a-zA-Z\\s.:\\/\\-]+$",
          "type": "string"
        },
        "errorMessage": {
          "type": "string"
        },
        "id": {
          "format": "uuid",
          "type": "string"
        },
        "labels": {
          "$ref": "#/$defs/Labels"
        },
        "name": {
          "maxLength": 64,
          "minLength": 1,
          "pattern": "^[0-9a-zA-Z\\s_-]+$",
          "type": "string"
        },
        "region": {
          "type": "string"
        },
        "state": {
          "enum": [
            "pending",
            "creating",
            "updating",
            "active",
            "deleting",
            "impaired",
            "reconciling"
          ],
          "type": "string"
        },
        "url": {
          "maxLength": 1000,
          "pattern": "^[0-9a-zA-Z\\s.:\\/\\-]+$",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "state",
        "url"
      ],
      "type": "object"
    },
    "Labels": {
      "additionalProperties": {
        "maxLength": 63,
        "pattern": "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$",
        "type": "string"
      },
      "description": "Object that represents the labels of an object. Regex for keys: `^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys.",
      "type": "object"
    }
  }
}