AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

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.

Note:

This is an asynchronous operation using the standard naming convention for .NET 4.5 or higher. For .NET 3.5 the operation is implemented as a pair of methods using the standard naming convention of BeginUpdateContinuousDeploymentPolicy and EndUpdateContinuousDeploymentPolicy.

Namespace: Amazon.CloudFront
Assembly: AWSSDK.CloudFront.dll
Version: 3.x.y.z

Syntax

C#
public virtual Task<UpdateContinuousDeploymentPolicyResponse> UpdateContinuousDeploymentPolicyAsync(
         UpdateContinuousDeploymentPolicyRequest request,
         CancellationToken cancellationToken
)

Parameters

request
Type: Amazon.CloudFront.Model.UpdateContinuousDeploymentPolicyRequest

Container for the necessary parameters to execute the UpdateContinuousDeploymentPolicy service method.

cancellationToken
Type: System.Threading.CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Return Value


The response from the UpdateContinuousDeploymentPolicy service method, as returned by CloudFront.

Exceptions

ExceptionCondition
AccessDeniedException Access denied.
InconsistentQuantitiesException The value of Quantity and the size of Items don't match.
InvalidArgumentException An argument is invalid.
InvalidIfMatchVersionException The If-Match version is missing or not valid.
NoSuchContinuousDeploymentPolicyException The continuous deployment policy doesn't exist.
PreconditionFailedException The precondition in one or more of the request fields evaluated to false.
StagingDistributionInUseException A continuous deployment policy for this staging distribution already exists.

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5

See Also