{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ovh/json-schema/ovh-hosting-private-database-service-schema.json",
  "title": "hosting.privateDatabase.Service",
  "description": "Web Cloud Database",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ovh-v1-hosting-privateDatabase-openapi.yml#/components/schemas/hosting.privateDatabase.Service",
  "type": "object",
  "properties": {
    "capabilities": {
      "type": "array",
      "description": "Private database capabilities",
      "items": {
        "$ref": "#/$defs/hosting.privateDatabase.Capability"
      },
      "readOnly": true
    },
    "cpu": {
      "type": "integer",
      "description": "Number of cpu on your private database",
      "readOnly": true
    },
    "datacenter": {
      "allOf": [
        {
          "$ref": "#/$defs/hosting.privateDatabase.DatacenterEnum"
        }
      ],
      "description": "Datacenter where this private database is located",
      "readOnly": true
    },
    "displayName": {
      "type": [
        "string",
        "null"
      ],
      "description": "Set the name displayed in customer panel for your private database (max 50 chars)"
    },
    "graphEndpoint": {
      "allOf": [
        {
          "$ref": "#/$defs/hosting.privateDatabase.GraphEndpoint"
        }
      ],
      "description": "Parameters required to query metrics from OpenTSDB",
      "nullable": true,
      "readOnly": true
    },
    "guiURL": {
      "type": [
        "string",
        "null"
      ],
      "description": "URL for the graphical user interface",
      "readOnly": true
    },
    "hostname": {
      "type": "string",
      "description": "Private database hostname",
      "readOnly": true
    },
    "hostnameFtp": {
      "type": [
        "string",
        "null"
      ],
      "description": "Private database ftp hostname",
      "readOnly": true
    },
    "infrastructure": {
      "allOf": [
        {
          "$ref": "#/$defs/hosting.privateDatabase.InfrastructureEnum"
        }
      ],
      "description": "Infrastructure where service was stored",
      "readOnly": true
    },
    "ip": {
      "allOf": [
        {
          "$ref": "#/$defs/ipv4"
        }
      ],
      "description": "Private database ip",
      "nullable": true,
      "readOnly": true
    },
    "isUnderMaintenance": {
      "type": "boolean",
      "description": "Is the service under maintenance",
      "readOnly": true
    },
    "lastCheck": {
      "type": "string",
      "description": "Date of the last data synchronization",
      "format": "date-time",
      "readOnly": true
    },
    "offer": {
      "allOf": [
        {
          "$ref": "#/$defs/hosting.privateDatabase.OfferEnum"
        }
      ],
      "description": "Type of the private database offer",
      "readOnly": true
    },
    "port": {
      "type": "integer",
      "description": "Private database service port",
      "readOnly": true
    },
    "portFtp": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Private database ftp port",
      "readOnly": true
    },
    "quotaSize": {
      "allOf": [
        {
          "$ref": "#/$defs/complexType.UnitAndValue_long"
        }
      ],
      "description": "Space allowed on your private database",
      "readOnly": true
    },
    "quotaUsed": {
      "allOf": [
        {
          "$ref": "#/$defs/complexType.UnitAndValue_long"
        }
      ],
      "description": "Total space used on your private database",
      "readOnly": true
    },
    "ram": {
      "allOf": [
        {
          "$ref": "#/$defs/complexType.UnitAndValue_long"
        }
      ],
      "description": "Amount of ram on your private database",
      "readOnly": true
    },
    "server": {
      "type": "string",
      "description": "Private database server name",
      "readOnly": true
    },
    "serviceName": {
      "type": "string",
      "description": "Service name",
      "readOnly": true
    },
    "state": {
      "allOf": [
        {
          "$ref": "#/$defs/hosting.privateDatabase.StateEnum"
        }
      ],
      "description": "Private database state",
      "readOnly": true
    },
    "tlsCa": {
      "type": [
        "string",
        "null"
      ],
      "description": "Return the TLS certificate authority used by the private database",
      "readOnly": true
    },
    "type": {
      "allOf": [
        {
          "$ref": "#/$defs/hosting.privateDatabase.TypeEnum"
        }
      ],
      "description": "Private database type",
      "readOnly": true
    },
    "version": {
      "allOf": [
        {
          "$ref": "#/$defs/hosting.privateDatabase.VersionEnum"
        }
      ],
      "description": "Private database version",
      "readOnly": true
    },
    "versionLabel": {
      "type": "string",
      "description": "Private database version label",
      "readOnly": true
    },
    "versionNumber": {
      "type": "number",
      "description": "Private database version number",
      "readOnly": true
    }
  },
  "$defs": {
    "complexType.UnitAndValue_long": {
      "type": "object",
      "description": "A numeric value tagged with its unit",
      "properties": {
        "unit": {
          "type": "string",
          "description": "Unit of the value",
          "readOnly": true
        },
        "value": {
          "type": "integer"
        }
      }
    },
    "hosting.privateDatabase.Capability": {
      "type": "object",
      "description": "Private database capability",
      "properties": {
        "create": {
          "type": "boolean",
          "description": "Can the object be created",
          "readOnly": true
        },
        "delete": {
          "type": "boolean",
          "description": "Can the object be deleted",
          "readOnly": true
        },
        "object": {
          "type": "string",
          "description": "Object name",
          "readOnly": true
        },
        "update": {
          "type": "boolean",
          "description": "Can the object be updated",
          "readOnly": true
        }
      }
    },
    "hosting.privateDatabase.DatacenterEnum": {
      "type": "string",
      "description": "Private database datacenter",
      "enum": [
        "bhs1",
        "gra1",
        "gra2",
        "gra3"
      ]
    },
    "hosting.privateDatabase.GraphEndpoint": {
      "type": "object",
      "description": "Parameters required to query metrics from OpenTSDB",
      "properties": {
        "host": {
          "type": [
            "string",
            "null"
          ],
          "description": "The OpenTSDB host",
          "readOnly": true
        },
        "readToken": {
          "type": [
            "string",
            "null"
          ],
          "description": "A read-only token",
          "format": "password",
          "readOnly": true
        },
        "readTokenId": {
          "type": [
            "string",
            "null"
          ],
          "description": "A read-only token ID",
          "readOnly": true
        }
      }
    },
    "hosting.privateDatabase.InfrastructureEnum": {
      "type": "string",
      "description": "Private database infrastructure",
      "enum": [
        "docker"
      ]
    },
    "hosting.privateDatabase.OfferEnum": {
      "type": "string",
      "description": "Available offers",
      "enum": [
        "classic",
        "public"
      ]
    },
    "hosting.privateDatabase.StateEnum": {
      "type": "string",
      "description": "Private database state",
      "enum": [
        "detached",
        "restartPending",
        "startPending",
        "started",
        "stopPending",
        "stopped"
      ]
    },
    "hosting.privateDatabase.TypeEnum": {
      "type": "string",
      "description": "Private database type",
      "enum": [
        "mariadb",
        "mysql",
        "postgresql",
        "valkey"
      ]
    },
    "hosting.privateDatabase.VersionEnum": {
      "type": "string",
      "description": "Private database version",
      "enum": [
        "mariadb_10.11",
        "mariadb_11.4",
        "mariadb_11.8",
        "mysql_8.4",
        "postgresql_14",
        "postgresql_15",
        "postgresql_16",
        "postgresql_17",
        "postgresql_18",
        "valkey_7.2",
        "valkey_8.1",
        "valkey_9.1"
      ]
    },
    "ipv4": {
      "type": "string",
      "description": "IPv4 address (e.g., 192.0.2.0)",
      "format": "ipv4"
    }
  }
}