Class: AWSCDK::AppConfig::RolloutStrategy

Inherits:
Jsii::Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeRolloutStrategy

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_ONCEAWSCDK::AppConfig::RolloutStrategy

Quick.

This strategy deploys the configuration to all targets immediately.

Returns:

  • (AWSCDK::AppConfig::RolloutStrategy)


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_MINUTESAWSCDK::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.

Returns:

  • (AWSCDK::AppConfig::RolloutStrategy)


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.

Parameters:

Returns:

  • (AWSCDK::AppConfig::RolloutStrategy)


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_methodsObject



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.

Parameters:

Returns:

  • (AWSCDK::AppConfig::RolloutStrategy)


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_MINUTESAWSCDK::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.

Returns:

  • (AWSCDK::AppConfig::RolloutStrategy)


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_SECONDSAWSCDK::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.

Returns:

  • (AWSCDK::AppConfig::RolloutStrategy)


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_durationAWSCDK::Duration

The deployment duration of the rollout strategy.

Returns:



88
89
90
# File 'app_config/rollout_strategy.rb', line 88

def deployment_duration()
  jsii_get_property("deploymentDuration")
end

#final_bake_timeAWSCDK::Duration?

The final bake time of the deployment strategy.

Returns:



102
103
104
# File 'app_config/rollout_strategy.rb', line 102

def final_bake_time()
  jsii_get_property("finalBakeTime")
end

#growth_factorNumeric

The growth factor of the rollout strategy.

Returns:

  • (Numeric)


95
96
97
# File 'app_config/rollout_strategy.rb', line 95

def growth_factor()
  jsii_get_property("growthFactor")
end

#growth_typeAWSCDK::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