CfnDeploymentConfigPropsMixin
- class aws_cdk.mixins_preview.aws_codedeploy.mixins.CfnDeploymentConfigPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::CodeDeploy::DeploymentConfigresource 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:
- 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:
props (
Union[CfnDeploymentConfigMixinProps,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 = ['computePlatform', 'deploymentConfigName', 'minimumHealthyHosts', 'trafficRoutingConfig', 'zonalConfig']
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
MinimumHealthyHostsPerZoneProperty
- class CfnDeploymentConfigPropsMixin.MinimumHealthyHostsPerZoneProperty(*, type=None, value=None)
Bases:
objectInformation about the minimum number of healthy instances per Availability Zone.
- Parameters:
type (
Optional[str]) – Thetypeassociated with theMinimumHealthyHostsPerZoneoption.value (
Union[int,float,None]) – Thevalueassociated with theMinimumHealthyHostsPerZoneoption.
- 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_codedeploy import mixins as codedeploy_mixins minimum_healthy_hosts_per_zone_property = codedeploy_mixins.CfnDeploymentConfigPropsMixin.MinimumHealthyHostsPerZoneProperty( type="type", value=123 )
Attributes
- type
The
typeassociated with theMinimumHealthyHostsPerZoneoption.
- value
The
valueassociated with theMinimumHealthyHostsPerZoneoption.
MinimumHealthyHostsProperty
- class CfnDeploymentConfigPropsMixin.MinimumHealthyHostsProperty(*, type=None, value=None)
Bases:
objectMinimumHealthyHostsis 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 toGetDeploymentConfig, 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:
- 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 .
- value
The minimum healthy instance value.
TimeBasedCanaryProperty
- class CfnDeploymentConfigPropsMixin.TimeBasedCanaryProperty(*, canary_interval=None, canary_percentage=None)
Bases:
objectA 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 aTimeBasedCanarydeployment.canary_percentage (
Union[int,float,None]) – The percentage of traffic to shift in the first increment of aTimeBasedCanarydeployment.
- 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_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
TimeBasedCanarydeployment.
- canary_percentage
The percentage of traffic to shift in the first increment of a
TimeBasedCanarydeployment.
TimeBasedLinearProperty
- class CfnDeploymentConfigPropsMixin.TimeBasedLinearProperty(*, linear_interval=None, linear_percentage=None)
Bases:
objectA 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 aTimeBasedLineardeployment.linear_percentage (
Union[int,float,None]) – The percentage of traffic that is shifted at the start of each increment of aTimeBasedLineardeployment.
- 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_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
TimeBasedLineardeployment.
- linear_percentage
The percentage of traffic that is shifted at the start of each increment of a
TimeBasedLineardeployment.
TrafficRoutingConfigProperty
- class CfnDeploymentConfigPropsMixin.TrafficRoutingConfigProperty(*, time_based_canary=None, time_based_linear=None, type=None)
Bases:
objectThe 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 (TimeBasedCanaryorTimeBasedLinear) used by a deployment 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_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.
- 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.
- type
The type of traffic shifting (
TimeBasedCanaryorTimeBasedLinear) used by a deployment configuration.
ZonalConfigProperty
- class CfnDeploymentConfigPropsMixin.ZonalConfigProperty(*, first_zone_monitor_duration_in_seconds=None, minimum_healthy_hosts_per_zone=None, monitor_duration_in_seconds=None)
Bases:
objectConfigure the
ZonalConfigobject 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 theZonalConfigobject, 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 themonitorDurationInSecondsvalue 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
MinimumHealthyHostsoption. For more information, see About the minimum number of healthy hosts per Availability Zone in the CodeDeploy User Guide . If you don’t specify theminimumHealthyHostsPerZoneoption, then CodeDeploy uses a default value of0percent. 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:
- 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 themonitorDurationInSecondsvalue 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
The number or percentage of instances that must remain available per Availability Zone during a deployment.
This option works in conjunction with the
MinimumHealthyHostsoption. 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
minimumHealthyHostsPerZoneoption, then CodeDeploy uses a default value of0percent.For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide .
- 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 .