UpdateContinuousDeploymentPolicy - Amazon CloudFront
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

UpdateContinuousDeploymentPolicy

Updates a continuous deployment policy. You can update a continuous deployment policy to enable or disable it, to change the percentage of traffic that it sends to the staging distribution, or to change the staging distribution that it sends traffic to.

When you update a continuous deployment policy configuration, all the fields are updated with the values that are provided in the request. You cannot update some fields independent of others. To update a continuous deployment policy configuration:

  1. Use GetContinuousDeploymentPolicyConfig to get the current configuration.

  2. Locally modify the fields in the continuous deployment policy configuration that you want to update.

  3. Use UpdateContinuousDeploymentPolicy, providing the entire continuous deployment policy configuration, including the fields that you modified and those that you didn't.

Request Syntax

PUT /2020-05-31/continuous-deployment-policy/Id HTTP/1.1 <?xml version="1.0" encoding="UTF-8"?> <ContinuousDeploymentPolicyConfig xmlns="http://cloudfront.amazonaws.com/doc/2020-05-31/"> <Enabled>boolean</Enabled> <StagingDistributionDnsNames> <Items> <DnsName>string</DnsName> </Items> <Quantity>integer</Quantity> </StagingDistributionDnsNames> <TrafficConfig> <SingleHeaderConfig> <Header>string</Header> <Value>string</Value> </SingleHeaderConfig> <SingleWeightConfig> <SessionStickinessConfig> <IdleTTL>integer</IdleTTL> <MaximumTTL>integer</MaximumTTL> </SessionStickinessConfig> <Weight>float</Weight> </SingleWeightConfig> <Type>string</Type> </TrafficConfig> </ContinuousDeploymentPolicyConfig>

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in XML format.

ContinuousDeploymentPolicyConfig

Root level tag for the ContinuousDeploymentPolicyConfig parameters.

Required: Yes

Enabled

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.

Type: Boolean

Required: Yes

StagingDistributionDnsNames

The CloudFront domain name of the staging distribution. For example: d111111abcdef8.cloudfront.net.

Type: StagingDistributionDnsNames object

Required: Yes

TrafficConfig

Contains the parameters for routing production traffic from your primary to staging distributions.

Type: TrafficConfig object

Required: No

Response Syntax

HTTP/1.1 200 <?xml version="1.0" encoding="UTF-8"?> <ContinuousDeploymentPolicy> <ContinuousDeploymentPolicyConfig> <Enabled>boolean</Enabled> <StagingDistributionDnsNames> <Items> <DnsName>string</DnsName> </Items> <Quantity>integer</Quantity> </StagingDistributionDnsNames> <TrafficConfig> <SingleHeaderConfig> <Header>string</Header> <Value>string</Value> </SingleHeaderConfig> <SingleWeightConfig> <SessionStickinessConfig> <IdleTTL>integer</IdleTTL> <MaximumTTL>integer</MaximumTTL> </SessionStickinessConfig> <Weight>float</Weight> </SingleWeightConfig> <Type>string</Type> </TrafficConfig> </ContinuousDeploymentPolicyConfig> <Id>string</Id> <LastModifiedTime>timestamp</LastModifiedTime> </ContinuousDeploymentPolicy>

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

ContinuousDeploymentPolicy

Root level tag for the ContinuousDeploymentPolicy parameters.

Required: Yes

ContinuousDeploymentPolicyConfig

Contains the configuration for a continuous deployment policy.

Type: ContinuousDeploymentPolicyConfig object

Id

The identifier of the continuous deployment policy.

Type: String

LastModifiedTime

The date and time the continuous deployment policy was last modified.

Type: Timestamp

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDenied

Access denied.

HTTP Status Code: 403

InconsistentQuantities

The value of Quantity and the size of Items don't match.

HTTP Status Code: 400

InvalidArgument

An argument is invalid.

HTTP Status Code: 400

InvalidIfMatchVersion

The If-Match version is missing or not valid.

HTTP Status Code: 400

NoSuchContinuousDeploymentPolicy

The continuous deployment policy doesn't exist.

HTTP Status Code: 404

PreconditionFailed

The precondition in one or more of the request fields evaluated to false.

HTTP Status Code: 412

StagingDistributionInUse

A continuous deployment policy for this staging distribution already exists.

HTTP Status Code: 409

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: