Class: AWSCDK::CfnUpdatePolicy
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CfnUpdatePolicy
- Defined in:
- cfn_update_policy.rb
Overview
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource.
AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
Instance Attribute Summary collapse
-
#auto_scaling_replacing_update ⇒ AWSCDK::CfnAutoScalingReplacingUpdate?
readonly
Specifies whether an Auto Scaling group and the instances it contains are replaced during an update.
-
#auto_scaling_rolling_update ⇒ AWSCDK::CfnAutoScalingRollingUpdate?
readonly
To specify how AWS CloudFormation handles rolling updates for an Auto Scaling group, use the AutoScalingRollingUpdate policy.
-
#auto_scaling_scheduled_action ⇒ AWSCDK::CfnAutoScalingScheduledAction?
readonly
To specify how AWS CloudFormation handles updates for the MinSize, MaxSize, and DesiredCapacity properties when the AWS::AutoScaling::AutoScalingGroup resource has an associated scheduled action, use the AutoScalingScheduledAction policy.
-
#code_deploy_lambda_alias_update ⇒ AWSCDK::CfnCodeDeployLambdaAliasUpdate?
readonly
To perform an AWS CodeDeploy deployment when the version changes on an AWS::Lambda::Alias resource, use the CodeDeployLambdaAliasUpdate update policy.
-
#enable_version_upgrade ⇒ Boolean?
readonly
To upgrade an Amazon ES domain to a new version of Elasticsearch rather than replacing the entire AWS::Elasticsearch::Domain resource, use the EnableVersionUpgrade update policy.
-
#use_online_resharding ⇒ Boolean?
readonly
To modify a replication group's shards by adding or removing shards, rather than replacing the entire AWS::ElastiCache::ReplicationGroup resource, use the UseOnlineResharding update policy.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(auto_scaling_replacing_update: nil, auto_scaling_rolling_update: nil, auto_scaling_scheduled_action: nil, code_deploy_lambda_alias_update: nil, enable_version_upgrade: nil, use_online_resharding: nil) ⇒ CfnUpdatePolicy
constructor
A new instance of CfnUpdatePolicy.
- #to_jsii ⇒ Object
Constructor Details
#initialize(auto_scaling_replacing_update: nil, auto_scaling_rolling_update: nil, auto_scaling_scheduled_action: nil, code_deploy_lambda_alias_update: nil, enable_version_upgrade: nil, use_online_resharding: nil) ⇒ CfnUpdatePolicy
Returns a new instance of CfnUpdatePolicy.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'cfn_update_policy.rb', line 16 def initialize(auto_scaling_replacing_update: nil, auto_scaling_rolling_update: nil, auto_scaling_scheduled_action: nil, code_deploy_lambda_alias_update: nil, enable_version_upgrade: nil, use_online_resharding: nil) @auto_scaling_replacing_update = auto_scaling_replacing_update.is_a?(Hash) ? ::AWSCDK::CfnAutoScalingReplacingUpdate.new(**auto_scaling_replacing_update.transform_keys(&:to_sym)) : auto_scaling_replacing_update Jsii::Type.check_type(@auto_scaling_replacing_update, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5BdXRvU2NhbGluZ1JlcGxhY2luZ1VwZGF0ZSJ9")), "autoScalingReplacingUpdate") unless @auto_scaling_replacing_update.nil? @auto_scaling_rolling_update = auto_scaling_rolling_update.is_a?(Hash) ? ::AWSCDK::CfnAutoScalingRollingUpdate.new(**auto_scaling_rolling_update.transform_keys(&:to_sym)) : auto_scaling_rolling_update Jsii::Type.check_type(@auto_scaling_rolling_update, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5BdXRvU2NhbGluZ1JvbGxpbmdVcGRhdGUifQ==")), "autoScalingRollingUpdate") unless @auto_scaling_rolling_update.nil? @auto_scaling_scheduled_action = auto_scaling_scheduled_action.is_a?(Hash) ? ::AWSCDK::CfnAutoScalingScheduledAction.new(**auto_scaling_scheduled_action.transform_keys(&:to_sym)) : auto_scaling_scheduled_action Jsii::Type.check_type(@auto_scaling_scheduled_action, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5BdXRvU2NhbGluZ1NjaGVkdWxlZEFjdGlvbiJ9")), "autoScalingScheduledAction") unless @auto_scaling_scheduled_action.nil? @code_deploy_lambda_alias_update = code_deploy_lambda_alias_update.is_a?(Hash) ? ::AWSCDK::CfnCodeDeployLambdaAliasUpdate.new(**code_deploy_lambda_alias_update.transform_keys(&:to_sym)) : code_deploy_lambda_alias_update Jsii::Type.check_type(@code_deploy_lambda_alias_update, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5Db2RlRGVwbG95TGFtYmRhQWxpYXNVcGRhdGUifQ==")), "codeDeployLambdaAliasUpdate") unless @code_deploy_lambda_alias_update.nil? @enable_version_upgrade = enable_version_upgrade Jsii::Type.check_type(@enable_version_upgrade, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enableVersionUpgrade") unless @enable_version_upgrade.nil? @use_online_resharding = use_online_resharding Jsii::Type.check_type(@use_online_resharding, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "useOnlineResharding") unless @use_online_resharding.nil? end |
Instance Attribute Details
#auto_scaling_replacing_update ⇒ AWSCDK::CfnAutoScalingReplacingUpdate? (readonly)
Specifies whether an Auto Scaling group and the instances it contains are replaced during an update.
During replacement, AWS CloudFormation retains the old group until it finishes creating the new one. If the update fails, AWS CloudFormation can roll back to the old Auto Scaling group and delete the new Auto Scaling group.
38 39 40 |
# File 'cfn_update_policy.rb', line 38 def auto_scaling_replacing_update @auto_scaling_replacing_update end |
#auto_scaling_rolling_update ⇒ AWSCDK::CfnAutoScalingRollingUpdate? (readonly)
To specify how AWS CloudFormation handles rolling updates for an Auto Scaling group, use the AutoScalingRollingUpdate policy.
Rolling updates enable you to specify whether AWS CloudFormation updates instances that are in an Auto Scaling group in batches or all at once.
45 46 47 |
# File 'cfn_update_policy.rb', line 45 def auto_scaling_rolling_update @auto_scaling_rolling_update end |
#auto_scaling_scheduled_action ⇒ AWSCDK::CfnAutoScalingScheduledAction? (readonly)
To specify how AWS CloudFormation handles updates for the MinSize, MaxSize, and DesiredCapacity properties when the AWS::AutoScaling::AutoScalingGroup resource has an associated scheduled action, use the AutoScalingScheduledAction policy.
49 50 51 |
# File 'cfn_update_policy.rb', line 49 def auto_scaling_scheduled_action @auto_scaling_scheduled_action end |
#code_deploy_lambda_alias_update ⇒ AWSCDK::CfnCodeDeployLambdaAliasUpdate? (readonly)
To perform an AWS CodeDeploy deployment when the version changes on an AWS::Lambda::Alias resource, use the CodeDeployLambdaAliasUpdate update policy.
53 54 55 |
# File 'cfn_update_policy.rb', line 53 def code_deploy_lambda_alias_update @code_deploy_lambda_alias_update end |
#enable_version_upgrade ⇒ Boolean? (readonly)
To upgrade an Amazon ES domain to a new version of Elasticsearch rather than replacing the entire AWS::Elasticsearch::Domain resource, use the EnableVersionUpgrade update policy.
57 58 59 |
# File 'cfn_update_policy.rb', line 57 def enable_version_upgrade @enable_version_upgrade end |
#use_online_resharding ⇒ Boolean? (readonly)
To modify a replication group's shards by adding or removing shards, rather than replacing the entire AWS::ElastiCache::ReplicationGroup resource, use the UseOnlineResharding update policy.
61 62 63 |
# File 'cfn_update_policy.rb', line 61 def use_online_resharding @use_online_resharding end |
Class Method Details
.jsii_properties ⇒ Object
63 64 65 66 67 68 69 70 71 72 |
# File 'cfn_update_policy.rb', line 63 def self.jsii_properties { :auto_scaling_replacing_update => "autoScalingReplacingUpdate", :auto_scaling_rolling_update => "autoScalingRollingUpdate", :auto_scaling_scheduled_action => "autoScalingScheduledAction", :code_deploy_lambda_alias_update => "codeDeployLambdaAliasUpdate", :enable_version_upgrade => "enableVersionUpgrade", :use_online_resharding => "useOnlineResharding", } end |
Instance Method Details
#to_jsii ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'cfn_update_policy.rb', line 74 def to_jsii result = {} result.merge!({ "autoScalingReplacingUpdate" => @auto_scaling_replacing_update, "autoScalingRollingUpdate" => @auto_scaling_rolling_update, "autoScalingScheduledAction" => @auto_scaling_scheduled_action, "codeDeployLambdaAliasUpdate" => @code_deploy_lambda_alias_update, "enableVersionUpgrade" => @enable_version_upgrade, "useOnlineResharding" => @use_online_resharding, }) result.compact end |