Skip to content
v2.277.0

MinimumHealthyHosts Class ​

Minimum number of healthy hosts for a server deployment.

Example ​

ts
const deploymentConfig = new codedeploy.ServerDeploymentConfig(this, 'DeploymentConfiguration', {
  deploymentConfigName: 'MyDeploymentConfiguration', // optional property
  // one of these is required, but both cannot be specified at the same time
  minimumHealthyHosts: codedeploy.MinimumHealthyHosts.count(2),
  // minimumHealthyHosts: codedeploy.MinimumHealthyHosts.percentage(75),
});
python
deployment_config = codedeploy.ServerDeploymentConfig(self, "DeploymentConfiguration",
    deployment_config_name="MyDeploymentConfiguration",  # optional property
    # one of these is required, but both cannot be specified at the same time
    minimum_healthy_hosts=codedeploy.MinimumHealthyHosts.count(2)
)
java
ServerDeploymentConfig deploymentConfig = ServerDeploymentConfig.Builder.create(this, "DeploymentConfiguration")
        .deploymentConfigName("MyDeploymentConfiguration") // optional property
        // one of these is required, but both cannot be specified at the same time
        .minimumHealthyHosts(MinimumHealthyHosts.count(2))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
var deploymentConfig = new ServerDeploymentConfig(this, "DeploymentConfiguration", new ServerDeploymentConfigProps {
    DeploymentConfigName = "MyDeploymentConfiguration",  // optional property
    // one of these is required, but both cannot be specified at the same time
    MinimumHealthyHosts = MinimumHealthyHosts.Count(2)
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
deploymentConfig := codedeploy.NewServerDeploymentConfig(this, jsii.String("DeploymentConfiguration"), &ServerDeploymentConfigProps{
	DeploymentConfigName: jsii.String("MyDeploymentConfiguration"),
	 // optional property
	// one of these is required, but both cannot be specified at the same time
	MinimumHealthyHosts: codedeploy.MinimumHealthyHosts_Count(jsii.Number(2)),
})

Methods ​

count(value: number): MinimumHealthyHosts // chainable@staticmethod def count(value: int | float) -> MinimumHealthyHostspublic static MinimumHealthyHosts count(Number value)public static MinimumHealthyHosts Count(double value)func Count(Value *float64) MinimumHealthyHostsstatic#
The minimum healthy hosts threshold expressed as an absolute number.
percentage(value: number): MinimumHealthyHosts // chainable@staticmethod def percentage(value: int | float) -> MinimumHealthyHostspublic static MinimumHealthyHosts percentage(Number value)public static MinimumHealthyHosts Percentage(double value)func Percentage(Value *float64) MinimumHealthyHostsstatic#
The minimum healthy hosts threshold expressed as a percentage of the fleet.