{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cloudfront/json-schema/cloudfront-update-continuous-deployment-policy-request-schema.json",
  "title": "UpdateContinuousDeploymentPolicyRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cloudfront-continuous-deployment-policy-api-openapi.yml#/components/schemas/UpdateContinuousDeploymentPolicyRequest",
  "type": "object",
  "properties": {
    "ContinuousDeploymentPolicyConfig": {
      "$ref": "#/$defs/ContinuousDeploymentPolicyConfig"
    },
    "Id": {
      "type": "string",
      "description": "The identifier of the continuous deployment policy that you are updating."
    },
    "IfMatch": {
      "type": "string",
      "description": "The current version (ETag value) of the continuous deployment policy that you are updating."
    }
  },
  "required": [
    "ContinuousDeploymentPolicyConfig",
    "Id"
  ],
  "$defs": {
    "ContinuousDeploymentPolicyConfig": {
      "type": "object",
      "properties": {
        "StagingDistributionDnsNames": {
          "$ref": "#/$defs/StagingDistributionDnsNames"
        },
        "Enabled": {
          "type": "boolean",
          "description": "A Boolean that indicates whether this continuous deployment policy is enabled (in effect). When this value is true, this policy is enabled and in effect. When this value is false, this policy is not enabled and has no effect."
        },
        "TrafficConfig": {
          "$ref": "#/$defs/TrafficConfig"
        }
      },
      "required": [
        "StagingDistributionDnsNames",
        "Enabled"
      ]
    },
    "ContinuousDeploymentSingleHeaderConfig": {
      "type": "object",
      "properties": {
        "Header": {
          "type": "string",
          "description": "The request header name that you want CloudFront to send to your staging distribution. The header must contain the prefix aws-cf-cd-."
        },
        "Value": {
          "type": "string",
          "description": "The request header value."
        }
      },
      "required": [
        "Header",
        "Value"
      ]
    },
    "ContinuousDeploymentSingleWeightConfig": {
      "type": "object",
      "properties": {
        "Weight": {
          "type": "number",
          "description": "The percentage of traffic to send to a staging distribution, expressed as a decimal number between 0 and 0.15. For example, a value of 0.10 means 10% of traffic is sent to the staging distribution."
        },
        "SessionStickinessConfig": {
          "$ref": "#/$defs/SessionStickinessConfig"
        }
      },
      "required": [
        "Weight"
      ]
    },
    "SessionStickinessConfig": {
      "type": "object",
      "properties": {
        "IdleTTL": {
          "type": "integer",
          "description": "The amount of time after which you want sessions to cease if no requests are received. Allowed values are 300–3600 seconds (5–60 minutes). The value must be less than or equal to MaximumTTL."
        },
        "MaximumTTL": {
          "type": "integer",
          "description": "The maximum amount of time to consider requests from the viewer as being part of the same session. Allowed values are 300–3600 seconds (5–60 minutes). The value must be greater than or equal to IdleTTL."
        }
      },
      "required": [
        "IdleTTL",
        "MaximumTTL"
      ]
    },
    "StagingDistributionDnsNames": {
      "type": "object",
      "properties": {
        "Quantity": {
          "type": "integer",
          "description": "The number of CloudFront domain names in your staging distribution."
        },
        "Items": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The CloudFront domain name of the staging distribution."
        }
      },
      "required": [
        "Quantity"
      ]
    },
    "TrafficConfig": {
      "type": "object",
      "properties": {
        "SingleWeightConfig": {
          "$ref": "#/$defs/ContinuousDeploymentSingleWeightConfig"
        },
        "SingleHeaderConfig": {
          "$ref": "#/$defs/ContinuousDeploymentSingleHeaderConfig"
        },
        "Type": {
          "type": "string",
          "enum": [
            "SingleWeight",
            "SingleHeader"
          ],
          "description": "The type of traffic configuration."
        }
      },
      "required": [
        "Type"
      ]
    }
  }
}