{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cloudfront/json-schema/cloudfront-update-origin-request-policy-request-schema.json",
  "title": "UpdateOriginRequestPolicyRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cloudfront-origin-request-policy-api-openapi.yml#/components/schemas/UpdateOriginRequestPolicyRequest",
  "type": "object",
  "properties": {
    "OriginRequestPolicyConfig": {
      "$ref": "#/$defs/OriginRequestPolicyConfig"
    },
    "Id": {
      "type": "string",
      "description": "The unique identifier for the origin request policy that you are updating. The identifier is returned in a cache behavior's OriginRequestPolicyId field in the response to GetDistributionConfig."
    },
    "IfMatch": {
      "type": "string",
      "description": "The version of the origin request policy that you are updating. The version is returned in the origin request policy's ETag field in the response to GetOriginRequestPolicyConfig."
    }
  },
  "required": [
    "OriginRequestPolicyConfig",
    "Id"
  ],
  "$defs": {
    "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"
      ]
    },
    "OriginRequestPolicyConfig": {
      "type": "object",
      "properties": {
        "Comment": {
          "type": "string",
          "description": "A comment to describe the origin request policy. The comment cannot be longer than 128 characters."
        },
        "Name": {
          "type": "string",
          "description": "A unique name to identify the origin request policy."
        },
        "HeadersConfig": {
          "$ref": "#/$defs/OriginRequestPolicyHeadersConfig"
        },
        "CookiesConfig": {
          "$ref": "#/$defs/OriginRequestPolicyCookiesConfig"
        },
        "QueryStringsConfig": {
          "$ref": "#/$defs/OriginRequestPolicyQueryStringsConfig"
        }
      },
      "required": [
        "Name",
        "HeadersConfig",
        "CookiesConfig",
        "QueryStringsConfig"
      ]
    },
    "OriginRequestPolicyCookiesConfig": {
      "type": "object",
      "properties": {
        "CookieBehavior": {
          "type": "string",
          "enum": [
            "none",
            "whitelist",
            "all",
            "allExcept"
          ],
          "description": "Determines whether cookies in viewer requests are included in requests that CloudFront sends to the origin. Valid values are: none – No cookies in viewer requests are included in requests that CloudFront sends to the origin. Even when this field is set to none, any cookies that are listed in a CachePolicy are included in origin requests. whitelist – Only the cookies in viewer requests that are listed in the CookieNames type are included in requests that CloudFront sends to the origin. all – All cookies in viewer requests are included in requests that CloudFront sends to the origin. allExcept –"
        },
        "Cookies": {
          "$ref": "#/$defs/CookieNames"
        }
      },
      "required": [
        "CookieBehavior"
      ]
    },
    "OriginRequestPolicyHeadersConfig": {
      "type": "object",
      "properties": {
        "HeaderBehavior": {
          "type": "string",
          "enum": [
            "none",
            "whitelist",
            "allViewer",
            "allViewerAndWhitelistCloudFront",
            "allExcept"
          ],
          "description": "Determines whether any HTTP headers are included in requests that CloudFront sends to the origin. Valid values are: none – No HTTP headers in viewer requests are included in requests that CloudFront sends to the origin. Even when this field is set to none, any headers that are listed in a CachePolicy are included in origin requests. whitelist – Only the HTTP headers that are listed in the Headers type are included in requests that CloudFront sends to the origin. allViewer – All HTTP headers in viewer requests are included in requests that CloudFront sends to the origin. allViewerAndWhitelistCl"
        },
        "Headers": {
          "$ref": "#/$defs/Headers"
        }
      },
      "required": [
        "HeaderBehavior"
      ]
    },
    "OriginRequestPolicyQueryStringsConfig": {
      "type": "object",
      "properties": {
        "QueryStringBehavior": {
          "type": "string",
          "enum": [
            "none",
            "whitelist",
            "all",
            "allExcept"
          ],
          "description": "Determines whether any URL query strings in viewer requests are included in requests that CloudFront sends to the origin. Valid values are: none – No query strings in viewer requests are included in requests that CloudFront sends to the origin. Even when this field is set to none, any query strings that are listed in a CachePolicy are included in origin requests. whitelist – Only the query strings in viewer requests that are listed in the QueryStringNames type are included in requests that CloudFront sends to the origin. all – All query strings in viewer requests are included in requests that "
        },
        "QueryStrings": {
          "$ref": "#/$defs/QueryStringNames"
        }
      },
      "required": [
        "QueryStringBehavior"
      ]
    },
    "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"
      ]
    }
  }
}