# MinimumHealthyHosts

Minimum number of healthy hosts for a server deployment.

Obtainable from: MinimumHealthyHosts.count, MinimumHealthyHosts.percentage

- Source: [`aws-codedeploy/lib/host-health-config.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-codedeploy/lib/host-health-config.ts#L8)

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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)
});
```

Golang:

```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` (static) — The minimum healthy hosts threshold expressed as an absolute number.

- `percentage(value: number): MinimumHealthyHosts // chainable` (static) — The minimum healthy hosts threshold expressed as a percentage of the fleet.
