Class: AWSCDK::ECS::TrafficShiftConfig
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::TrafficShiftConfig
- Defined in:
- ecs/traffic_shift_config.rb
Overview
Configuration for traffic shift during progressive deployments.
Instance Attribute Summary collapse
-
#step_bake_time ⇒ AWSCDK::Duration?
readonly
The duration to wait between traffic shifting steps.
-
#step_percent ⇒ Numeric?
readonly
The percentage of production traffic to shift in each step.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(step_bake_time: nil, step_percent: nil) ⇒ TrafficShiftConfig
constructor
A new instance of TrafficShiftConfig.
- #to_jsii ⇒ Object
Constructor Details
#initialize(step_bake_time: nil, step_percent: nil) ⇒ TrafficShiftConfig
Returns a new instance of TrafficShiftConfig.
9 10 11 12 13 14 |
# File 'ecs/traffic_shift_config.rb', line 9 def initialize(step_bake_time: nil, step_percent: nil) @step_bake_time = step_bake_time Jsii::Type.check_type(@step_bake_time, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "stepBakeTime") unless @step_bake_time.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 ⇒ AWSCDK::Duration? (readonly)
Note:
Default: - Duration.minutes(6) for linear, Duration.minutes(10) for canary
The duration to wait between traffic shifting steps.
Valid values are 0 to 1440 minutes (24 hours).
22 23 24 |
# File 'ecs/traffic_shift_config.rb', line 22 def step_bake_time @step_bake_time end |
#step_percent ⇒ Numeric? (readonly)
Note:
Default: - 10.0 for linear, 5.0 for canary
The percentage of production traffic to shift in each step.
- For linear deployment: multiples of 0.1 from 3.0 to 100.0
- For canary deployment: multiples of 0.1 from 0.1 to 100.0
30 31 32 |
# File 'ecs/traffic_shift_config.rb', line 30 def step_percent @step_percent end |
Class Method Details
.jsii_properties ⇒ Object
32 33 34 35 36 37 |
# File 'ecs/traffic_shift_config.rb', line 32 def self.jsii_properties { :step_bake_time => "stepBakeTime", :step_percent => "stepPercent", } end |
Instance Method Details
#to_jsii ⇒ Object
39 40 41 42 43 44 45 46 |
# File 'ecs/traffic_shift_config.rb', line 39 def to_jsii result = {} result.merge!({ "stepBakeTime" => @step_bake_time, "stepPercent" => @step_percent, }) result.compact end |