CfnDeploymentConfigPropsMixin

class aws_cdk.mixins_preview.aws_codedeploy.mixins.CfnDeploymentConfigPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::CodeDeploy::DeploymentConfig resource creates a set of deployment rules, deployment success conditions, and deployment failure conditions that AWS CodeDeploy uses during a deployment.

The deployment configuration specifies the number or percentage of instances that must remain available at any time during a deployment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentconfig.html

CloudformationResource:

AWS::CodeDeploy::DeploymentConfig

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_codedeploy import mixins as codedeploy_mixins

cfn_deployment_config_props_mixin = codedeploy_mixins.CfnDeploymentConfigPropsMixin(codedeploy_mixins.CfnDeploymentConfigMixinProps(
    compute_platform="computePlatform",
    deployment_config_name="deploymentConfigName",
    minimum_healthy_hosts=codedeploy_mixins.CfnDeploymentConfigPropsMixin.MinimumHealthyHostsProperty(
        type="type",
        value=123
    ),
    traffic_routing_config=codedeploy_mixins.CfnDeploymentConfigPropsMixin.TrafficRoutingConfigProperty(
        time_based_canary=codedeploy_mixins.CfnDeploymentConfigPropsMixin.TimeBasedCanaryProperty(
            canary_interval=123,
            canary_percentage=123
        ),
        time_based_linear=codedeploy_mixins.CfnDeploymentConfigPropsMixin.TimeBasedLinearProperty(
            linear_interval=123,
            linear_percentage=123
        ),
        type="type"
    ),
    zonal_config=codedeploy_mixins.CfnDeploymentConfigPropsMixin.ZonalConfigProperty(
        first_zone_monitor_duration_in_seconds=123,
        minimum_healthy_hosts_per_zone=codedeploy_mixins.CfnDeploymentConfigPropsMixin.MinimumHealthyHostsPerZoneProperty(
            type="type",
            value=123
        ),
        monitor_duration_in_seconds=123
    )
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::CodeDeploy::DeploymentConfig.

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 = ['computePlatform', 'deploymentConfigName', 'minimumHealthyHosts', 'trafficRoutingConfig', 'zonalConfig']

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

MinimumHealthyHostsPerZoneProperty

class CfnDeploymentConfigPropsMixin.MinimumHealthyHostsPerZoneProperty(*, type=None, value=None)

Bases: object

Information about the minimum number of healthy instances per Availability Zone.

Parameters:
  • type (Optional[str]) – The type associated with the MinimumHealthyHostsPerZone option.

  • value (Union[int, float, None]) – The value associated with the MinimumHealthyHostsPerZone option.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-minimumhealthyhostsperzone.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_codedeploy import mixins as codedeploy_mixins

minimum_healthy_hosts_per_zone_property = codedeploy_mixins.CfnDeploymentConfigPropsMixin.MinimumHealthyHostsPerZoneProperty(
    type="type",
    value=123
)

Attributes

type

The type associated with the MinimumHealthyHostsPerZone option.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-minimumhealthyhostsperzone.html#cfn-codedeploy-deploymentconfig-minimumhealthyhostsperzone-type

value

The value associated with the MinimumHealthyHostsPerZone option.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-minimumhealthyhostsperzone.html#cfn-codedeploy-deploymentconfig-minimumhealthyhostsperzone-value

MinimumHealthyHostsProperty

class CfnDeploymentConfigPropsMixin.MinimumHealthyHostsProperty(*, type=None, value=None)

Bases: object

MinimumHealthyHosts is a property of the DeploymentConfig resource that defines how many instances must remain healthy during an AWS CodeDeploy deployment.

Parameters:
  • type (Optional[str]) – The minimum healthy instance type:. - HOST_COUNT: The minimum number of healthy instance as an absolute value. - FLEET_PERCENT: The minimum number of healthy instance as a percentage of the total number of instance in the deployment. In an example of nine instance, if a HOST_COUNT of six is specified, deploy to up to three instances at a time. The deployment is successful if six or more instances are deployed to successfully. Otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to five instance at a time. The deployment is successful if four or more instance are deployed to successfully. Otherwise, the deployment fails. .. epigraph:: In a call to GetDeploymentConfig , CodeDeployDefault.OneAtATime returns a minimum healthy instance type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instance at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.) In addition, with CodeDeployDefault.OneAtATime, AWS CodeDeploy attempts to ensure that all instances but one are kept in a healthy state during the deployment. Although this allows one instance at a time to be taken offline for a new deployment, it also means that if the deployment to the last instance fails, the overall deployment is still successful. For more information, see AWS CodeDeploy Instance Health in the AWS CodeDeploy User Guide .

  • value (Union[int, float, None]) – The minimum healthy instance value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-minimumhealthyhosts.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_codedeploy import mixins as codedeploy_mixins

minimum_healthy_hosts_property = codedeploy_mixins.CfnDeploymentConfigPropsMixin.MinimumHealthyHostsProperty(
    type="type",
    value=123
)

Attributes

type

.

  • HOST_COUNT: The minimum number of healthy instance as an absolute value.

  • FLEET_PERCENT: The minimum number of healthy instance as a percentage of the total number of instance in the deployment.

In an example of nine instance, if a HOST_COUNT of six is specified, deploy to up to three instances at a time. The deployment is successful if six or more instances are deployed to successfully. Otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to five instance at a time. The deployment is successful if four or more instance are deployed to successfully. Otherwise, the deployment fails. .. epigraph:

In a call to ``GetDeploymentConfig`` , CodeDeployDefault.OneAtATime returns a minimum healthy instance type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instance at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.) In addition, with CodeDeployDefault.OneAtATime, AWS CodeDeploy attempts to ensure that all instances but one are kept in a healthy state during the deployment. Although this allows one instance at a time to be taken offline for a new deployment, it also means that if the deployment to the last instance fails, the overall deployment is still successful.

For more information, see AWS CodeDeploy Instance Health in the AWS CodeDeploy User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-minimumhealthyhosts.html#cfn-codedeploy-deploymentconfig-minimumhealthyhosts-type

Type:

The minimum healthy instance type

value

The minimum healthy instance value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-minimumhealthyhosts.html#cfn-codedeploy-deploymentconfig-minimumhealthyhosts-value

TimeBasedCanaryProperty

class CfnDeploymentConfigPropsMixin.TimeBasedCanaryProperty(*, canary_interval=None, canary_percentage=None)

Bases: object

A configuration that shifts traffic from one version of a Lambda function or Amazon ECS task set to another in two increments.

The original and target Lambda function versions or ECS task sets are specified in the deployment’s AppSpec file.

Parameters:
  • canary_interval (Union[int, float, None]) – The number of minutes between the first and second traffic shifts of a TimeBasedCanary deployment.

  • canary_percentage (Union[int, float, None]) – The percentage of traffic to shift in the first increment of a TimeBasedCanary deployment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-timebasedcanary.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_codedeploy import mixins as codedeploy_mixins

time_based_canary_property = codedeploy_mixins.CfnDeploymentConfigPropsMixin.TimeBasedCanaryProperty(
    canary_interval=123,
    canary_percentage=123
)

Attributes

canary_interval

The number of minutes between the first and second traffic shifts of a TimeBasedCanary deployment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-timebasedcanary.html#cfn-codedeploy-deploymentconfig-timebasedcanary-canaryinterval

canary_percentage

The percentage of traffic to shift in the first increment of a TimeBasedCanary deployment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-timebasedcanary.html#cfn-codedeploy-deploymentconfig-timebasedcanary-canarypercentage

TimeBasedLinearProperty

class CfnDeploymentConfigPropsMixin.TimeBasedLinearProperty(*, linear_interval=None, linear_percentage=None)

Bases: object

A configuration that shifts traffic from one version of a Lambda function or ECS task set to another in equal increments, with an equal number of minutes between each increment.

The original and target Lambda function versions or ECS task sets are specified in the deployment’s AppSpec file.

Parameters:
  • linear_interval (Union[int, float, None]) – The number of minutes between each incremental traffic shift of a TimeBasedLinear deployment.

  • linear_percentage (Union[int, float, None]) – The percentage of traffic that is shifted at the start of each increment of a TimeBasedLinear deployment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-timebasedlinear.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_codedeploy import mixins as codedeploy_mixins

time_based_linear_property = codedeploy_mixins.CfnDeploymentConfigPropsMixin.TimeBasedLinearProperty(
    linear_interval=123,
    linear_percentage=123
)

Attributes

linear_interval

The number of minutes between each incremental traffic shift of a TimeBasedLinear deployment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-timebasedlinear.html#cfn-codedeploy-deploymentconfig-timebasedlinear-linearinterval

linear_percentage

The percentage of traffic that is shifted at the start of each increment of a TimeBasedLinear deployment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-timebasedlinear.html#cfn-codedeploy-deploymentconfig-timebasedlinear-linearpercentage

TrafficRoutingConfigProperty

class CfnDeploymentConfigPropsMixin.TrafficRoutingConfigProperty(*, time_based_canary=None, time_based_linear=None, type=None)

Bases: object

The configuration that specifies how traffic is shifted from one version of a Lambda function to another version during an AWS Lambda deployment, or from one Amazon ECS task set to another during an Amazon ECS deployment.

Parameters:
  • time_based_canary (Union[IResolvable, TimeBasedCanaryProperty, Dict[str, Any], None]) – A configuration that shifts traffic from one version of a Lambda function or ECS task set to another in two increments. The original and target Lambda function versions or ECS task sets are specified in the deployment’s AppSpec file.

  • time_based_linear (Union[IResolvable, TimeBasedLinearProperty, Dict[str, Any], None]) – A configuration that shifts traffic from one version of a Lambda function or Amazon ECS task set to another in equal increments, with an equal number of minutes between each increment. The original and target Lambda function versions or Amazon ECS task sets are specified in the deployment’s AppSpec file.

  • type (Optional[str]) – The type of traffic shifting ( TimeBasedCanary or TimeBasedLinear ) used by a deployment configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-trafficroutingconfig.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_codedeploy import mixins as codedeploy_mixins

traffic_routing_config_property = codedeploy_mixins.CfnDeploymentConfigPropsMixin.TrafficRoutingConfigProperty(
    time_based_canary=codedeploy_mixins.CfnDeploymentConfigPropsMixin.TimeBasedCanaryProperty(
        canary_interval=123,
        canary_percentage=123
    ),
    time_based_linear=codedeploy_mixins.CfnDeploymentConfigPropsMixin.TimeBasedLinearProperty(
        linear_interval=123,
        linear_percentage=123
    ),
    type="type"
)

Attributes

time_based_canary

A configuration that shifts traffic from one version of a Lambda function or ECS task set to another in two increments.

The original and target Lambda function versions or ECS task sets are specified in the deployment’s AppSpec file.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-trafficroutingconfig.html#cfn-codedeploy-deploymentconfig-trafficroutingconfig-timebasedcanary

time_based_linear

A configuration that shifts traffic from one version of a Lambda function or Amazon ECS task set to another in equal increments, with an equal number of minutes between each increment.

The original and target Lambda function versions or Amazon ECS task sets are specified in the deployment’s AppSpec file.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-trafficroutingconfig.html#cfn-codedeploy-deploymentconfig-trafficroutingconfig-timebasedlinear

type

The type of traffic shifting ( TimeBasedCanary or TimeBasedLinear ) used by a deployment configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-trafficroutingconfig.html#cfn-codedeploy-deploymentconfig-trafficroutingconfig-type

ZonalConfigProperty

class CfnDeploymentConfigPropsMixin.ZonalConfigProperty(*, first_zone_monitor_duration_in_seconds=None, minimum_healthy_hosts_per_zone=None, monitor_duration_in_seconds=None)

Bases: object

Configure the ZonalConfig object if you want AWS CodeDeploy to deploy your application to one Availability Zone at a time, within an AWS Region. By deploying to one Availability Zone at a time, you can expose your deployment to a progressively larger audience as confidence in the deployment’s performance and viability grows. If you don’t configure the ZonalConfig object, CodeDeploy deploys your application to a random selection of hosts across a Region.

For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide .

Parameters:
  • first_zone_monitor_duration_in_seconds (Union[int, float, None]) –

    The period of time, in seconds, that CodeDeploy must wait after completing a deployment to the first Availability Zone. CodeDeploy will wait this amount of time before starting a deployment to the second Availability Zone. You might set this option if you want to allow extra bake time for the first Availability Zone. If you don’t specify a value for firstZoneMonitorDurationInSeconds , then CodeDeploy uses the monitorDurationInSeconds value for the first Availability Zone. For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide .

  • minimum_healthy_hosts_per_zone (Union[IResolvable, MinimumHealthyHostsPerZoneProperty, Dict[str, Any], None]) –

    The number or percentage of instances that must remain available per Availability Zone during a deployment. This option works in conjunction with the MinimumHealthyHosts option. For more information, see About the minimum number of healthy hosts per Availability Zone in the CodeDeploy User Guide . If you don’t specify the minimumHealthyHostsPerZone option, then CodeDeploy uses a default value of 0 percent. For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide .

  • monitor_duration_in_seconds (Union[int, float, None]) –

    The period of time, in seconds, that CodeDeploy must wait after completing a deployment to an Availability Zone. CodeDeploy will wait this amount of time before starting a deployment to the next Availability Zone. Consider adding a monitor duration to give the deployment some time to prove itself (or ‘bake’) in one Availability Zone before it is released in the next zone. If you don’t specify a monitorDurationInSeconds , CodeDeploy starts deploying to the next Availability Zone immediately. For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-zonalconfig.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_codedeploy import mixins as codedeploy_mixins

zonal_config_property = codedeploy_mixins.CfnDeploymentConfigPropsMixin.ZonalConfigProperty(
    first_zone_monitor_duration_in_seconds=123,
    minimum_healthy_hosts_per_zone=codedeploy_mixins.CfnDeploymentConfigPropsMixin.MinimumHealthyHostsPerZoneProperty(
        type="type",
        value=123
    ),
    monitor_duration_in_seconds=123
)

Attributes

first_zone_monitor_duration_in_seconds

The period of time, in seconds, that CodeDeploy must wait after completing a deployment to the first Availability Zone.

CodeDeploy will wait this amount of time before starting a deployment to the second Availability Zone. You might set this option if you want to allow extra bake time for the first Availability Zone. If you don’t specify a value for firstZoneMonitorDurationInSeconds , then CodeDeploy uses the monitorDurationInSeconds value for the first Availability Zone.

For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-zonalconfig.html#cfn-codedeploy-deploymentconfig-zonalconfig-firstzonemonitordurationinseconds

minimum_healthy_hosts_per_zone

The number or percentage of instances that must remain available per Availability Zone during a deployment.

This option works in conjunction with the MinimumHealthyHosts option. For more information, see About the minimum number of healthy hosts per Availability Zone in the CodeDeploy User Guide .

If you don’t specify the minimumHealthyHostsPerZone option, then CodeDeploy uses a default value of 0 percent.

For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-zonalconfig.html#cfn-codedeploy-deploymentconfig-zonalconfig-minimumhealthyhostsperzone

monitor_duration_in_seconds

The period of time, in seconds, that CodeDeploy must wait after completing a deployment to an Availability Zone.

CodeDeploy will wait this amount of time before starting a deployment to the next Availability Zone. Consider adding a monitor duration to give the deployment some time to prove itself (or ‘bake’) in one Availability Zone before it is released in the next zone. If you don’t specify a monitorDurationInSeconds , CodeDeploy starts deploying to the next Availability Zone immediately.

For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-zonalconfig.html#cfn-codedeploy-deploymentconfig-zonalconfig-monitordurationinseconds