Class: AWSCDK::CodeDeploy::CfnDeploymentConfig::TimeBasedCanaryProperty

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

Overview

A configuration that shifts traffic from one version of a Lambda function or Amazon ECS task set to another in two increments.

The original and target Lambda function versions or ECS task sets are specified in the deployment's AppSpec file.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(canary_interval:, canary_percentage:) ⇒ TimeBasedCanaryProperty

Returns a new instance of TimeBasedCanaryProperty.

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.



647
648
649
650
651
652
# File 'code_deploy/cfn_deployment_config.rb', line 647

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.



658
659
660
# File 'code_deploy/cfn_deployment_config.rb', line 658

def canary_interval
  @canary_interval
end

#canary_percentageNumeric (readonly)

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



663
664
665
# File 'code_deploy/cfn_deployment_config.rb', line 663

def canary_percentage
  @canary_percentage
end

Class Method Details

.jsii_propertiesObject



665
666
667
668
669
670
# File 'code_deploy/cfn_deployment_config.rb', line 665

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

Instance Method Details

#to_jsiiObject



672
673
674
675
676
677
678
679
# File 'code_deploy/cfn_deployment_config.rb', line 672

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