{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "required": [
        "DomainName"
    ],
    "properties": {
        "DomainName": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9\\-]+$"
        },
        "AccessPolicies": {
            "type": "string",
            "pattern": ".+"
        },
        "AdvancedOptions": {
            "type": "object",
            "patternProperties": {
                ".+": {
                    "type": "string",
                    "pattern": ".+"
                }
            },
            "additionalProperties": false
        },
        "EBSOptions": {
            "type": "object",
            "properties": {
                "EBSEnabled": {
                    "type": "string",
                    "enum": [
                        "true",
                        "false"
                    ]
                },
                "Iops": {
                    "type": "string",
                    "pattern": "^\\d+$"
                },
                "VolumeSize": {
                    "type": "string",
                    "pattern": "^\\d+$"
                },
                "VolumeType": {
                    "type": "string",
                    "enum": [
                        "standard",
                        "gp2",
                        "io1"
                    ]
                }
            },
            "additionalProperties": false
        },
        "ElasticsearchClusterConfig": {
            "type": "object",
            "properties": {
                "DedicatedMasterCount": {
                    "type": "string",
                    "pattern": "^\\d$"
                },
                "DedicatedMasterEnabled": {
                    "type": "string",
                    "enum": [
                        "true",
                        "false"
                    ]
                },
                "DedicatedMasterType": {
                    "$ref": "#/definitions/ElasticseachNodeType"
                },
                "InstanceCount": {
                    "type": "string",
                    "pattern": "^\\d$"
                },
                "InstanceType": {
                    "$ref": "#/definitions/ElasticseachNodeType"
                },
                "ZoneAwarenessEnabled": {
                    "type": "string",
                    "enum": [
                        "true",
                        "false"
                    ]
                }
            },
            "additionalProperties": false
        },
        "SnapshotOptions": {
            "type": "object",
            "properties": {
                "AutomatedSnapshotStartHour": {
                    "type": "string",
                    "pattern": "^\\d$"
                }
            },
            "additionalProperties": false
        }
    },
    "additionalProperties": false,
    "definitions": {
        "ElasticseachNodeType": {
            "type": "string",
            "enum": [
                "m3.medium.elasticsearch",
                "m3.large.elasticsearch",
                "m3.xlarge.elasticsearch",
                "m3.2xlarge.elasticsearch",
                "t2.micro.elasticsearch",
                "t2.small.elasticsearch",
                "t2.medium.elasticsearch",
                "r3.large.elasticsearch",
                "r3.xlarge.elasticsearch",
                "r3.2xlarge.elasticsearch",
                "r3.4xlarge.elasticsearch",
                "r3.8xlarge.elasticsearch",
                "i2.xlarge.elasticsearch",
                "i2.2xlarge.elasticsearch"
            ]
        }
    }
}