Class: AWSCDK::CodeDeploy::CanaryTrafficRoutingConfig

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
code_deploy/canary_traffic_routing_config.rb

Overview

Represents the configuration specific to canary traffic shifting.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(canary_interval:, canary_percentage:) ⇒ CanaryTrafficRoutingConfig

Returns a new instance of CanaryTrafficRoutingConfig.

Parameters:

  • canary_interval (Numeric)

    The number of minutes between the first and second traffic shifts of a TimeBasedCanary deployment.

  • canary_percentage (Numeric)

    The percentage of traffic to shift in the first increment of a TimeBasedCanary deployment.



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

def initialize(canary_interval:, canary_percentage:)
  @canary_interval = canary_interval
  Jsii::Type.check_type(@canary_interval, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "canaryInterval")
  @canary_percentage = canary_percentage
  Jsii::Type.check_type(@canary_percentage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "canaryPercentage")
end

Instance Attribute Details

#canary_intervalNumeric (readonly)

The number of minutes between the first and second traffic shifts of a TimeBasedCanary deployment.

Returns:

  • (Numeric)


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

def canary_interval
  @canary_interval
end

#canary_percentageNumeric (readonly)

The percentage of traffic to shift in the first increment of a TimeBasedCanary deployment.

Returns:

  • (Numeric)


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

def canary_percentage
  @canary_percentage
end

Class Method Details

.jsii_propertiesObject



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

def self.jsii_properties
  {
    :canary_interval => "canaryInterval",
    :canary_percentage => "canaryPercentage",
  }
end

Instance Method Details

#to_jsiiObject



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

def to_jsii
  result = {}
  result.merge!({
    "canaryInterval" => @canary_interval,
    "canaryPercentage" => @canary_percentage,
  })
  result.compact
end