{
  "additionalProperties" : false,
  "deprecatedProperties" : [ "/definitions/ContinuousDeploymentPolicyConfig/properties/Type", "/definitions/ContinuousDeploymentPolicyConfig/properties/SingleHeaderPolicyConfig", "/definitions/ContinuousDeploymentPolicyConfig/properties/SingleWeightPolicyConfig" ],
  "definitions" : {
    "ContinuousDeploymentPolicyConfig" : {
      "additionalProperties" : false,
      "properties" : {
        "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."
        },
        "SingleHeaderPolicyConfig" : {
          "additionalProperties" : false,
          "properties" : {
            "Header" : {
              "maxLength" : 256,
              "minLength" : 1,
              "type" : "string"
            },
            "Value" : {
              "maxLength" : 1783,
              "minLength" : 1,
              "type" : "string"
            }
          },
          "required" : [ "Header", "Value" ],
          "type" : "object",
          "description" : "This configuration determines which HTTP requests are sent to the staging distribution. If the HTTP request contains a header and value that matches what you specify here, the request is sent to the staging distribution. Otherwise the request is sent to the primary distribution."
        },
        "SingleWeightPolicyConfig" : {
          "additionalProperties" : false,
          "properties" : {
            "SessionStickinessConfig" : {
              "$ref" : "#/definitions/SessionStickinessConfig"
            },
            "Weight" : {
              "maximum" : 1,
              "minimum" : 0,
              "multipleOf" : 0.01,
              "type" : "number"
            }
          },
          "required" : [ "Weight" ],
          "type" : "object",
          "description" : "This configuration determines the percentage of HTTP requests that are sent to the staging distribution."
        },
        "StagingDistributionDnsNames" : {
          "insertionOrder" : true,
          "items" : {
            "type" : "string"
          },
          "minItems" : 1,
          "type" : "array",
          "uniqueItems" : true,
          "description" : "The CloudFront domain name of the staging distribution. For example: ``d111111abcdef8.cloudfront.net``."
        },
        "TrafficConfig" : {
          "$ref" : "#/definitions/TrafficConfig",
          "description" : "Contains the parameters for routing production traffic from your primary to staging distributions."
        },
        "Type" : {
          "enum" : [ "SingleWeight", "SingleHeader" ],
          "type" : "string",
          "description" : "The type of traffic configuration."
        }
      },
      "required" : [ "Enabled", "StagingDistributionDnsNames" ],
      "type" : "object",
      "description" : "Contains the configuration for a continuous deployment policy."
    },
    "SessionStickinessConfig" : {
      "additionalProperties" : false,
      "properties" : {
        "IdleTTL" : {
          "maximum" : 3600,
          "minimum" : 300,
          "multipleOf" : 1,
          "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)."
        },
        "MaximumTTL" : {
          "maximum" : 3600,
          "minimum" : 300,
          "multipleOf" : 1,
          "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)."
        }
      },
      "required" : [ "IdleTTL", "MaximumTTL" ],
      "type" : "object",
      "description" : "Session stickiness provides the ability to define multiple requests from a single viewer as a single session. This prevents the potentially inconsistent experience of sending some of a given user's requests to your staging distribution, while others are sent to your primary distribution. Define the session duration using TTL values."
    },
    "SingleHeaderConfig" : {
      "additionalProperties" : false,
      "properties" : {
        "Header" : {
          "maxLength" : 256,
          "minLength" : 1,
          "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" : {
          "maxLength" : 1783,
          "minLength" : 1,
          "type" : "string",
          "description" : "The request header value."
        }
      },
      "required" : [ "Header", "Value" ],
      "type" : "object",
      "description" : "Determines which HTTP requests are sent to the staging distribution."
    },
    "SingleWeightConfig" : {
      "additionalProperties" : false,
      "properties" : {
        "SessionStickinessConfig" : {
          "$ref" : "#/definitions/SessionStickinessConfig",
          "description" : "Session stickiness provides the ability to define multiple requests from a single viewer as a single session. This prevents the potentially inconsistent experience of sending some of a given user's requests to your staging distribution, while others are sent to your primary distribution. Define the session duration using TTL values."
        },
        "Weight" : {
          "maximum" : 1,
          "minimum" : 0,
          "multipleOf" : 0.01,
          "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."
        }
      },
      "required" : [ "Weight" ],
      "type" : "object",
      "description" : "This configuration determines the percentage of HTTP requests that are sent to the staging distribution."
    },
    "TrafficConfig" : {
      "additionalProperties" : false,
      "properties" : {
        "SingleHeaderConfig" : {
          "$ref" : "#/definitions/SingleHeaderConfig",
          "description" : "Determines which HTTP requests are sent to the staging distribution."
        },
        "SingleWeightConfig" : {
          "$ref" : "#/definitions/SingleWeightConfig",
          "description" : "Contains the percentage of traffic to send to the staging distribution."
        },
        "Type" : {
          "enum" : [ "SingleWeight", "SingleHeader" ],
          "type" : "string",
          "description" : "The type of traffic configuration."
        }
      },
      "required" : [ "Type" ],
      "type" : "object",
      "description" : "The traffic configuration of your continuous deployment."
    }
  },
  "description" : "Creates a continuous deployment policy that routes a subset of production traffic from a primary distribution to a staging distribution.\n After you create and update a staging distribution, you can use a continuous deployment policy to incrementally move traffic to the staging distribution. This enables you to test changes to a distribution's configuration before moving all of your production traffic to the new configuration.\n For more information, see [Using CloudFront continuous deployment to safely test CDN configuration changes](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/continuous-deployment.html) in the *Amazon CloudFront Developer Guide*.",
  "handlers" : {
    "create" : {
      "permissions" : [ "cloudfront:CreateContinuousDeploymentPolicy" ]
    },
    "delete" : {
      "permissions" : [ "cloudfront:DeleteContinuousDeploymentPolicy", "cloudfront:GetContinuousDeploymentPolicy" ]
    },
    "list" : {
      "permissions" : [ "cloudfront:ListContinuousDeploymentPolicies" ]
    },
    "read" : {
      "permissions" : [ "cloudfront:GetContinuousDeploymentPolicy" ]
    },
    "update" : {
      "permissions" : [ "cloudfront:UpdateContinuousDeploymentPolicy", "cloudfront:GetContinuousDeploymentPolicy" ]
    }
  },
  "primaryIdentifier" : [ "/properties/Id" ],
  "properties" : {
    "ContinuousDeploymentPolicyConfig" : {
      "$ref" : "#/definitions/ContinuousDeploymentPolicyConfig",
      "description" : "Contains the configuration for a continuous deployment policy."
    },
    "Id" : {
      "type" : "string",
      "description" : ""
    },
    "LastModifiedTime" : {
      "type" : "string",
      "description" : ""
    }
  },
  "readOnlyProperties" : [ "/properties/Id", "/properties/LastModifiedTime" ],
  "required" : [ "ContinuousDeploymentPolicyConfig" ],
  "tagging" : {
    "cloudFormationSystemTags" : false,
    "tagOnCreate" : false,
    "tagUpdatable" : false,
    "taggable" : false
  },
  "typeName" : "AWS::CloudFront::ContinuousDeploymentPolicy"
}