Class: AWSCDK::CodeDeploy::TimeBasedLinearTrafficRoutingProps

Inherits:
BaseTrafficShiftingConfigProps
  • Object
show all
Defined in:
code_deploy/time_based_linear_traffic_routing_props.rb

Overview

Construction properties for TimeBasedLinearTrafficRouting.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(interval:, percentage:) ⇒ TimeBasedLinearTrafficRoutingProps

Returns a new instance of TimeBasedLinearTrafficRoutingProps.

Parameters:

  • interval (AWSCDK::Duration)

    The amount of time between traffic shifts.

  • percentage (Numeric)

    The percentage to increase traffic on each traffic shift.



9
10
11
12
13
14
# File 'code_deploy/time_based_linear_traffic_routing_props.rb', line 9

def initialize(interval:, percentage:)
  @interval = interval
  Jsii::Type.check_type(@interval, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "interval")
  @percentage = percentage
  Jsii::Type.check_type(@percentage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "percentage")
end

Instance Attribute Details

#intervalAWSCDK::Duration (readonly)

The amount of time between traffic shifts.

Returns:



19
20
21
# File 'code_deploy/time_based_linear_traffic_routing_props.rb', line 19

def interval
  @interval
end

#percentageNumeric (readonly)

The percentage to increase traffic on each traffic shift.

Returns:

  • (Numeric)


23
24
25
# File 'code_deploy/time_based_linear_traffic_routing_props.rb', line 23

def percentage
  @percentage
end

Class Method Details

.jsii_propertiesObject



25
26
27
28
29
30
# File 'code_deploy/time_based_linear_traffic_routing_props.rb', line 25

def self.jsii_properties
  {
    :interval => "interval",
    :percentage => "percentage",
  }
end

Instance Method Details

#to_jsiiObject



32
33
34
35
36
37
38
39
40
# File 'code_deploy/time_based_linear_traffic_routing_props.rb', line 32

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "interval" => @interval,
    "percentage" => @percentage,
  })
  result.compact
end