Class: AWSCDK::ECS::TrafficShiftConfig

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs/traffic_shift_config.rb

Overview

Configuration for traffic shift during progressive deployments.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(step_bake_time: nil, step_percent: nil) ⇒ TrafficShiftConfig

Returns a new instance of TrafficShiftConfig.

Parameters:

  • step_bake_time (AWSCDK::Duration, nil) (defaults to: nil)

    The duration to wait between traffic shifting steps.

  • step_percent (Numeric, nil) (defaults to: nil)

    The percentage of production traffic to shift in each step.



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_timeAWSCDK::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).

Returns:



22
23
24
# File 'ecs/traffic_shift_config.rb', line 22

def step_bake_time
  @step_bake_time
end

#step_percentNumeric? (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

Returns:

  • (Numeric, nil)


30
31
32
# File 'ecs/traffic_shift_config.rb', line 30

def step_percent
  @step_percent
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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