CfnContinuousDeploymentPolicyPropsMixin
- class aws_cdk.mixins_preview.aws_cloudfront.mixins.CfnContinuousDeploymentPolicyPropsMixin(props, *, strategy=None)
Bases:
MixinCreates 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:
- 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:
props (
Union[CfnContinuousDeploymentPolicyMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- 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
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- 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:
objectContains 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 istrue, this policy is enabled and in effect. When this value isfalse, 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.rproxy.govskope.ca.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:
- 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 isfalse, this policy is not enabled and has no effect.
- 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.
- single_weight_policy_config
This configuration determines the percentage of HTTP requests that are sent to the staging distribution.
- staging_distribution_dns_names
The CloudFront domain name of the staging distribution.
For example:
d111111abcdef8.cloudfront.net.
- traffic_config
Contains the parameters for routing production traffic from your primary to staging distributions.
SessionStickinessConfigProperty
- class CfnContinuousDeploymentPolicyPropsMixin.SessionStickinessConfigProperty(*, idle_ttl=None, maximum_ttl=None)
Bases:
objectSession 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:
- 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).
- 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).
SingleHeaderConfigProperty
- class CfnContinuousDeploymentPolicyPropsMixin.SingleHeaderConfigProperty(*, header=None, value=None)
Bases:
objectDetermines 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 prefixaws-cf-cd-.value (
Optional[str]) – The request header value.
- See:
- 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-.
SingleHeaderPolicyConfigProperty
- class CfnContinuousDeploymentPolicyPropsMixin.SingleHeaderPolicyConfigProperty(*, header=None, value=None)
Bases:
objectDefines 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:
- 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.
- value
Specifies the value to assign to the header for a single header policy.
SingleWeightConfigProperty
- class CfnContinuousDeploymentPolicyPropsMixin.SingleWeightConfigProperty(*, session_stickiness_config=None, weight=None)
Bases:
objectThis 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:
- 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.
- 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.
SingleWeightPolicyConfigProperty
- class CfnContinuousDeploymentPolicyPropsMixin.SingleWeightPolicyConfigProperty(*, session_stickiness_config=None, weight=None)
Bases:
objectConfigure 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:
- 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.
- weight
The percentage of requests that CloudFront will use to send to an associated origin or cache settings.
TrafficConfigProperty
- class CfnContinuousDeploymentPolicyPropsMixin.TrafficConfigProperty(*, single_header_config=None, single_weight_config=None, type=None)
Bases:
objectThe 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:
- 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.
- single_weight_config
Contains the percentage of traffic to send to the staging distribution.