{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ovh/json-schema/ovh-cloud-project-database-availability-schema.json",
  "title": "cloud.project.database.Availability",
  "description": "Availability of databases engines on cloud projects",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ovh-v1-cloud-openapi.yml#/components/schemas/cloud.project.database.Availability",
  "type": "object",
  "properties": {
    "backup": {
      "allOf": [
        {
          "$ref": "#/$defs/cloud.project.database.BackupTypeEnum"
        }
      ],
      "description": "Defines the type of backup. DEPRECATED: use backups.enable",
      "readOnly": true
    },
    "backupRetentionDays": {
      "type": "integer",
      "description": "Backup retention time of the availability in days. DEPRECATED: use backups.retentionDays",
      "readOnly": true
    },
    "backups": {
      "allOf": [
        {
          "$ref": "#/$defs/cloud.project.database.availability.Backups"
        }
      ],
      "description": "Defines backups strategy for the availability",
      "readOnly": true
    },
    "category": {
      "allOf": [
        {
          "$ref": "#/$defs/cloud.project.database.engine.CategoryEnum"
        }
      ],
      "description": "Category of the engine",
      "readOnly": true
    },
    "default": {
      "type": "boolean",
      "description": "Whether this availability can be used by default",
      "readOnly": true
    },
    "endOfLife": {
      "type": [
        "string",
        "null"
      ],
      "description": "End of life of the product. DEPRECATED: use lifecycle.endOfLife",
      "format": "date",
      "readOnly": true
    },
    "engine": {
      "type": "string",
      "description": "Database engine name",
      "readOnly": true
    },
    "flavor": {
      "type": "string",
      "description": "Flavor name. DEPRECATED: use specifications.flavor",
      "readOnly": true
    },
    "lifecycle": {
      "allOf": [
        {
          "$ref": "#/$defs/cloud.project.database.availability.Lifecycle"
        }
      ],
      "description": "Defines the lifecycle of the availability",
      "readOnly": true
    },
    "maxDiskSize": {
      "type": "integer",
      "description": "Maximum possible disk size in GB. DEPRECATED: use specifications.storage.maximum",
      "readOnly": true
    },
    "maxNodeNumber": {
      "type": "integer",
      "description": "Maximum nodes of the cluster. DEPRECATED: use specifications.nodes.maximum",
      "readOnly": true
    },
    "minDiskSize": {
      "type": "integer",
      "description": "Minimum possible disk size in GB. DEPRECATED: use specifications.storage.minimum",
      "readOnly": true
    },
    "minNodeNumber": {
      "type": "integer",
      "description": "Minimum nodes of the cluster. DEPRECATED: use specifications.nodes.minimum",
      "readOnly": true
    },
    "network": {
      "allOf": [
        {
          "$ref": "#/$defs/cloud.project.database.NetworkTypeEnum"
        }
      ],
      "description": "Type of network. DEPRECATED: use specifications.network",
      "readOnly": true
    },
    "plan": {
      "type": "string",
      "description": "Plan name",
      "readOnly": true
    },
    "planCode": {
      "type": "string",
      "description": "Billing plan code",
      "readOnly": true
    },
    "planCodeStorage": {
      "type": "string",
      "description": "Billing plan code for storage",
      "readOnly": true
    },
    "planCodes": {
      "allOf": [
        {
          "$ref": "#/$defs/cloud.project.database.availability.PlanCodes"
        }
      ],
      "description": "Split pricing plan codes",
      "nullable": true,
      "readOnly": true
    },
    "region": {
      "type": "string",
      "description": "Region name",
      "readOnly": true
    },
    "specifications": {
      "allOf": [
        {
          "$ref": "#/$defs/cloud.project.database.availability.Specifications"
        }
      ],
      "description": "Defines the technical specifications of the availability",
      "readOnly": true
    },
    "startDate": {
      "type": "string",
      "description": "Date of the release of the product. DEPRECATED: use lifecycle.startDate",
      "format": "date",
      "readOnly": true
    },
    "status": {
      "allOf": [
        {
          "$ref": "#/$defs/cloud.project.database.availability.StatusEnum"
        }
      ],
      "description": "Status of the availability. DEPRECATED: use lifecycle.status",
      "readOnly": true
    },
    "stepDiskSize": {
      "type": "integer",
      "description": "Flex disk size step in GB. DEPRECATED: use specifications.storage.step",
      "readOnly": true
    },
    "upstreamEndOfLife": {
      "type": [
        "string",
        "null"
      ],
      "description": "End of life of the upstream product. DEPRECATED: use lifecycle",
      "format": "date",
      "readOnly": true
    },
    "version": {
      "type": "string",
      "description": "Version name",
      "readOnly": true
    }
  },
  "$defs": {
    "cloud.project.database.BackupTypeEnum": {
      "type": "string",
      "description": "Type of backup for the cluster",
      "enum": [
        "automatic",
        "manual",
        "none",
        "pitr",
        "snapshot"
      ]
    },
    "cloud.project.database.NetworkTypeEnum": {
      "type": "string",
      "description": "Type of network in which the databases cluster are",
      "enum": [
        "private",
        "public"
      ]
    },
    "cloud.project.database.availability.Backups": {
      "type": "object",
      "description": "Backups availability of databases engines on cloud projects",
      "properties": {
        "available": {
          "type": "boolean",
          "description": "Defines whether the backups are available for this offer",
          "readOnly": true
        },
        "retentionDays": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Number of retention days for the backups",
          "readOnly": true
        }
      }
    },
    "cloud.project.database.availability.Lifecycle": {
      "type": "object",
      "description": "Availability of databases engines on cloud projects",
      "properties": {
        "endOfLife": {
          "type": [
            "string",
            "null"
          ],
          "description": "End of life of the product",
          "format": "date",
          "readOnly": true
        },
        "endOfSale": {
          "type": [
            "string",
            "null"
          ],
          "description": "End of sale of the product",
          "format": "date",
          "readOnly": true
        },
        "startDate": {
          "type": "string",
          "description": "Date of the release of the product",
          "format": "date",
          "readOnly": true
        },
        "status": {
          "allOf": [
            {
              "$ref": "#/$defs/cloud.project.database.availability.StatusEnum"
            }
          ],
          "description": "Status of the availability",
          "readOnly": true
        }
      }
    },
    "cloud.project.database.availability.PlanCodes": {
      "type": "object",
      "description": "Split pricing plan codes for database availability",
      "properties": {
        "backup": {
          "type": [
            "string",
            "null"
          ],
          "description": "Billing plan code for backup",
          "readOnly": true
        },
        "compute": {
          "type": "string",
          "description": "Billing plan code for compute",
          "readOnly": true
        },
        "storage": {
          "type": [
            "string",
            "null"
          ],
          "description": "Billing plan code for storage",
          "readOnly": true
        }
      }
    },
    "cloud.project.database.availability.Specifications": {
      "type": "object",
      "description": "Specifications of the availability of databases engines on cloud projects",
      "properties": {
        "flavor": {
          "type": "string",
          "description": "Flavor name",
          "readOnly": true
        },
        "network": {
          "allOf": [
            {
              "$ref": "#/$defs/cloud.project.database.NetworkTypeEnum"
            }
          ],
          "description": "Type of network",
          "readOnly": true
        },
        "nodes": {
          "allOf": [
            {
              "$ref": "#/$defs/cloud.project.database.availability.specifications.Nodes"
            }
          ],
          "description": "Specification of the nodes",
          "readOnly": true
        },
        "storage": {
          "allOf": [
            {
              "$ref": "#/$defs/cloud.project.database.availability.specifications.Storage"
            }
          ],
          "description": "Specification of the storage",
          "nullable": true,
          "readOnly": true
        }
      }
    },
    "cloud.project.database.availability.StatusEnum": {
      "type": "string",
      "description": "Possible status for the availability",
      "enum": [
        "BETA",
        "DEPRECATED",
        "END_OF_LIFE",
        "END_OF_SALE",
        "STABLE",
        "UNAVAILABLE"
      ]
    },
    "cloud.project.database.availability.specifications.Nodes": {
      "type": "object",
      "description": "Specifications of the nodes for availabilities of databases engines on cloud projects",
      "properties": {
        "maximum": {
          "type": "integer",
          "description": "Maximum number of nodes of the availability",
          "readOnly": true
        },
        "minimum": {
          "type": "integer",
          "description": "Minimum number of nodes of the availability",
          "readOnly": true
        }
      }
    },
    "cloud.project.database.availability.specifications.Storage": {
      "type": "object",
      "description": "Specifications of the storage for availabilities of databases engines on cloud projects",
      "properties": {
        "maximum": {
          "allOf": [
            {
              "$ref": "#/$defs/complexType.UnitAndValue_long"
            }
          ],
          "description": "Maximum storage of the availability",
          "readOnly": true
        },
        "minimum": {
          "allOf": [
            {
              "$ref": "#/$defs/complexType.UnitAndValue_long"
            }
          ],
          "description": "Minimum storage of the availability",
          "readOnly": true
        },
        "step": {
          "allOf": [
            {
              "$ref": "#/$defs/complexType.UnitAndValue_long"
            }
          ],
          "description": "Memory step that can be added between minimum and maximum",
          "nullable": true,
          "readOnly": true
        },
        "typeSelection": {
          "type": [
            "array",
            "null"
          ],
          "description": "Ordered rules mapping a requested disk size to the disk type that will be provisioned; the first rule whose conditions all match wins",
          "items": {
            "$ref": "#/$defs/cloud.project.database.availability.specifications.storage.TypeSelection"
          },
          "readOnly": true
        }
      }
    },
    "cloud.project.database.availability.specifications.storage.TypeSelection": {
      "type": "object",
      "description": "Ordered rule mapping a requested disk size to the disk type that will be provisioned. The first rule whose conditions all match wins",
      "properties": {
        "if": {
          "type": "array",
          "description": "Conditions that must all match for this rule to apply",
          "items": {
            "$ref": "#/$defs/cloud.project.database.availability.specifications.storage.typeSelection.Condition"
          },
          "readOnly": true
        },
        "then": {
          "type": "string",
          "description": "Disk type provisioned when the conditions match",
          "readOnly": true
        }
      }
    },
    "cloud.project.database.availability.specifications.storage.typeSelection.Condition": {
      "type": "object",
      "description": "Single predicate over a storage attribute of a disk type selection rule (e.g. size gt 100)",
      "properties": {
        "key": {
          "type": "string",
          "description": "Storage attribute the predicate applies to (e.g. size)",
          "readOnly": true
        },
        "operation": {
          "allOf": [
            {
              "$ref": "#/$defs/cloud.project.database.availability.specifications.storage.typeSelection.condition.OperationEnum"
            }
          ],
          "description": "Comparison operator of the predicate",
          "readOnly": true
        },
        "value": {
          "type": "integer",
          "description": "Value the storage attribute is compared against",
          "readOnly": true
        }
      }
    },
    "cloud.project.database.availability.specifications.storage.typeSelection.condition.OperationEnum": {
      "type": "string",
      "description": "Comparison operator of a disk type selection condition",
      "enum": [
        "gt",
        "gte"
      ]
    },
    "cloud.project.database.engine.CategoryEnum": {
      "type": "string",
      "description": "Different categories of engines",
      "enum": [
        "analysis",
        "operational",
        "streaming"
      ]
    },
    "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"
        }
      }
    }
  }
}