{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-lightsail-distribution.json",
  "title": "AWSLightsailDistributionProperties",
  "description": "Resource Type definition for AWS::Lightsail::Distribution. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-lightsail.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-lightsail-distribution.json",
    "sourceSha256": "903475ea6dbab5faabd83d880c28263bb5fb8b14ceee8dba920709ab741e1c66"
  },
  "type": "object",
  "properties": {
    "DistributionName": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "\\w[\\w\\-]*\\w"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The name for the distribution."
    },
    "BundleId": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The bundle ID to use for the distribution."
    },
    "IpAddressType": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The IP address type for the distribution."
    },
    "CacheBehaviors": {
      "description": "An array of objects that describe the per-path cache behavior for the distribution.",
      "type": "array",
      "uniqueItems": true,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/CacheBehaviorPerPath"
      }
    },
    "CacheBehaviorSettings": {
      "description": "An object that describes the cache behavior settings for the distribution.",
      "$ref": "#/$defs/CacheSettings"
    },
    "DefaultCacheBehavior": {
      "description": "An object that describes the default cache behavior for the distribution.",
      "$ref": "#/$defs/CacheBehavior"
    },
    "Origin": {
      "description": "An object that describes the origin resource for the distribution, such as a Lightsail instance or load balancer.",
      "$ref": "#/$defs/InputOrigin"
    },
    "IsEnabled": {
      "description": "Indicates whether the distribution is enabled.",
      "type": "boolean"
    },
    "CertificateName": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The certificate attached to the Distribution."
    },
    "Tags": {
      "description": "An array of key-value pairs to apply to this resource.",
      "type": "array",
      "uniqueItems": true,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "typeName": "AWS::Lightsail::Distribution",
  "createOnlyProperties": [
    "/properties/DistributionName",
    "/properties/IpAddressType"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-lightsail.git",
  "additionalProperties": false,
  "primaryIdentifier": [
    "/properties/DistributionName"
  ],
  "$defs": {
    "Tag": {
      "description": "A key-value pair to associate with a resource.",
      "type": "object",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -."
        },
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 0,
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -."
        }
      },
      "required": [
        "Key"
      ],
      "title": "AWSLightsailDistributionTagDefinition",
      "additionalProperties": false
    },
    "CacheBehaviorPerPath": {
      "description": "Describes the per-path cache behavior of an Amazon Lightsail content delivery network (CDN) distribution.",
      "type": "object",
      "properties": {
        "Behavior": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The cache behavior for the specified path."
        },
        "Path": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The path to a directory or file to cached, or not cache. Use an asterisk symbol to specify wildcard directories (path/to/assets/*), and file types (*.html, *jpg, *js). Directories and file paths are case-sensitive."
        }
      },
      "title": "AWSLightsailDistributionCacheBehaviorPerPathDefinition",
      "additionalProperties": false
    },
    "CookieObject": {
      "description": "Describes whether an Amazon Lightsail content delivery network (CDN) distribution forwards cookies to the origin and, if so, which ones.",
      "type": "object",
      "properties": {
        "CookiesAllowList": {
          "description": "The specific cookies to forward to your distribution's origin.",
          "type": "array",
          "uniqueItems": true,
          "insertionOrder": false,
          "items": {
            "type": "string"
          }
        },
        "Option": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Specifies which cookies to forward to the distribution's origin for a cache behavior: all, none, or allow-list to forward only the cookies specified in the cookiesAllowList parameter."
        }
      },
      "title": "AWSLightsailDistributionCookieObjectDefinition",
      "additionalProperties": false
    },
    "HeaderObject": {
      "description": "Describes the request headers that a Lightsail distribution bases caching on.",
      "type": "object",
      "properties": {
        "HeadersAllowList": {
          "description": "The specific headers to forward to your distribution's origin.",
          "type": "array",
          "uniqueItems": true,
          "insertionOrder": false,
          "items": {
            "type": "string"
          }
        },
        "Option": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The headers that you want your distribution to forward to your origin and base caching on."
        }
      },
      "title": "AWSLightsailDistributionHeaderObjectDefinition",
      "additionalProperties": false
    },
    "QueryStringObject": {
      "description": "Describes the query string parameters that an Amazon Lightsail content delivery network (CDN) distribution to bases caching on.",
      "type": "object",
      "properties": {
        "QueryStringsAllowList": {
          "description": "The specific query strings that the distribution forwards to the origin.",
          "type": "array",
          "uniqueItems": true,
          "insertionOrder": false,
          "items": {
            "type": "string"
          }
        },
        "Option": {
          "type": "boolean",
          "description": "Indicates whether the distribution forwards and caches based on query strings."
        }
      },
      "title": "AWSLightsailDistributionQueryStringObjectDefinition",
      "additionalProperties": false
    },
    "CacheSettings": {
      "description": "Describes the cache settings of an Amazon Lightsail content delivery network (CDN) distribution.",
      "type": "object",
      "properties": {
        "AllowedHTTPMethods": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The HTTP methods that are processed and forwarded to the distribution's origin."
        },
        "CachedHTTPMethods": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The HTTP method responses that are cached by your distribution."
        },
        "DefaultTTL": {
          "type": "integer",
          "format": "int64",
          "description": "The default amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the content has been updated."
        },
        "MaximumTTL": {
          "type": "integer",
          "format": "int64",
          "description": "The maximum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated."
        },
        "MinimumTTL": {
          "type": "integer",
          "format": "int64",
          "description": "The minimum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated."
        },
        "ForwardedCookies": {
          "$ref": "#/$defs/CookieObject",
          "description": "An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded."
        },
        "ForwardedHeaders": {
          "$ref": "#/$defs/HeaderObject",
          "description": "An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded."
        },
        "ForwardedQueryStrings": {
          "$ref": "#/$defs/QueryStringObject",
          "description": "An object that describes the query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded."
        }
      },
      "title": "AWSLightsailDistributionCacheSettingsDefinition",
      "additionalProperties": false
    },
    "CacheBehavior": {
      "description": "Describes the default cache behavior of an Amazon Lightsail content delivery network (CDN) distribution.",
      "type": "object",
      "properties": {
        "Behavior": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The cache behavior of the distribution."
        }
      },
      "title": "AWSLightsailDistributionCacheBehaviorDefinition",
      "additionalProperties": false
    },
    "InputOrigin": {
      "description": "Describes the origin resource of an Amazon Lightsail content delivery network (CDN) distribution.",
      "type": "object",
      "properties": {
        "Name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the origin resource."
        },
        "ProtocolPolicy": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The protocol that your Amazon Lightsail distribution uses when establishing a connection with your origin to pull content."
        },
        "RegionName": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The AWS Region name of the origin resource."
        }
      },
      "title": "AWSLightsailDistributionInputOriginDefinition",
      "additionalProperties": false
    }
  },
  "required": [
    "DistributionName",
    "BundleId",
    "DefaultCacheBehavior",
    "Origin"
  ],
  "readOnlyProperties": [
    "/properties/DistributionArn",
    "/properties/Status",
    "/properties/AbleToUpdateBundle"
  ],
  "taggable": true
}
