Class: AWSCDK::CodeDeploy::CfnDeploymentConfig::TrafficRoutingConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CodeDeploy::CfnDeploymentConfig::TrafficRoutingConfigProperty
- Defined in:
- code_deploy/cfn_deployment_config.rb
Overview
The configuration that specifies how traffic is shifted from one version of a Lambda function to another version during an AWS Lambda deployment, or from one Amazon ECS task set to another during an Amazon ECS deployment.
Instance Attribute Summary collapse
-
#time_based_canary ⇒ AWSCDK::IResolvable, ...
readonly
A configuration that shifts traffic from one version of a Lambda function or ECS task set to another in two increments.
-
#time_based_linear ⇒ AWSCDK::IResolvable, ...
readonly
A configuration that shifts traffic from one version of a Lambda function or Amazon ECS task set to another in equal increments, with an equal number of minutes between each increment.
-
#type ⇒ String
readonly
The type of traffic shifting (
TimeBasedCanaryorTimeBasedLinear) used by a deployment configuration.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, time_based_canary: nil, time_based_linear: nil) ⇒ TrafficRoutingConfigProperty
constructor
A new instance of TrafficRoutingConfigProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(type:, time_based_canary: nil, time_based_linear: nil) ⇒ TrafficRoutingConfigProperty
Returns a new instance of TrafficRoutingConfigProperty.
736 737 738 739 740 741 742 743 |
# File 'code_deploy/cfn_deployment_config.rb', line 736 def initialize(type:, time_based_canary: nil, time_based_linear: nil) @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") @time_based_canary = time_based_canary.is_a?(Hash) ? ::AWSCDK::CodeDeploy::CfnDeploymentConfig::TimeBasedCanaryProperty.new(**time_based_canary.transform_keys(&:to_sym)) : time_based_canary Jsii::Type.check_type(@time_based_canary, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlZGVwbG95LkNmbkRlcGxveW1lbnRDb25maWcuVGltZUJhc2VkQ2FuYXJ5UHJvcGVydHkifV19fQ==")), "timeBasedCanary") unless @time_based_canary.nil? @time_based_linear = time_based_linear.is_a?(Hash) ? ::AWSCDK::CodeDeploy::CfnDeploymentConfig::TimeBasedLinearProperty.new(**time_based_linear.transform_keys(&:to_sym)) : time_based_linear Jsii::Type.check_type(@time_based_linear, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlZGVwbG95LkNmbkRlcGxveW1lbnRDb25maWcuVGltZUJhc2VkTGluZWFyUHJvcGVydHkifV19fQ==")), "timeBasedLinear") unless @time_based_linear.nil? end |
Instance Attribute Details
#time_based_canary ⇒ AWSCDK::IResolvable, ... (readonly)
A configuration that shifts traffic from one version of a Lambda function or 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.
756 757 758 |
# File 'code_deploy/cfn_deployment_config.rb', line 756 def time_based_canary @time_based_canary end |
#time_based_linear ⇒ AWSCDK::IResolvable, ... (readonly)
A configuration that shifts traffic from one version of a Lambda function or Amazon ECS task set to another in equal increments, with an equal number of minutes between each increment.
The original and target Lambda function versions or Amazon ECS task sets are specified in the deployment's AppSpec file.
763 764 765 |
# File 'code_deploy/cfn_deployment_config.rb', line 763 def time_based_linear @time_based_linear end |
#type ⇒ String (readonly)
The type of traffic shifting ( TimeBasedCanary or TimeBasedLinear ) used by a deployment configuration.
749 750 751 |
# File 'code_deploy/cfn_deployment_config.rb', line 749 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
765 766 767 768 769 770 771 |
# File 'code_deploy/cfn_deployment_config.rb', line 765 def self.jsii_properties { :type => "type", :time_based_canary => "timeBasedCanary", :time_based_linear => "timeBasedLinear", } end |
Instance Method Details
#to_jsii ⇒ Object
773 774 775 776 777 778 779 780 781 |
# File 'code_deploy/cfn_deployment_config.rb', line 773 def to_jsii result = {} result.merge!({ "type" => @type, "timeBasedCanary" => @time_based_canary, "timeBasedLinear" => @time_based_linear, }) result.compact end |