{
 "$schema": "https://raw.githubusercontent.com/aws-cloudformation/cloudformation-resource-schema/master/src/main/resources/schema/provider.definition.schema.v1.json",
 "additionalProperties": false,
 "conditionalCreateOnlyProperties": [
  "/properties/PreferredAvailabilityZones",
  "/properties/IpDiscovery"
 ],
 "createOnlyProperties": [
  "/properties/Port",
  "/properties/SnapshotArns",
  "/properties/SnapshotName",
  "/properties/CacheSubnetGroupName",
  "/properties/ClusterName",
  "/properties/Engine",
  "/properties/NetworkType"
 ],
 "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"
  },
  "Endpoint": {
   "additionalProperties": false,
   "properties": {
    "Address": {
     "type": "string"
    },
    "Port": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "KinesisFirehoseDestinationDetails": {
   "additionalProperties": false,
   "properties": {
    "DeliveryStream": {
     "type": "string"
    }
   },
   "required": [
    "DeliveryStream"
   ],
   "type": "object"
  },
  "LogDeliveryConfigurationRequest": {
   "additionalProperties": false,
   "properties": {
    "DestinationDetails": {
     "$ref": "#/definitions/DestinationDetails"
    },
    "DestinationType": {
     "enumCaseInsensitive": [
      "cloudwatch-logs",
      "kinesis-firehose"
     ],
     "type": "string"
    },
    "LogFormat": {
     "enumCaseInsensitive": [
      "json",
      "text"
     ],
     "type": "string"
    },
    "LogType": {
     "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"
  }
 },
 "deprecatedProperties": [
  "/properties/CacheSecurityGroupNames"
 ],
 "primaryIdentifier": [
  "/properties/ClusterName"
 ],
 "properties": {
  "AZMode": {
   "enumCaseInsensitive": [
    "cross-az",
    "single-az"
   ],
   "type": "string"
  },
  "AutoMinorVersionUpgrade": {
   "type": "boolean"
  },
  "CacheNodeType": {
   "type": "string"
  },
  "CacheParameterGroupName": {
   "type": "string"
  },
  "CacheSecurityGroupNames": {
   "insertionOrder": false,
   "items": {
    "type": "string"
   },
   "type": "array",
   "uniqueItems": true
  },
  "CacheSubnetGroupName": {
   "type": "string"
  },
  "ClusterName": {
   "type": "string"
  },
  "ConfigurationEndpoint": {
   "$ref": "#/definitions/Endpoint"
  },
  "Engine": {
   "type": "string"
  },
  "EngineVersion": {
   "type": "string"
  },
  "IpDiscovery": {
   "enumCaseInsensitive": [
    "ipv4",
    "ipv6"
   ],
   "type": "string"
  },
  "LogDeliveryConfigurations": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/LogDeliveryConfigurationRequest"
   },
   "type": "array",
   "uniqueItems": false
  },
  "NetworkType": {
   "enumCaseInsensitive": [
    "dual_stack",
    "ipv4",
    "ipv6"
   ],
   "type": "string"
  },
  "NotificationTopicArn": {
   "type": "string"
  },
  "NumCacheNodes": {
   "type": "integer"
  },
  "Port": {
   "type": "integer"
  },
  "PreferredAvailabilityZone": {
   "type": "string"
  },
  "PreferredAvailabilityZones": {
   "insertionOrder": false,
   "items": {
    "type": "string"
   },
   "type": "array",
   "uniqueItems": false
  },
  "PreferredMaintenanceWindow": {
   "type": "string"
  },
  "RedisEndpoint": {
   "$ref": "#/definitions/Endpoint"
  },
  "SnapshotArns": {
   "insertionOrder": false,
   "items": {
    "type": "string"
   },
   "type": "array",
   "uniqueItems": true
  },
  "SnapshotName": {
   "type": "string"
  },
  "SnapshotRetentionLimit": {
   "type": "integer"
  },
  "SnapshotWindow": {
   "type": "string"
  },
  "Tags": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "type": "array",
   "uniqueItems": false
  },
  "TransitEncryptionEnabled": {
   "type": "boolean"
  },
  "VpcSecurityGroupIds": {
   "format": "AWS::EC2::SecurityGroup.Ids",
   "insertionOrder": false,
   "items": {
    "format": "AWS::EC2::SecurityGroup.Id",
    "type": "string"
   },
   "type": "array",
   "uniqueItems": false
  }
 },
 "propertyTransform": {
  "/properties/EngineVersion": "$join($split(EngineVersion, \".\", 2), \".\")"
 },
 "readOnlyProperties": [
  "/properties/ConfigurationEndpoint",
  "/properties/ConfigurationEndpoint/Port",
  "/properties/ConfigurationEndpoint/Address",
  "/properties/RedisEndpoint",
  "/properties/RedisEndpoint/Port",
  "/properties/RedisEndpoint/Address"
 ],
 "required": [
  "CacheNodeType",
  "NumCacheNodes",
  "Engine"
 ],
 "tagging": {
  "cloudFormationSystemTags": false,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::ElastiCache::CacheCluster",
 "writeOnlyProperties": [
  "/properties/SnapshotArns",
  "/properties/SnapshotName",
  "/properties/CacheSecurityGroupNames",
  "/properties/PreferredAvailabilityZone"
 ]
}
