{
  "additionalProperties" : false,
  "definitions" : {
    "CacheBehavior" : {
      "additionalProperties" : false,
      "properties" : {
        "AllowedMethods" : {
          "default" : [ "GET", "HEAD" ],
          "items" : {
            "type" : "string"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "CachePolicyId" : {
          "type" : "string"
        },
        "CachedMethods" : {
          "default" : [ "GET", "HEAD" ],
          "items" : {
            "type" : "string"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "Compress" : {
          "default" : false,
          "type" : "boolean"
        },
        "DefaultTTL" : {
          "default" : 86400,
          "type" : "number"
        },
        "FieldLevelEncryptionId" : {
          "default" : "",
          "type" : "string"
        },
        "ForwardedValues" : {
          "$ref" : "#/definitions/ForwardedValues"
        },
        "FunctionAssociations" : {
          "items" : {
            "$ref" : "#/definitions/FunctionAssociation"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "LambdaFunctionAssociations" : {
          "items" : {
            "$ref" : "#/definitions/LambdaFunctionAssociation"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "MaxTTL" : {
          "default" : 31536000,
          "type" : "number"
        },
        "MinTTL" : {
          "default" : 0,
          "type" : "number"
        },
        "OriginRequestPolicyId" : {
          "type" : "string"
        },
        "PathPattern" : {
          "type" : "string"
        },
        "RealtimeLogConfigArn" : {
          "type" : "string"
        },
        "ResponseHeadersPolicyId" : {
          "type" : "string"
        },
        "SmoothStreaming" : {
          "default" : false,
          "type" : "boolean"
        },
        "TargetOriginId" : {
          "type" : "string"
        },
        "TrustedKeyGroups" : {
          "items" : {
            "type" : "string"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "TrustedSigners" : {
          "items" : {
            "type" : "string"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "ViewerProtocolPolicy" : {
          "type" : "string"
        }
      },
      "required" : [ "PathPattern", "TargetOriginId", "ViewerProtocolPolicy" ],
      "type" : "object"
    },
    "Cookies" : {
      "additionalProperties" : false,
      "properties" : {
        "Forward" : {
          "type" : "string"
        },
        "WhitelistedNames" : {
          "items" : {
            "type" : "string"
          },
          "type" : "array",
          "uniqueItems" : false
        }
      },
      "required" : [ "Forward" ],
      "type" : "object"
    },
    "CustomErrorResponse" : {
      "additionalProperties" : false,
      "properties" : {
        "ErrorCachingMinTTL" : {
          "default" : 300,
          "type" : "number"
        },
        "ErrorCode" : {
          "type" : "integer"
        },
        "ResponseCode" : {
          "type" : "integer"
        },
        "ResponsePagePath" : {
          "type" : "string"
        }
      },
      "required" : [ "ErrorCode" ],
      "type" : "object"
    },
    "CustomOriginConfig" : {
      "additionalProperties" : false,
      "properties" : {
        "HTTPPort" : {
          "default" : 80,
          "type" : "integer"
        },
        "HTTPSPort" : {
          "default" : 443,
          "type" : "integer"
        },
        "OriginKeepaliveTimeout" : {
          "default" : 5,
          "type" : "integer"
        },
        "OriginProtocolPolicy" : {
          "type" : "string"
        },
        "OriginReadTimeout" : {
          "default" : 30,
          "type" : "integer"
        },
        "OriginSSLProtocols" : {
          "default" : [ "TLSv1", "SSLv3" ],
          "items" : {
            "type" : "string"
          },
          "type" : "array",
          "uniqueItems" : false
        }
      },
      "required" : [ "OriginProtocolPolicy" ],
      "type" : "object"
    },
    "DefaultCacheBehavior" : {
      "additionalProperties" : false,
      "properties" : {
        "AllowedMethods" : {
          "default" : [ "GET", "HEAD" ],
          "items" : {
            "type" : "string"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "CachePolicyId" : {
          "default" : "",
          "type" : "string"
        },
        "CachedMethods" : {
          "default" : [ "GET", "HEAD" ],
          "items" : {
            "type" : "string"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "Compress" : {
          "default" : false,
          "type" : "boolean"
        },
        "DefaultTTL" : {
          "default" : 86400,
          "type" : "number"
        },
        "FieldLevelEncryptionId" : {
          "default" : "",
          "type" : "string"
        },
        "ForwardedValues" : {
          "$ref" : "#/definitions/ForwardedValues"
        },
        "FunctionAssociations" : {
          "items" : {
            "$ref" : "#/definitions/FunctionAssociation"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "LambdaFunctionAssociations" : {
          "items" : {
            "$ref" : "#/definitions/LambdaFunctionAssociation"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "MaxTTL" : {
          "default" : 31536000,
          "type" : "number"
        },
        "MinTTL" : {
          "default" : 0,
          "type" : "number"
        },
        "OriginRequestPolicyId" : {
          "default" : "",
          "type" : "string"
        },
        "RealtimeLogConfigArn" : {
          "default" : "",
          "type" : "string"
        },
        "ResponseHeadersPolicyId" : {
          "default" : "",
          "type" : "string"
        },
        "SmoothStreaming" : {
          "default" : false,
          "type" : "boolean"
        },
        "TargetOriginId" : {
          "type" : "string"
        },
        "TrustedKeyGroups" : {
          "items" : {
            "type" : "string"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "TrustedSigners" : {
          "items" : {
            "type" : "string"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "ViewerProtocolPolicy" : {
          "type" : "string"
        }
      },
      "required" : [ "TargetOriginId", "ViewerProtocolPolicy" ],
      "type" : "object"
    },
    "DistributionConfig" : {
      "additionalProperties" : false,
      "properties" : {
        "Aliases" : {
          "items" : {
            "type" : "string"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "CNAMEs" : {
          "items" : {
            "type" : "string"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "CacheBehaviors" : {
          "items" : {
            "$ref" : "#/definitions/CacheBehavior"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "Comment" : {
          "default" : "",
          "type" : "string"
        },
        "ContinuousDeploymentPolicyId" : {
          "type" : "string"
        },
        "CustomErrorResponses" : {
          "items" : {
            "$ref" : "#/definitions/CustomErrorResponse"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "CustomOrigin" : {
          "$ref" : "#/definitions/LegacyCustomOrigin"
        },
        "DefaultCacheBehavior" : {
          "$ref" : "#/definitions/DefaultCacheBehavior"
        },
        "DefaultRootObject" : {
          "default" : "",
          "type" : "string"
        },
        "Enabled" : {
          "type" : "boolean"
        },
        "HttpVersion" : {
          "default" : "http1.1",
          "type" : "string"
        },
        "IPV6Enabled" : {
          "type" : "boolean"
        },
        "Logging" : {
          "$ref" : "#/definitions/Logging"
        },
        "OriginGroups" : {
          "$ref" : "#/definitions/OriginGroups"
        },
        "Origins" : {
          "items" : {
            "$ref" : "#/definitions/Origin"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "PriceClass" : {
          "default" : "PriceClass_All",
          "type" : "string"
        },
        "Restrictions" : {
          "$ref" : "#/definitions/Restrictions",
          "default" : {
            "GeoRestriction" : {
              "RestrictionType" : "none"
            }
          }
        },
        "S3Origin" : {
          "$ref" : "#/definitions/LegacyS3Origin"
        },
        "Staging" : {
          "type" : "boolean"
        },
        "ViewerCertificate" : {
          "$ref" : "#/definitions/ViewerCertificate",
          "default" : {
            "CloudFrontDefaultCertificate" : true
          }
        },
        "WebACLId" : {
          "default" : "",
          "type" : "string"
        }
      },
      "required" : [ "Enabled", "DefaultCacheBehavior" ],
      "type" : "object"
    },
    "ForwardedValues" : {
      "additionalProperties" : false,
      "properties" : {
        "Cookies" : {
          "$ref" : "#/definitions/Cookies",
          "default" : {
            "Forward" : "none"
          }
        },
        "Headers" : {
          "items" : {
            "type" : "string"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "QueryString" : {
          "type" : "boolean"
        },
        "QueryStringCacheKeys" : {
          "items" : {
            "type" : "string"
          },
          "type" : "array",
          "uniqueItems" : false
        }
      },
      "required" : [ "QueryString" ],
      "type" : "object"
    },
    "FunctionAssociation" : {
      "additionalProperties" : false,
      "properties" : {
        "EventType" : {
          "type" : "string"
        },
        "FunctionARN" : {
          "type" : "string"
        }
      },
      "type" : "object"
    },
    "GeoRestriction" : {
      "additionalProperties" : false,
      "properties" : {
        "Locations" : {
          "items" : {
            "type" : "string"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "RestrictionType" : {
          "type" : "string"
        }
      },
      "required" : [ "RestrictionType" ],
      "type" : "object"
    },
    "LambdaFunctionAssociation" : {
      "additionalProperties" : false,
      "properties" : {
        "EventType" : {
          "type" : "string"
        },
        "IncludeBody" : {
          "type" : "boolean"
        },
        "LambdaFunctionARN" : {
          "type" : "string"
        }
      },
      "type" : "object"
    },
    "LegacyCustomOrigin" : {
      "additionalProperties" : false,
      "properties" : {
        "DNSName" : {
          "type" : "string"
        },
        "HTTPPort" : {
          "default" : 80,
          "type" : "integer"
        },
        "HTTPSPort" : {
          "default" : 443,
          "type" : "integer"
        },
        "OriginProtocolPolicy" : {
          "type" : "string"
        },
        "OriginSSLProtocols" : {
          "items" : {
            "type" : "string"
          },
          "type" : "array",
          "uniqueItems" : false
        }
      },
      "required" : [ "DNSName", "OriginProtocolPolicy", "OriginSSLProtocols" ],
      "type" : "object"
    },
    "LegacyS3Origin" : {
      "additionalProperties" : false,
      "properties" : {
        "DNSName" : {
          "type" : "string"
        },
        "OriginAccessIdentity" : {
          "default" : "",
          "type" : "string"
        }
      },
      "required" : [ "DNSName" ],
      "type" : "object"
    },
    "Logging" : {
      "additionalProperties" : false,
      "properties" : {
        "Bucket" : {
          "type" : "string"
        },
        "IncludeCookies" : {
          "default" : false,
          "type" : "boolean"
        },
        "Prefix" : {
          "default" : "",
          "type" : "string"
        }
      },
      "required" : [ "Bucket" ],
      "type" : "object"
    },
    "Origin" : {
      "additionalProperties" : false,
      "properties" : {
        "ConnectionAttempts" : {
          "type" : "integer"
        },
        "ConnectionTimeout" : {
          "type" : "integer"
        },
        "CustomOriginConfig" : {
          "$ref" : "#/definitions/CustomOriginConfig"
        },
        "DomainName" : {
          "type" : "string"
        },
        "Id" : {
          "type" : "string"
        },
        "OriginAccessControlId" : {
          "type" : "string"
        },
        "OriginCustomHeaders" : {
          "items" : {
            "$ref" : "#/definitions/OriginCustomHeader"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "OriginPath" : {
          "default" : "",
          "type" : "string"
        },
        "OriginShield" : {
          "$ref" : "#/definitions/OriginShield"
        },
        "S3OriginConfig" : {
          "$ref" : "#/definitions/S3OriginConfig"
        }
      },
      "required" : [ "DomainName", "Id" ],
      "type" : "object"
    },
    "OriginCustomHeader" : {
      "additionalProperties" : false,
      "properties" : {
        "HeaderName" : {
          "type" : "string"
        },
        "HeaderValue" : {
          "type" : "string"
        }
      },
      "required" : [ "HeaderValue", "HeaderName" ],
      "type" : "object"
    },
    "OriginGroup" : {
      "additionalProperties" : false,
      "properties" : {
        "FailoverCriteria" : {
          "$ref" : "#/definitions/OriginGroupFailoverCriteria"
        },
        "Id" : {
          "type" : "string"
        },
        "Members" : {
          "$ref" : "#/definitions/OriginGroupMembers"
        }
      },
      "required" : [ "Id", "FailoverCriteria", "Members" ],
      "type" : "object"
    },
    "OriginGroupFailoverCriteria" : {
      "additionalProperties" : false,
      "properties" : {
        "StatusCodes" : {
          "$ref" : "#/definitions/StatusCodes"
        }
      },
      "required" : [ "StatusCodes" ],
      "type" : "object"
    },
    "OriginGroupMember" : {
      "additionalProperties" : false,
      "properties" : {
        "OriginId" : {
          "type" : "string"
        }
      },
      "required" : [ "OriginId" ],
      "type" : "object"
    },
    "OriginGroupMembers" : {
      "additionalProperties" : false,
      "properties" : {
        "Items" : {
          "items" : {
            "$ref" : "#/definitions/OriginGroupMember"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "Quantity" : {
          "type" : "integer"
        }
      },
      "required" : [ "Quantity", "Items" ],
      "type" : "object"
    },
    "OriginGroups" : {
      "additionalProperties" : false,
      "properties" : {
        "Items" : {
          "items" : {
            "$ref" : "#/definitions/OriginGroup"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "Quantity" : {
          "type" : "integer"
        }
      },
      "required" : [ "Quantity" ],
      "type" : "object"
    },
    "OriginShield" : {
      "additionalProperties" : false,
      "properties" : {
        "Enabled" : {
          "type" : "boolean"
        },
        "OriginShieldRegion" : {
          "type" : "string"
        }
      },
      "type" : "object"
    },
    "Restrictions" : {
      "additionalProperties" : false,
      "properties" : {
        "GeoRestriction" : {
          "$ref" : "#/definitions/GeoRestriction"
        }
      },
      "required" : [ "GeoRestriction" ],
      "type" : "object"
    },
    "S3OriginConfig" : {
      "additionalProperties" : false,
      "properties" : {
        "OriginAccessIdentity" : {
          "default" : "",
          "type" : "string"
        }
      },
      "type" : "object"
    },
    "StatusCodes" : {
      "additionalProperties" : false,
      "properties" : {
        "Items" : {
          "items" : {
            "type" : "integer"
          },
          "type" : "array",
          "uniqueItems" : false
        },
        "Quantity" : {
          "type" : "integer"
        }
      },
      "required" : [ "Quantity", "Items" ],
      "type" : "object"
    },
    "Tag" : {
      "additionalProperties" : false,
      "properties" : {
        "Key" : {
          "type" : "string"
        },
        "Value" : {
          "type" : "string"
        }
      },
      "required" : [ "Value", "Key" ],
      "type" : "object"
    },
    "ViewerCertificate" : {
      "additionalProperties" : false,
      "properties" : {
        "AcmCertificateArn" : {
          "type" : "string"
        },
        "CloudFrontDefaultCertificate" : {
          "type" : "boolean"
        },
        "IamCertificateId" : {
          "type" : "string"
        },
        "MinimumProtocolVersion" : {
          "type" : "string"
        },
        "SslSupportMethod" : {
          "type" : "string"
        }
      },
      "type" : "object"
    }
  },
  "description" : "Resource Type definition for AWS::CloudFront::Distribution",
  "handlers" : {
    "create" : {
      "permissions" : [ "cloudfront:CreateDistribution*", "cloudfront:TagResource" ]
    },
    "delete" : {
      "permissions" : [ "cloudfront:DeleteDistribution*" ]
    },
    "list" : {
      "permissions" : [ "cloudfront:ListDistributions*" ]
    },
    "read" : {
      "permissions" : [ "cloudfront:GetDistribution*" ]
    },
    "update" : {
      "permissions" : [ "cloudfront:GetDistribution*", "cloudfront:UpdateDistribution*", "cloudfront:ListTagsForResource*", "cloudfront:TagResource", "cloudfront:UntagResource" ]
    }
  },
  "primaryIdentifier" : [ "/properties/Id" ],
  "properties" : {
    "DistributionConfig" : {
      "$ref" : "#/definitions/DistributionConfig"
    },
    "DomainName" : {
      "type" : "string"
    },
    "Id" : {
      "type" : "string"
    },
    "Tags" : {
      "items" : {
        "$ref" : "#/definitions/Tag"
      },
      "type" : "array",
      "uniqueItems" : false
    }
  },
  "readOnlyProperties" : [ "/properties/Id", "/properties/DomainName" ],
  "required" : [ "DistributionConfig" ],
  "typeName" : "AWS::CloudFront::Distribution"
}