CfnContinuousDeploymentPolicyPropsMixin

class aws_cdk.mixins_preview.aws_cloudfront.mixins.CfnContinuousDeploymentPolicyPropsMixin(props, *, strategy=None)

Bases: Mixin

Creates a continuous deployment policy that routes a subset of production traffic from a primary distribution to a staging distribution.

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.

For more information, see Using CloudFront continuous deployment to safely test CDN configuration changes in the Amazon CloudFront Developer Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-continuousdeploymentpolicy.html

CloudformationResource:

AWS::CloudFront::ContinuousDeploymentPolicy

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_cloudfront import mixins as cloudfront_mixins

cfn_continuous_deployment_policy_props_mixin = cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin(cloudfront_mixins.CfnContinuousDeploymentPolicyMixinProps(
    continuous_deployment_policy_config=cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.ContinuousDeploymentPolicyConfigProperty(
        enabled=False,
        single_header_policy_config=cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SingleHeaderPolicyConfigProperty(
            header="header",
            value="value"
        ),
        single_weight_policy_config=cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SingleWeightPolicyConfigProperty(
            session_stickiness_config=cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SessionStickinessConfigProperty(
                idle_ttl=123,
                maximum_ttl=123
            ),
            weight=123
        ),
        staging_distribution_dns_names=["stagingDistributionDnsNames"],
        traffic_config=cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.TrafficConfigProperty(
            single_header_config=cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SingleHeaderConfigProperty(
                header="header",
                value="value"
            ),
            single_weight_config=cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SingleWeightConfigProperty(
                session_stickiness_config=cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SessionStickinessConfigProperty(
                    idle_ttl=123,
                    maximum_ttl=123
                ),
                weight=123
            ),
            type="type"
        ),
        type="type"
    )
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::CloudFront::ContinuousDeploymentPolicy.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['continuousDeploymentPolicyConfig']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

ContinuousDeploymentPolicyConfigProperty

class CfnContinuousDeploymentPolicyPropsMixin.ContinuousDeploymentPolicyConfigProperty(*, enabled=None, single_header_policy_config=None, single_weight_policy_config=None, staging_distribution_dns_names=None, traffic_config=None, type=None)

Bases: object

Contains the configuration for a continuous deployment policy.

Parameters:
  • enabled (Union[bool, IResolvable, None]) – 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.

  • single_header_policy_config (Union[IResolvable, SingleHeaderPolicyConfigProperty, Dict[str, Any], None]) – 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.

  • single_weight_policy_config (Union[IResolvable, SingleWeightPolicyConfigProperty, Dict[str, Any], None]) – This configuration determines the percentage of HTTP requests that are sent to the staging distribution.

  • staging_distribution_dns_names (Optional[Sequence[str]]) – The CloudFront domain name of the staging distribution. For example: d111111abcdef8.cloudfront.net .

  • traffic_config (Union[IResolvable, TrafficConfigProperty, Dict[str, Any], None]) – Contains the parameters for routing production traffic from your primary to staging distributions.

  • type (Optional[str]) – The type of traffic configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-continuousdeploymentpolicyconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_cloudfront import mixins as cloudfront_mixins

continuous_deployment_policy_config_property = cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.ContinuousDeploymentPolicyConfigProperty(
    enabled=False,
    single_header_policy_config=cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SingleHeaderPolicyConfigProperty(
        header="header",
        value="value"
    ),
    single_weight_policy_config=cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SingleWeightPolicyConfigProperty(
        session_stickiness_config=cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SessionStickinessConfigProperty(
            idle_ttl=123,
            maximum_ttl=123
        ),
        weight=123
    ),
    staging_distribution_dns_names=["stagingDistributionDnsNames"],
    traffic_config=cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.TrafficConfigProperty(
        single_header_config=cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SingleHeaderConfigProperty(
            header="header",
            value="value"
        ),
        single_weight_config=cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SingleWeightConfigProperty(
            session_stickiness_config=cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SessionStickinessConfigProperty(
                idle_ttl=123,
                maximum_ttl=123
            ),
            weight=123
        ),
        type="type"
    ),
    type="type"
)

Attributes

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-continuousdeploymentpolicyconfig.html#cfn-cloudfront-continuousdeploymentpolicy-continuousdeploymentpolicyconfig-enabled

single_header_policy_config

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-continuousdeploymentpolicyconfig.html#cfn-cloudfront-continuousdeploymentpolicy-continuousdeploymentpolicyconfig-singleheaderpolicyconfig

single_weight_policy_config

This configuration determines the percentage of HTTP requests that are sent to the staging distribution.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-continuousdeploymentpolicyconfig.html#cfn-cloudfront-continuousdeploymentpolicy-continuousdeploymentpolicyconfig-singleweightpolicyconfig

staging_distribution_dns_names

The CloudFront domain name of the staging distribution.

For example: d111111abcdef8.cloudfront.net .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-continuousdeploymentpolicyconfig.html#cfn-cloudfront-continuousdeploymentpolicy-continuousdeploymentpolicyconfig-stagingdistributiondnsnames

traffic_config

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-continuousdeploymentpolicyconfig.html#cfn-cloudfront-continuousdeploymentpolicy-continuousdeploymentpolicyconfig-trafficconfig

type

The type of traffic configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-continuousdeploymentpolicyconfig.html#cfn-cloudfront-continuousdeploymentpolicy-continuousdeploymentpolicyconfig-type

SessionStickinessConfigProperty

class CfnContinuousDeploymentPolicyPropsMixin.SessionStickinessConfigProperty(*, idle_ttl=None, maximum_ttl=None)

Bases: object

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.

Parameters:
  • idle_ttl (Union[int, float, None]) – 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).

  • maximum_ttl (Union[int, float, None]) – 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).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-sessionstickinessconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_cloudfront import mixins as cloudfront_mixins

session_stickiness_config_property = cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SessionStickinessConfigProperty(
    idle_ttl=123,
    maximum_ttl=123
)

Attributes

idle_ttl

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).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-sessionstickinessconfig.html#cfn-cloudfront-continuousdeploymentpolicy-sessionstickinessconfig-idlettl

maximum_ttl

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).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-sessionstickinessconfig.html#cfn-cloudfront-continuousdeploymentpolicy-sessionstickinessconfig-maximumttl

SingleHeaderConfigProperty

class CfnContinuousDeploymentPolicyPropsMixin.SingleHeaderConfigProperty(*, header=None, value=None)

Bases: object

Determines which HTTP requests are sent to the staging distribution.

Parameters:
  • header (Optional[str]) – The request header name that you want CloudFront to send to your staging distribution. The header must contain the prefix aws-cf-cd- .

  • value (Optional[str]) – The request header value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-singleheaderconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_cloudfront import mixins as cloudfront_mixins

single_header_config_property = cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SingleHeaderConfigProperty(
    header="header",
    value="value"
)

Attributes

header

The request header name that you want CloudFront to send to your staging distribution.

The header must contain the prefix aws-cf-cd- .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-singleheaderconfig.html#cfn-cloudfront-continuousdeploymentpolicy-singleheaderconfig-header

value

The request header value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-singleheaderconfig.html#cfn-cloudfront-continuousdeploymentpolicy-singleheaderconfig-value

SingleHeaderPolicyConfigProperty

class CfnContinuousDeploymentPolicyPropsMixin.SingleHeaderPolicyConfigProperty(*, header=None, value=None)

Bases: object

Defines a single header policy for a CloudFront distribution.

This property is legacy. We recommend that you use TrafficConfig and specify the SingleHeaderConfig property instead.

Parameters:
  • header (Optional[str]) – The name of the HTTP header that CloudFront uses to configure for the single header policy.

  • value (Optional[str]) – Specifies the value to assign to the header for a single header policy.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-singleheaderpolicyconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_cloudfront import mixins as cloudfront_mixins

single_header_policy_config_property = cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SingleHeaderPolicyConfigProperty(
    header="header",
    value="value"
)

Attributes

header

The name of the HTTP header that CloudFront uses to configure for the single header policy.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-singleheaderpolicyconfig.html#cfn-cloudfront-continuousdeploymentpolicy-singleheaderpolicyconfig-header

value

Specifies the value to assign to the header for a single header policy.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-singleheaderpolicyconfig.html#cfn-cloudfront-continuousdeploymentpolicy-singleheaderpolicyconfig-value

SingleWeightConfigProperty

class CfnContinuousDeploymentPolicyPropsMixin.SingleWeightConfigProperty(*, session_stickiness_config=None, weight=None)

Bases: object

This configuration determines the percentage of HTTP requests that are sent to the staging distribution.

Parameters:
  • session_stickiness_config (Union[IResolvable, SessionStickinessConfigProperty, Dict[str, Any], None]) – 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 (Union[int, float, None]) – 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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-singleweightconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_cloudfront import mixins as cloudfront_mixins

single_weight_config_property = cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SingleWeightConfigProperty(
    session_stickiness_config=cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SessionStickinessConfigProperty(
        idle_ttl=123,
        maximum_ttl=123
    ),
    weight=123
)

Attributes

session_stickiness_config

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-singleweightconfig.html#cfn-cloudfront-continuousdeploymentpolicy-singleweightconfig-sessionstickinessconfig

weight

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-singleweightconfig.html#cfn-cloudfront-continuousdeploymentpolicy-singleweightconfig-weight

SingleWeightPolicyConfigProperty

class CfnContinuousDeploymentPolicyPropsMixin.SingleWeightPolicyConfigProperty(*, session_stickiness_config=None, weight=None)

Bases: object

Configure a policy that CloudFront uses to route requests to different origins or use different cache settings, based on the weight assigned to each option.

This property is legacy. We recommend that you use TrafficConfig and specify the SingleWeightConfig property instead.

Parameters:
  • session_stickiness_config (Union[IResolvable, SessionStickinessConfigProperty, Dict[str, Any], None]) – Enable session stickiness for the associated origin or cache settings.

  • weight (Union[int, float, None]) – The percentage of requests that CloudFront will use to send to an associated origin or cache settings.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-singleweightpolicyconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_cloudfront import mixins as cloudfront_mixins

single_weight_policy_config_property = cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SingleWeightPolicyConfigProperty(
    session_stickiness_config=cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SessionStickinessConfigProperty(
        idle_ttl=123,
        maximum_ttl=123
    ),
    weight=123
)

Attributes

session_stickiness_config

Enable session stickiness for the associated origin or cache settings.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-singleweightpolicyconfig.html#cfn-cloudfront-continuousdeploymentpolicy-singleweightpolicyconfig-sessionstickinessconfig

weight

The percentage of requests that CloudFront will use to send to an associated origin or cache settings.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-singleweightpolicyconfig.html#cfn-cloudfront-continuousdeploymentpolicy-singleweightpolicyconfig-weight

TrafficConfigProperty

class CfnContinuousDeploymentPolicyPropsMixin.TrafficConfigProperty(*, single_header_config=None, single_weight_config=None, type=None)

Bases: object

The traffic configuration of your continuous deployment.

Parameters:
  • single_header_config (Union[IResolvable, SingleHeaderConfigProperty, Dict[str, Any], None]) – Determines which HTTP requests are sent to the staging distribution.

  • single_weight_config (Union[IResolvable, SingleWeightConfigProperty, Dict[str, Any], None]) – Contains the percentage of traffic to send to the staging distribution.

  • type (Optional[str]) – The type of traffic configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-trafficconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_cloudfront import mixins as cloudfront_mixins

traffic_config_property = cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.TrafficConfigProperty(
    single_header_config=cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SingleHeaderConfigProperty(
        header="header",
        value="value"
    ),
    single_weight_config=cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SingleWeightConfigProperty(
        session_stickiness_config=cloudfront_mixins.CfnContinuousDeploymentPolicyPropsMixin.SessionStickinessConfigProperty(
            idle_ttl=123,
            maximum_ttl=123
        ),
        weight=123
    ),
    type="type"
)

Attributes

single_header_config

Determines which HTTP requests are sent to the staging distribution.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-trafficconfig.html#cfn-cloudfront-continuousdeploymentpolicy-trafficconfig-singleheaderconfig

single_weight_config

Contains the percentage of traffic to send to the staging distribution.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-trafficconfig.html#cfn-cloudfront-continuousdeploymentpolicy-trafficconfig-singleweightconfig

type

The type of traffic configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-trafficconfig.html#cfn-cloudfront-continuousdeploymentpolicy-trafficconfig-type