167 lines
5.6 KiB
JSON
167 lines
5.6 KiB
JSON
|
|
{
|
|
"$schema": "http://json-schema.org/draft-04/hyper-schema",
|
|
|
|
"id": "zone",
|
|
|
|
"title": "zone",
|
|
"description": "Zone",
|
|
"additionalProperties": false,
|
|
|
|
"required": ["zone"],
|
|
|
|
"properties": {
|
|
"zone": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["name"],
|
|
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "Zone identifier",
|
|
"format": "uuid",
|
|
"readOnly": true
|
|
},
|
|
"pool_id": {
|
|
"type": "string",
|
|
"description": "Pool identifier",
|
|
"format": "uuid",
|
|
"immutable": true
|
|
},
|
|
"project_id": {
|
|
"type": ["string", "null"],
|
|
"description": "Project identifier",
|
|
"maxLength": 36,
|
|
"immutable": true
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Zone name",
|
|
"format": "domainname",
|
|
"maxLength": 255,
|
|
"immutable": true
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Zone Type",
|
|
"enum": ["PRIMARY", "SECONDARY"]
|
|
},
|
|
"masters": {
|
|
"type": ["array", "null"],
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "Masters for this Zone",
|
|
"uniqueItems": true
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"description": "Hostmaster email address",
|
|
"format": "email",
|
|
"maxLength": 255
|
|
},
|
|
"description": {
|
|
"type": ["string", "null"],
|
|
"description": "Description for the zone",
|
|
"maxLength": 160
|
|
},
|
|
"ttl": {
|
|
"type": "integer",
|
|
"description": "Default time to live",
|
|
"minimum": 0,
|
|
"maximum": 2147483647
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "Zone Status",
|
|
"enum": ["ACTIVE", "PENDING", "ERROR"],
|
|
"readOnly": true
|
|
},
|
|
"action": {
|
|
"type": "string",
|
|
"description": "Zone Action",
|
|
"enum": ["CREATE", "DELETE", "UPDATE", "NONE"],
|
|
"readOnly": true
|
|
},
|
|
"serial": {
|
|
"type": "integer",
|
|
"description": "Zone serial number",
|
|
"minimum": 0,
|
|
"maximum": 4294967295,
|
|
"readOnly": true
|
|
},
|
|
"version": {
|
|
"type": "integer",
|
|
"description": "Zone version number",
|
|
"readOnly": true
|
|
},
|
|
"created_at": {
|
|
"type": "string",
|
|
"description": "Date and time of Zone creation",
|
|
"format": "date-time",
|
|
"readOnly": true
|
|
},
|
|
"updated_at": {
|
|
"type": ["string", "null"],
|
|
"description": "Date and time of last zone modification",
|
|
"format": "date-time",
|
|
"readOnly": true
|
|
},
|
|
"transferred_at": {
|
|
"type": ["string", "null"],
|
|
"description": "Date and time of last successful transfer",
|
|
"format": "date-time",
|
|
"readOnly": true
|
|
},
|
|
"links": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
|
|
"properties": {
|
|
"self": {
|
|
"type": "string",
|
|
"format": "url"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"oneOf": [
|
|
{
|
|
"description": "Primary zone",
|
|
"required": ["email"],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["PRIMARY"]
|
|
},
|
|
"masters": {
|
|
"type": ["null", "array"],
|
|
"maxItems": 0
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"description": "Secondary zone",
|
|
"required": ["type", "masters"],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["SECONDARY"]
|
|
},
|
|
"masters": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"format": "ipandport"
|
|
},
|
|
"description": "Masters for this Zone",
|
|
"uniqueItems": true,
|
|
"minItems": 1
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
} |