{
    "$schema": "http://json-schema.org/schema#",
    "type": "object",
    "properties": {
        "type": {
            "type": "string",
            "description": "The service type (should always be 'redis')",
            "pattern": "^redis$",
            "errorMessage": "Must be 'redis'"
        },
        "instance_type": {
            "type": "string",
            "errorMessage": "Must be a string"
        },
        "redis_version": {
            "type": "string",
            "errorMessage": "Must be a string"
        },
        "description": {
            "type": "string",
            "errorMessage": "Must be a string"
        },
        "maintenance_window": {
            "type": "string",
            "errorMessage": "Must be a string"
        },
        "read_replicas": {
            "type": "number",
            "minimum": 0,
            "maximum": 5,
            "errorMessage": "May only have a value of 0-5"
        },
        "snapshot_window": {
            "type": "string",
            "errorMessage": "Must be a string"
        },
        "cache_parameters": {
            "type": "object",
            "description": "Any cache_parameters you wish for your Redis cluster.",
            "patternProperties": {
                "^.*$": {
                    "anyOf": [
                        {"type": "string"},
                        {"type": "number"}
                    ]
                }
            },
            "errorMessage": "Must contain 1 or more simple key/value pairs where the values are strings or numbers",
            "additionalProperties": false
        },
        "tags": {
            "type": "object",
            "description": "An arbitrary list of key/value pairs to be added as tags to the service",
            "patternProperties": {
                "^.*$": {
                    "anyOf": [
                        {"type": "string"},
                        {"type": "number"}
                    ]
                }
            },
            "errorMessage": "Must contain 1 or more simple key/value pairs where the values are strings or numbers",
            "additionalProperties": false
        }
    },
    "required": [
        "type",
        "instance_type",
        "redis_version"
    ],
    "additionalProperties": false,
    "errorMessage": {
        "required": {
            "type": "The 'type' parameter is required",
            "instance_type": "The 'instance_type' parameter is required",
            "redis_version": "The 'redis_version' parameter is required"
        },
        "additionalProperties": "Invalid/Unknown property specified"
    }
}