Class: AWSCDK::ECS::CfnService::LinearConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::CfnService::LinearConfigurationProperty
- Defined in:
- ecs/cfn_service.rb
Overview
Configuration for a linear deployment strategy that shifts production traffic in equal percentage increments with configurable wait times between each step until 100 percent of traffic is shifted to the new service revision.
The following validation applies only to Linear deployments created through CloudFormation . CloudFormation operations time out after 36 hours. Linear deployments can approach this limit because of their extended duration. This can cause CloudFormation to roll back the deployment. To prevent timeout-related rollbacks, CloudFormation rejects deployments when the calculated deployment time exceeds 33 hours based on your template configuration:
BakeTimeInMinutes + (StepBakeTimeInMinutes × Number of deployment steps)
Where the number of deployment steps is calculated as follows:
- If
StepPercentevenly divides by 100 : The number of deployment steps equals(100 ÷ StepPercent) - 1 - Otherwise : The number of deployment steps equals the floor of
100 ÷ StepPercent. For example, ifStepPercentis 11, the number of deployment steps is 9 (not 9.1).
This calculation reflects that CloudFormation doesn't apply the step bake time after the final traffic shift reaches 100%. For example, with a StepPercent of 50%, there are actually two traffic shifts, but only one deployment step is counted for validation purposes because the bake time is applied only after the first 50% shift, not after reaching 100%.
Additional backend processes (such as task scaling and running lifecycle hooks) can extend deployment time beyond these calculations. Even deployments under the 33-hour threshold might still time out if these processes cause the total duration to exceed 36 hours.
Instance Attribute Summary collapse
-
#step_bake_time_in_minutes ⇒ Numeric?
readonly
The amount of time in minutes to wait between each traffic shifting step during a linear deployment.
-
#step_percent ⇒ Numeric?
readonly
The percentage of production traffic to shift in each step during a linear deployment.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(step_bake_time_in_minutes: nil, step_percent: nil) ⇒ LinearConfigurationProperty
constructor
A new instance of LinearConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(step_bake_time_in_minutes: nil, step_percent: nil) ⇒ LinearConfigurationProperty
Returns a new instance of LinearConfigurationProperty.
1838 1839 1840 1841 1842 1843 |
# File 'ecs/cfn_service.rb', line 1838 def initialize(step_bake_time_in_minutes: nil, step_percent: nil) @step_bake_time_in_minutes = step_bake_time_in_minutes Jsii::Type.check_type(@step_bake_time_in_minutes, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "stepBakeTimeInMinutes") unless @step_bake_time_in_minutes.nil? @step_percent = step_percent Jsii::Type.check_type(@step_percent, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "stepPercent") unless @step_percent.nil? end |
Instance Attribute Details
#step_bake_time_in_minutes ⇒ Numeric? (readonly)
The amount of time in minutes to wait between each traffic shifting step during a linear deployment.
Valid values are 0 to 1440 minutes (24 hours). The default value is 6. This bake time is not applied after reaching 100 percent traffic.
1851 1852 1853 |
# File 'ecs/cfn_service.rb', line 1851 def step_bake_time_in_minutes @step_bake_time_in_minutes end |
#step_percent ⇒ Numeric? (readonly)
The percentage of production traffic to shift in each step during a linear deployment.
Valid values are multiples of 0.1 from 3.0 to 100.0. The default value is 10.0.
1858 1859 1860 |
# File 'ecs/cfn_service.rb', line 1858 def step_percent @step_percent end |
Class Method Details
.jsii_properties ⇒ Object
1860 1861 1862 1863 1864 1865 |
# File 'ecs/cfn_service.rb', line 1860 def self.jsii_properties { :step_bake_time_in_minutes => "stepBakeTimeInMinutes", :step_percent => "stepPercent", } end |
Instance Method Details
#to_jsii ⇒ Object
1867 1868 1869 1870 1871 1872 1873 1874 |
# File 'ecs/cfn_service.rb', line 1867 def to_jsii result = {} result.merge!({ "stepBakeTimeInMinutes" => @step_bake_time_in_minutes, "stepPercent" => @step_percent, }) result.compact end |