{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cloudfront/json-schema/cloudfront-update-cache-policy-request-schema.json",
  "title": "UpdateCachePolicyRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cloudfront-cachepolicies-api-openapi.yml#/components/schemas/UpdateCachePolicyRequest",
  "type": "object",
  "properties": {
    "CachePolicyConfig": {
      "$ref": "#/$defs/CachePolicyConfig"
    },
    "Id": {
      "type": "string",
      "description": "The unique identifier for the cache policy that you are updating. The identifier is returned in a cache behavior's CachePolicyId field in the response to GetDistributionConfig."
    },
    "IfMatch": {
      "type": "string",
      "description": "The version of the cache policy that you are updating. The version is returned in the cache policy's ETag field in the response to GetCachePolicyConfig."
    }
  },
  "required": [
    "CachePolicyConfig",
    "Id"
  ],
  "$defs": {
    "CachePolicyConfig": {
      "type": "object",
      "properties": {
        "Comment": {
          "type": "string",
          "description": "A comment to describe the cache policy. The comment cannot be longer than 128 characters."
        },
        "Name": {
          "type": "string",
          "description": "A unique name to identify the cache policy."
        },
        "DefaultTTL": {
          "type": "integer",
          "description": "The default amount of time, in seconds, that you want objects to stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. CloudFront uses this value as the object's time to live (TTL) only when the origin does not send Cache-Control or Expires headers with the object. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide. The default value for this field is 86400 seconds (one day). If the value of MinTTL is more than 86400 seconds, then the default value f"
        },
        "MaxTTL": {
          "type": "integer",
          "description": "The maximum amount of time, in seconds, that objects stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. CloudFront uses this value only when the origin sends Cache-Control or Expires headers with the object. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide. The default value for this field is 31536000 seconds (one year). If the value of MinTTL or DefaultTTL is more than 31536000 seconds, then the default value for this field is the same as the v"
        },
        "MinTTL": {
          "type": "integer",
          "description": "The minimum amount of time, in seconds, that you want objects to stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide."
        },
        "ParametersInCacheKeyAndForwardedToOrigin": {
          "$ref": "#/$defs/ParametersInCacheKeyAndForwardedToOrigin"
        }
      },
      "required": [
        "Name",
        "MinTTL"
      ]
    },
    "CachePolicyCookiesConfig": {
      "type": "object",
      "properties": {
        "CookieBehavior": {
          "type": "string",
          "enum": [
            "none",
            "whitelist",
            "allExcept",
            "all"
          ],
          "description": "Determines whether any cookies in viewer requests are included in the cache key and in requests that CloudFront sends to the origin. Valid values are: none – No cookies in viewer requests are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none, any cookies that are listed in an OriginRequestPolicy are included in origin requests. whitelist – Only the cookies in viewer requests that are listed in the CookieNames type are included in the cache key and in requests that CloudFront sends to the origin. allExcept – All cookies in viewer r"
        },
        "Cookies": {
          "$ref": "#/$defs/CookieNames"
        }
      },
      "required": [
        "CookieBehavior"
      ]
    },
    "CachePolicyHeadersConfig": {
      "type": "object",
      "properties": {
        "HeaderBehavior": {
          "type": "string",
          "enum": [
            "none",
            "whitelist"
          ],
          "description": "Determines whether any HTTP headers are included in the cache key and in requests that CloudFront sends to the origin. Valid values are: none – No HTTP headers are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none, any headers that are listed in an OriginRequestPolicy are included in origin requests. whitelist – Only the HTTP headers that are listed in the Headers type are included in the cache key and in requests that CloudFront sends to the origin."
        },
        "Headers": {
          "$ref": "#/$defs/Headers"
        }
      },
      "required": [
        "HeaderBehavior"
      ]
    },
    "CachePolicyQueryStringsConfig": {
      "type": "object",
      "properties": {
        "QueryStringBehavior": {
          "type": "string",
          "enum": [
            "none",
            "whitelist",
            "allExcept",
            "all"
          ],
          "description": "Determines whether any URL query strings in viewer requests are included in the cache key and in requests that CloudFront sends to the origin. Valid values are: none – No query strings in viewer requests are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none, any query strings that are listed in an OriginRequestPolicy are included in origin requests. whitelist – Only the query strings in viewer requests that are listed in the QueryStringNames type are included in the cache key and in requests that CloudFront sends to the origin. al"
        },
        "QueryStrings": {
          "$ref": "#/$defs/QueryStringNames"
        }
      },
      "required": [
        "QueryStringBehavior"
      ]
    },
    "CookieNames": {
      "type": "object",
      "properties": {
        "Quantity": {
          "type": "integer",
          "description": "The number of cookie names in the Items list."
        },
        "Items": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of cookie names."
        }
      },
      "required": [
        "Quantity"
      ]
    },
    "Headers": {
      "type": "object",
      "properties": {
        "Quantity": {
          "type": "integer",
          "description": "The number of header names in the Items list."
        },
        "Items": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of HTTP header names."
        }
      },
      "required": [
        "Quantity"
      ]
    },
    "ParametersInCacheKeyAndForwardedToOrigin": {
      "type": "object",
      "properties": {
        "EnableAcceptEncodingGzip": {
          "type": "boolean",
          "description": "A flag that can affect whether the Accept-Encoding HTTP header is included in the cache key and included in requests that CloudFront sends to the origin. This field is related to the EnableAcceptEncodingBrotli field. If one or both of these fields is true and the viewer request includes the Accept-Encoding header, then CloudFront does the following: Normalizes the value of the viewer's Accept-Encoding header Includes the normalized header in the cache key Includes the normalized header in the request to the origin, if a request is necessary For more information, see Compression support in the "
        },
        "EnableAcceptEncodingBrotli": {
          "type": "boolean",
          "description": "A flag that can affect whether the Accept-Encoding HTTP header is included in the cache key and included in requests that CloudFront sends to the origin. This field is related to the EnableAcceptEncodingGzip field. If one or both of these fields is true and the viewer request includes the Accept-Encoding header, then CloudFront does the following: Normalizes the value of the viewer's Accept-Encoding header Includes the normalized header in the cache key Includes the normalized header in the request to the origin, if a request is necessary For more information, see Compression support in the Am"
        },
        "HeadersConfig": {
          "$ref": "#/$defs/CachePolicyHeadersConfig"
        },
        "CookiesConfig": {
          "$ref": "#/$defs/CachePolicyCookiesConfig"
        },
        "QueryStringsConfig": {
          "$ref": "#/$defs/CachePolicyQueryStringsConfig"
        }
      },
      "required": [
        "EnableAcceptEncodingGzip",
        "HeadersConfig",
        "CookiesConfig",
        "QueryStringsConfig"
      ]
    },
    "QueryStringNames": {
      "type": "object",
      "properties": {
        "Quantity": {
          "type": "integer",
          "description": "The number of query string names in the Items list."
        },
        "Items": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of query string names."
        }
      },
      "required": [
        "Quantity"
      ]
    }
  }
}