{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/Port",
  "/properties/SnapshotArns",
  "/properties/SnapshotName",
  "/properties/CacheSubnetGroupName",
  "/properties/ClusterName",
  "/properties/NetworkType",
  "/properties/Engine"
 ],
 "definitions": {
  "CloudWatchLogsDestinationDetails": {
   "additionalProperties": false,
   "properties": {
    "LogGroup": {
     "type": "string"
    }
   },
   "required": [
    "LogGroup"
   ],
   "type": "object"
  },
  "DestinationDetails": {
   "additionalProperties": false,
   "properties": {
    "CloudWatchLogsDetails": {
     "$ref": "#/definitions/CloudWatchLogsDestinationDetails"
    },
    "KinesisFirehoseDetails": {
     "$ref": "#/definitions/KinesisFirehoseDestinationDetails"
    }
   },
   "type": "object"
  },
  "KinesisFirehoseDestinationDetails": {
   "additionalProperties": false,
   "properties": {
    "DeliveryStream": {
     "type": "string"
    }
   },
   "required": [
    "DeliveryStream"
   ],
   "type": "object"
  },
  "LogDeliveryConfigurationRequest": {
   "additionalProperties": false,
   "properties": {
    "DestinationDetails": {
     "$ref": "#/definitions/DestinationDetails"
    },
    "DestinationType": {
     "enum": [
      "cloudwatch-logs",
      "kinesis-firehose"
     ],
     "enumCaseInsensitive": [
      "cloudwatch-logs",
      "kinesis-firehose"
     ],
     "type": "string"
    },
    "LogFormat": {
     "enum": [
      "json",
      "text"
     ],
     "enumCaseInsensitive": [
      "json",
      "text"
     ],
     "type": "string"
    },
    "LogType": {
     "enum": [
      "engine-log",
      "slow-log"
     ],
     "enumCaseInsensitive": [
      "engine-log",
      "slow-log"
     ],
     "type": "string"
    }
   },
   "required": [
    "LogFormat",
    "LogType",
    "DestinationType",
    "DestinationDetails"
   ],
   "type": "object"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "type": "string"
    },
    "Value": {
     "type": "string"
    }
   },
   "required": [
    "Value",
    "Key"
   ],
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/Id"
 ],
 "properties": {
  "AZMode": {
   "enum": [
    "cross-az",
    "single-az"
   ],
   "enumCaseInsensitive": [
    "cross-az",
    "single-az"
   ],
   "type": "string"
  },
  "AutoMinorVersionUpgrade": {
   "type": "boolean"
  },
  "CacheNodeType": {
   "type": "string"
  },
  "CacheParameterGroupName": {
   "type": "string"
  },
  "CacheSecurityGroupNames": {
   "items": {
    "type": "string"
   },
   "type": "array",
   "uniqueItems": false
  },
  "CacheSubnetGroupName": {
   "type": "string"
  },
  "ClusterName": {
   "type": "string"
  },
  "ConfigurationEndpoint": {
   "properties": {
    "Address": {
     "type": "string"
    },
    "Port": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "Engine": {
   "type": "string"
  },
  "EngineVersion": {
   "type": "string"
  },
  "Id": {
   "type": "string"
  },
  "IpDiscovery": {
   "enum": [
    "ipv4",
    "ipv6"
   ],
   "enumCaseInsensitive": [
    "ipv4",
    "ipv6"
   ],
   "type": "string"
  },
  "LogDeliveryConfigurations": {
   "items": {
    "$ref": "#/definitions/LogDeliveryConfigurationRequest"
   },
   "type": "array",
   "uniqueItems": true
  },
  "NetworkType": {
   "enum": [
    "dual_stack",
    "ipv4",
    "ipv6"
   ],
   "enumCaseInsensitive": [
    "dual_stack",
    "ipv4",
    "ipv6"
   ],
   "type": "string"
  },
  "NotificationTopicArn": {
   "type": "string"
  },
  "NumCacheNodes": {
   "type": "integer"
  },
  "Port": {
   "type": "integer"
  },
  "PreferredAvailabilityZone": {
   "type": "string"
  },
  "PreferredAvailabilityZones": {
   "items": {
    "type": "string"
   },
   "type": "array",
   "uniqueItems": true
  },
  "PreferredMaintenanceWindow": {
   "type": "string"
  },
  "RedisEndpoint": {
   "properties": {
    "Address": {
     "type": "string"
    },
    "Port": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "SnapshotArns": {
   "items": {
    "type": "string"
   },
   "type": "array",
   "uniqueItems": true
  },
  "SnapshotName": {
   "type": "string"
  },
  "SnapshotRetentionLimit": {
   "type": "integer"
  },
  "SnapshotWindow": {
   "type": "string"
  },
  "Tags": {
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "type": "array",
   "uniqueItems": false
  },
  "TransitEncryptionEnabled": {
   "type": "boolean"
  },
  "VpcSecurityGroupIds": {
   "format": "AWS::EC2::SecurityGroup.Ids",
   "items": {
    "format": "AWS::EC2::SecurityGroup.Id",
    "type": "string"
   },
   "type": "array",
   "uniqueItems": false
  }
 },
 "readOnlyProperties": [
  "/properties/ConfigurationEndpoint/Address",
  "/properties/Id",
  "/properties/ConfigurationEndpoint/Port",
  "/properties/RedisEndpoint/Port",
  "/properties/RedisEndpoint/Address"
 ],
 "required": [
  "CacheNodeType",
  "NumCacheNodes",
  "Engine"
 ],
 "typeName": "AWS::ElastiCache::CacheCluster"
}
