Class: AWSCDK::CodeDeploy::CfnDeploymentConfig::ZonalConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CodeDeploy::CfnDeploymentConfig::ZonalConfigProperty
- Defined in:
- code_deploy/cfn_deployment_config.rb
Overview
Configure the ZonalConfig object if you want AWS CodeDeploy to deploy your application to one Availability Zone at a time, within an AWS Region. By deploying to one Availability Zone at a time, you can expose your deployment to a progressively larger audience as confidence in the deployment's performance and viability grows. If you don't configure the ZonalConfig object, CodeDeploy deploys your application to a random selection of hosts across a Region.
For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide .
Instance Attribute Summary collapse
-
#first_zone_monitor_duration_in_seconds ⇒ Numeric?
readonly
The period of time, in seconds, that CodeDeploy must wait after completing a deployment to the first Availability Zone.
-
#minimum_healthy_hosts_per_zone ⇒ AWSCDK::IResolvable, ...
readonly
The number or percentage of instances that must remain available per Availability Zone during a deployment.
-
#monitor_duration_in_seconds ⇒ Numeric?
readonly
The period of time, in seconds, that CodeDeploy must wait after completing a deployment to an Availability Zone.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(first_zone_monitor_duration_in_seconds: nil, minimum_healthy_hosts_per_zone: nil, monitor_duration_in_seconds: nil) ⇒ ZonalConfigProperty
constructor
A new instance of ZonalConfigProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(first_zone_monitor_duration_in_seconds: nil, minimum_healthy_hosts_per_zone: nil, monitor_duration_in_seconds: nil) ⇒ ZonalConfigProperty
Returns a new instance of ZonalConfigProperty.
795 796 797 798 799 800 801 802 |
# File 'code_deploy/cfn_deployment_config.rb', line 795 def initialize(first_zone_monitor_duration_in_seconds: nil, minimum_healthy_hosts_per_zone: nil, monitor_duration_in_seconds: nil) @first_zone_monitor_duration_in_seconds = first_zone_monitor_duration_in_seconds Jsii::Type.check_type(@first_zone_monitor_duration_in_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "firstZoneMonitorDurationInSeconds") unless @first_zone_monitor_duration_in_seconds.nil? @minimum_healthy_hosts_per_zone = minimum_healthy_hosts_per_zone.is_a?(Hash) ? ::AWSCDK::CodeDeploy::CfnDeploymentConfig::MinimumHealthyHostsPerZoneProperty.new(**minimum_healthy_hosts_per_zone.transform_keys(&:to_sym)) : minimum_healthy_hosts_per_zone Jsii::Type.check_type(@minimum_healthy_hosts_per_zone, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlZGVwbG95LkNmbkRlcGxveW1lbnRDb25maWcuTWluaW11bUhlYWx0aHlIb3N0c1BlclpvbmVQcm9wZXJ0eSJ9XX19")), "minimumHealthyHostsPerZone") unless @minimum_healthy_hosts_per_zone.nil? @monitor_duration_in_seconds = monitor_duration_in_seconds Jsii::Type.check_type(@monitor_duration_in_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "monitorDurationInSeconds") unless @monitor_duration_in_seconds.nil? end |
Instance Attribute Details
#first_zone_monitor_duration_in_seconds ⇒ Numeric? (readonly)
The period of time, in seconds, that CodeDeploy must wait after completing a deployment to the first Availability Zone.
CodeDeploy will wait this amount of time before starting a deployment to the second Availability Zone. You might set this option if you want to allow extra bake time for the first Availability Zone. If you don't specify a value for first_zone_monitor_duration_in_seconds , then CodeDeploy uses the monitor_duration_in_seconds value for the first Availability Zone.
For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide .
812 813 814 |
# File 'code_deploy/cfn_deployment_config.rb', line 812 def first_zone_monitor_duration_in_seconds @first_zone_monitor_duration_in_seconds end |
#minimum_healthy_hosts_per_zone ⇒ AWSCDK::IResolvable, ... (readonly)
The number or percentage of instances that must remain available per Availability Zone during a deployment.
This option works in conjunction with the MinimumHealthyHosts option. For more information, see About the minimum number of healthy hosts per Availability Zone in the CodeDeploy User Guide .
If you don't specify the minimum_healthy_hosts_per_zone option, then CodeDeploy uses a default value of 0 percent.
For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide .
823 824 825 |
# File 'code_deploy/cfn_deployment_config.rb', line 823 def minimum_healthy_hosts_per_zone @minimum_healthy_hosts_per_zone end |
#monitor_duration_in_seconds ⇒ Numeric? (readonly)
The period of time, in seconds, that CodeDeploy must wait after completing a deployment to an Availability Zone.
CodeDeploy will wait this amount of time before starting a deployment to the next Availability Zone. Consider adding a monitor duration to give the deployment some time to prove itself (or 'bake') in one Availability Zone before it is released in the next zone. If you don't specify a monitor_duration_in_seconds , CodeDeploy starts deploying to the next Availability Zone immediately.
For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide .
832 833 834 |
# File 'code_deploy/cfn_deployment_config.rb', line 832 def monitor_duration_in_seconds @monitor_duration_in_seconds end |
Class Method Details
.jsii_properties ⇒ Object
834 835 836 837 838 839 840 |
# File 'code_deploy/cfn_deployment_config.rb', line 834 def self.jsii_properties { :first_zone_monitor_duration_in_seconds => "firstZoneMonitorDurationInSeconds", :minimum_healthy_hosts_per_zone => "minimumHealthyHostsPerZone", :monitor_duration_in_seconds => "monitorDurationInSeconds", } end |
Instance Method Details
#to_jsii ⇒ Object
842 843 844 845 846 847 848 849 850 |
# File 'code_deploy/cfn_deployment_config.rb', line 842 def to_jsii result = {} result.merge!({ "firstZoneMonitorDurationInSeconds" => @first_zone_monitor_duration_in_seconds, "minimumHealthyHostsPerZone" => @minimum_healthy_hosts_per_zone, "monitorDurationInSeconds" => @monitor_duration_in_seconds, }) result.compact end |