MinimumHealthyHostsPerZone Class
Minimum number of healthy hosts per availability zone for a server deployment.
| Source | aws-codedeploy/lib/host-health-config.ts |
|---|---|
| Type last changed |
Example
ts
const deploymentConfig = new codedeploy.ServerDeploymentConfig(this, 'DeploymentConfiguration', {
minimumHealthyHosts: codedeploy.MinimumHealthyHosts.count(2),
zonalConfig: {
monitorDuration: Duration.minutes(30),
firstZoneMonitorDuration: Duration.minutes(60),
minimumHealthyHostsPerZone: codedeploy.MinimumHealthyHostsPerZone.count(1),
},
});
python
deployment_config = codedeploy.ServerDeploymentConfig(self, "DeploymentConfiguration",
minimum_healthy_hosts=codedeploy.MinimumHealthyHosts.count(2),
zonal_config=codedeploy.ZonalConfig(
monitor_duration=Duration.minutes(30),
first_zone_monitor_duration=Duration.minutes(60),
minimum_healthy_hosts_per_zone=codedeploy.MinimumHealthyHostsPerZone.count(1)
)
)
java
ServerDeploymentConfig deploymentConfig = ServerDeploymentConfig.Builder.create(this, "DeploymentConfiguration")
.minimumHealthyHosts(MinimumHealthyHosts.count(2))
.zonalConfig(ZonalConfig.builder()
.monitorDuration(Duration.minutes(30))
.firstZoneMonitorDuration(Duration.minutes(60))
.minimumHealthyHostsPerZone(MinimumHealthyHostsPerZone.count(1))
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
var deploymentConfig = new ServerDeploymentConfig(this, "DeploymentConfiguration", new ServerDeploymentConfigProps {
MinimumHealthyHosts = MinimumHealthyHosts.Count(2),
ZonalConfig = new ZonalConfig {
MonitorDuration = Duration.Minutes(30),
FirstZoneMonitorDuration = Duration.Minutes(60),
MinimumHealthyHostsPerZone = MinimumHealthyHostsPerZone.Count(1)
}
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
deploymentConfig := codedeploy.NewServerDeploymentConfig(this, jsii.String("DeploymentConfiguration"), &ServerDeploymentConfigProps{
MinimumHealthyHosts: codedeploy.MinimumHealthyHosts_Count(jsii.Number(2)),
ZonalConfig: &ZonalConfig{
MonitorDuration: awscdk.Duration_Minutes(jsii.Number(30)),
FirstZoneMonitorDuration: awscdk.Duration_*Minutes(jsii.Number(60)),
MinimumHealthyHostsPerZone: codedeploy.MinimumHealthyHostsPerZone_Count(jsii.Number(1)),
},
})
Methods
count(value: number): MinimumHealthyHostsPerZone // chainable@staticmethod def count(value: int | float) -> MinimumHealthyHostsPerZonepublic static MinimumHealthyHostsPerZone count(Number value)public static MinimumHealthyHostsPerZone Count(double value)func Count(Value *float64) MinimumHealthyHostsPerZone static #The minimum healthy hosts threshold expressed as an absolute number.
percentage(value: number): MinimumHealthyHostsPerZone // chainable@staticmethod def percentage(value: int | float) -> MinimumHealthyHostsPerZonepublic static MinimumHealthyHostsPerZone percentage(Number value)public static MinimumHealthyHostsPerZone Percentage(double value)func Percentage(Value *float64) MinimumHealthyHostsPerZone static #The minimum healthy hosts threshold expressed as a percentage of the fleet.