# HorizontalPodAutoscalerBehaviorV2

- Kind: `class`
- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Version: `13.3.0-preview.1.26254.5`
- Namespace: `Aspire.Hosting.Kubernetes.Resources`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/HorizontalPodAutoscalerBehaviorV2.cs)

Defines the scaling behavior for a Horizontal Pod Autoscaler in Kubernetes.

## Definition

```csharp
namespace Aspire.Hosting.Kubernetes.Resources;

public sealed class HorizontalPodAutoscalerBehaviorV2
{
    // ...
}
```

## Remarks

The HorizontalPodAutoscalerBehaviorV2 class specifies how the scaling process should behave, including rules for scaling up and scaling down. This can include settings such as stabilization windows and scaling policies to ensure smooth transitions.

## Constructors

- [HorizontalPodAutoscalerBehaviorV2](/reference/api/csharp/aspire.hosting.kubernetes/horizontalpodautoscalerbehaviorv2/constructors.md#constructor)

## Properties

- [ScaleDown](/reference/api/csharp/aspire.hosting.kubernetes/horizontalpodautoscalerbehaviorv2/properties.md#scaledown) : [HpaScalingRulesV2](/reference/api/csharp/aspire.hosting.kubernetes/hpascalingrulesv2.md) `get; set` -- Gets or sets the rules that define the behavior for scaling down in a Horizontal Pod Autoscaler (HPA). This property specifies the conditions and policies associated with decreasing the number of replicas when scaling down the resources managed by the HPA.
- [ScaleUp](/reference/api/csharp/aspire.hosting.kubernetes/horizontalpodautoscalerbehaviorv2/properties.md#scaleup) : [HpaScalingRulesV2](/reference/api/csharp/aspire.hosting.kubernetes/hpascalingrulesv2.md) `get; set` -- Specifies the scaling behavior for scaling up operations in the HorizontalPodAutoscaler. Defines rules, policies, and other configurations governing how the scaling up process should occur.
