Class: AWSCDK::AppConfig::RolloutStrategy
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::AppConfig::RolloutStrategy
- Defined in:
- app_config/rollout_strategy.rb
Overview
Defines the rollout strategy for a deployment strategy and includes the growth factor, deployment duration, growth type, and optionally final bake time.
Class Method Summary collapse
-
.ALL_AT_ONCE ⇒ AWSCDK::AppConfig::RolloutStrategy
Quick.
-
.CANARY_10_PERCENT_20_MINUTES ⇒ AWSCDK::AppConfig::RolloutStrategy
AWS Recommended.
-
.exponential(props) ⇒ AWSCDK::AppConfig::RolloutStrategy
Build your own exponential rollout strategy.
- .jsii_overridable_methods ⇒ Object
-
.linear(props) ⇒ AWSCDK::AppConfig::RolloutStrategy
Build your own linear rollout strategy.
-
.LINEAR_20_PERCENT_EVERY_6_MINUTES ⇒ AWSCDK::AppConfig::RolloutStrategy
AWS Recommended.
-
.LINEAR_50_PERCENT_EVERY_30_SECONDS ⇒ AWSCDK::AppConfig::RolloutStrategy
Testing/Demonstration.
Instance Method Summary collapse
-
#deployment_duration ⇒ AWSCDK::Duration
The deployment duration of the rollout strategy.
-
#final_bake_time ⇒ AWSCDK::Duration?
The final bake time of the deployment strategy.
-
#growth_factor ⇒ Numeric
The growth factor of the rollout strategy.
-
#growth_type ⇒ AWSCDK::AppConfig::GrowthType?
The growth type of the rollout strategy.
-
#initialize ⇒ RolloutStrategy
constructor
A new instance of RolloutStrategy.
Constructor Details
#initialize ⇒ RolloutStrategy
Returns a new instance of RolloutStrategy.
10 11 12 |
# File 'app_config/rollout_strategy.rb', line 10 def initialize Jsii::Object.instance_method(:initialize).bind(self).call end |
Class Method Details
.ALL_AT_ONCE ⇒ AWSCDK::AppConfig::RolloutStrategy
Quick.
This strategy deploys the configuration to all targets immediately.
48 49 50 |
# File 'app_config/rollout_strategy.rb', line 48 def self.ALL_AT_ONCE() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_appconfig.RolloutStrategy", "ALL_AT_ONCE") end |
.CANARY_10_PERCENT_20_MINUTES ⇒ AWSCDK::AppConfig::RolloutStrategy
AWS Recommended.
This strategy processes the deployment exponentially using a 10% growth factor over 20 minutes. AWS AppConfig recommends using this strategy for production deployments because it aligns with AWS best practices for configuration deployments.
59 60 61 |
# File 'app_config/rollout_strategy.rb', line 59 def self.CANARY_10_PERCENT_20_MINUTES() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_appconfig.RolloutStrategy", "CANARY_10_PERCENT_20_MINUTES") end |
.exponential(props) ⇒ AWSCDK::AppConfig::RolloutStrategy
Build your own exponential rollout strategy.
27 28 29 30 31 |
# File 'app_config/rollout_strategy.rb', line 27 def self.exponential(props) props = props.is_a?(Hash) ? ::AWSCDK::AppConfig::RolloutStrategyProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLlJvbGxvdXRTdHJhdGVneVByb3BzIn0=")), "props") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_appconfig.RolloutStrategy", "exponential", [props]) end |
.jsii_overridable_methods ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'app_config/rollout_strategy.rb', line 14 def self.jsii_overridable_methods { :deployment_duration => { kind: :property, name: "deploymentDuration", is_optional: false }, :growth_factor => { kind: :property, name: "growthFactor", is_optional: false }, :final_bake_time => { kind: :property, name: "finalBakeTime", is_optional: true }, :growth_type => { kind: :property, name: "growthType", is_optional: true }, } end |
.linear(props) ⇒ AWSCDK::AppConfig::RolloutStrategy
Build your own linear rollout strategy.
37 38 39 40 41 |
# File 'app_config/rollout_strategy.rb', line 37 def self.linear(props) props = props.is_a?(Hash) ? ::AWSCDK::AppConfig::RolloutStrategyProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLlJvbGxvdXRTdHJhdGVneVByb3BzIn0=")), "props") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_appconfig.RolloutStrategy", "linear", [props]) end |
.LINEAR_20_PERCENT_EVERY_6_MINUTES ⇒ AWSCDK::AppConfig::RolloutStrategy
AWS Recommended.
This strategy deploys the configuration to 20% of all targets every six minutes for a 30 minute deployment. AWS AppConfig recommends using this strategy for production deployments because it aligns with AWS best practices for configuration deployments.
70 71 72 |
# File 'app_config/rollout_strategy.rb', line 70 def self.LINEAR_20_PERCENT_EVERY_6_MINUTES() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_appconfig.RolloutStrategy", "LINEAR_20_PERCENT_EVERY_6_MINUTES") end |
.LINEAR_50_PERCENT_EVERY_30_SECONDS ⇒ AWSCDK::AppConfig::RolloutStrategy
Testing/Demonstration.
This strategy deploys the configuration to half of all targets every 30 seconds for a one-minute deployment. AWS AppConfig recommends using this strategy only for testing or demonstration purposes because it has a short duration and bake time.
81 82 83 |
# File 'app_config/rollout_strategy.rb', line 81 def self.LINEAR_50_PERCENT_EVERY_30_SECONDS() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_appconfig.RolloutStrategy", "LINEAR_50_PERCENT_EVERY_30_SECONDS") end |
Instance Method Details
#deployment_duration ⇒ AWSCDK::Duration
The deployment duration of the rollout strategy.
88 89 90 |
# File 'app_config/rollout_strategy.rb', line 88 def deployment_duration() jsii_get_property("deploymentDuration") end |
#final_bake_time ⇒ AWSCDK::Duration?
The final bake time of the deployment strategy.
102 103 104 |
# File 'app_config/rollout_strategy.rb', line 102 def final_bake_time() jsii_get_property("finalBakeTime") end |
#growth_factor ⇒ Numeric
The growth factor of the rollout strategy.
95 96 97 |
# File 'app_config/rollout_strategy.rb', line 95 def growth_factor() jsii_get_property("growthFactor") end |
#growth_type ⇒ AWSCDK::AppConfig::GrowthType?
The growth type of the rollout strategy.
109 110 111 |
# File 'app_config/rollout_strategy.rb', line 109 def growth_type() jsii_get_property("growthType") end |