# OutlierDetectionProperty

An object that represents the outlier detection for a virtual node's listener.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appmesh as appmesh } from 'aws-cdk-lib';
const outlierDetectionProperty: appmesh.CfnVirtualNode.OutlierDetectionProperty = {
  baseEjectionDuration: {
    unit: 'unit',
    value: 123,
  },
  interval: {
    unit: 'unit',
    value: 123,
  },
  maxEjectionPercent: 123,
  maxServerErrors: 123,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appmesh as appmesh

outlier_detection_property = appmesh.CfnVirtualNode.OutlierDetectionProperty(
    base_ejection_duration=appmesh.CfnVirtualNode.DurationProperty(
        unit="unit",
        value=123
    ),
    interval=appmesh.CfnVirtualNode.DurationProperty(
        unit="unit",
        value=123
    ),
    max_ejection_percent=123,
    max_server_errors=123
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.appmesh.*;

OutlierDetectionProperty outlierDetectionProperty = OutlierDetectionProperty.builder()
        .baseEjectionDuration(DurationProperty.builder()
                .unit("unit")
                .value(123)
                .build())
        .interval(DurationProperty.builder()
                .unit("unit")
                .value(123)
                .build())
        .maxEjectionPercent(123)
        .maxServerErrors(123)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppMesh;

var outlierDetectionProperty = new OutlierDetectionProperty {
    BaseEjectionDuration = new DurationProperty {
        Unit = "unit",
        Value = 123
    },
    Interval = new DurationProperty {
        Unit = "unit",
        Value = 123
    },
    MaxEjectionPercent = 123,
    MaxServerErrors = 123
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

outlierDetectionProperty := &OutlierDetectionProperty{
	BaseEjectionDuration: &DurationProperty{
		Unit: jsii.String("unit"),
		Value: jsii.Number(123),
	},
	Interval: &DurationProperty{
		Unit: jsii.String("unit"),
		Value: jsii.Number(123),
	},
	MaxEjectionPercent: jsii.Number(123),
	MaxServerErrors: jsii.Number(123),
}
```

## Properties

- `baseEjectionDuration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVirtualNode.DurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.CfnVirtualNode.DurationProperty.html) (required) — The base amount of time for which a host is ejected.

- `interval`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVirtualNode.DurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.CfnVirtualNode.DurationProperty.html) (required) — The time interval between ejection sweep analysis.

- `maxEjectionPercent`: number (required) — Maximum percentage of hosts in load balancing pool for upstream service that can be ejected.

  Will eject at least one host regardless of the value.

- `maxServerErrors`: number (required) — Number of consecutive `5xx` errors required for ejection.
