{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ovh/json-schema/ovh-dedicated-housing-housing-with-iam-schema.json",
  "title": "dedicated.housing.HousingWithIAM",
  "description": "Housing bay",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ovh-v1-dedicated-housing-openapi.yml#/components/schemas/dedicated.housing.HousingWithIAM",
  "type": "object",
  "properties": {
    "datacenter": {
      "allOf": [
        {
          "$ref": "#/$defs/dedicated.housing.DatacenterEnum"
        }
      ],
      "description": "Housing bay datacenter",
      "nullable": true,
      "readOnly": true
    },
    "iam": {
      "allOf": [
        {
          "$ref": "#/$defs/iam.ResourceMetadata"
        }
      ],
      "description": "IAM resource metadata",
      "nullable": true,
      "readOnly": true
    },
    "name": {
      "type": "string",
      "description": "The name you give to the bay",
      "readOnly": true
    },
    "network": {
      "type": "array",
      "description": "Housing bay network",
      "items": {
        "$ref": "#/$defs/dedicated.housing.NetworkInfo"
      },
      "readOnly": true
    },
    "options": {
      "allOf": [
        {
          "$ref": "#/$defs/dedicated.housing.Options"
        }
      ],
      "description": "Housing bay options",
      "readOnly": true
    },
    "rack": {
      "type": "string",
      "description": "The bay's description",
      "readOnly": true
    },
    "securityCode": {
      "type": "string",
      "description": "Bay Security code",
      "readOnly": true
    }
  },
  "$defs": {
    "dedicated.housing.DatacenterEnum": {
      "type": "string",
      "description": "Housing bay datacenters",
      "enum": [
        "gsw",
        "pdc1"
      ]
    },
    "dedicated.housing.IpInfo": {
      "type": "object",
      "description": "A structure describing the Bay's network configuration",
      "properties": {
        "gateway": {
          "allOf": [
            {
              "$ref": "#/$defs/ip"
            }
          ],
          "description": "Network gateway of the bay",
          "nullable": true
        },
        "network": {
          "allOf": [
            {
              "$ref": "#/$defs/ipBlock"
            }
          ],
          "description": "Network address of the bay"
        },
        "reservedAddresses": {
          "type": [
            "array",
            "null"
          ],
          "description": "Reserved addresses. You should not use them in your network",
          "items": {
            "$ref": "#/$defs/ip"
          }
        }
      }
    },
    "dedicated.housing.LinkInfo": {
      "type": "object",
      "description": "A structure describing the Bay`s link information",
      "properties": {
        "port": {
          "type": "string",
          "description": "Router port number"
        },
        "router": {
          "type": "string",
          "description": "Router in charge of your network"
        }
      }
    },
    "dedicated.housing.NetworkInfo": {
      "type": "object",
      "description": "A structure describing the Bay`s network configuration",
      "properties": {
        "ipv4": {
          "allOf": [
            {
              "$ref": "#/$defs/dedicated.housing.IpInfo"
            }
          ],
          "description": "IPv4 network information",
          "nullable": true
        },
        "ipv6": {
          "allOf": [
            {
              "$ref": "#/$defs/dedicated.housing.IpInfo"
            }
          ],
          "description": "IPv6 network information",
          "nullable": true
        },
        "link": {
          "allOf": [
            {
              "$ref": "#/$defs/dedicated.housing.LinkInfo"
            }
          ],
          "description": "Router related information",
          "nullable": true
        }
      }
    },
    "dedicated.housing.Options": {
      "type": "object",
      "description": "A structure describing current housing options",
      "properties": {
        "apcCount": {
          "type": "integer",
          "description": "Number of APC connected to this housing bay"
        },
        "handsneyes": {
          "type": "boolean",
          "description": "Is this housing bay have handsneyes service"
        },
        "highAvailabilityRouting": {
          "type": "string",
          "description": "High Availability routing service offer"
        }
      }
    },
    "iam.ResourceMetadata": {
      "type": "object",
      "description": "IAM resource metadata embedded in services models",
      "properties": {
        "displayName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Resource display name",
          "readOnly": true
        },
        "id": {
          "type": "string",
          "description": "Unique identifier of the resource",
          "format": "uuid",
          "readOnly": true
        },
        "state": {
          "allOf": [
            {
              "$ref": "#/$defs/iam.ResourceMetadata.StateEnum"
            }
          ],
          "description": "Resource state",
          "nullable": true,
          "readOnly": true
        },
        "tags": {
          "type": [
            "object",
            "null"
          ],
          "description": "Resource tags. Tags that were internally computed are prefixed with ovh:",
          "additionalProperties": {
            "type": "string"
          },
          "readOnly": true
        },
        "urn": {
          "type": "string",
          "description": "Unique resource name used in policies",
          "readOnly": true
        }
      }
    },
    "iam.ResourceMetadata.StateEnum": {
      "type": "string",
      "description": "Resource state",
      "enum": [
        "EXPIRED",
        "IN_CREATION",
        "OK",
        "SUSPENDED"
      ]
    },
    "ip": {
      "type": "string",
      "description": "IP address (e.g., 192.0.2.0)",
      "format": "ipv4"
    },
    "ipBlock": {
      "type": "string",
      "description": "IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)",
      "format": "ip-block"
    }
  }
}