# HorizontalPodAutoscalerBehaviorV2 Properties

- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Type: [HorizontalPodAutoscalerBehaviorV2](/reference/api/csharp/aspire.hosting.kubernetes/horizontalpodautoscalerbehaviorv2.md)
- Kind: `Properties`
- Members: `2`

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

## ScaleDown

- Name: `ScaleDown`
- Modifiers: `get; set`
- Returns: [HpaScalingRulesV2](/reference/api/csharp/aspire.hosting.kubernetes/hpascalingrulesv2.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/HorizontalPodAutoscalerBehaviorV2.cs)

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.

```csharp
public HpaScalingRulesV2 ScaleDown { get; set; }
```

## ScaleUp

- Name: `ScaleUp`
- Modifiers: `get; set`
- Returns: [HpaScalingRulesV2](/reference/api/csharp/aspire.hosting.kubernetes/hpascalingrulesv2.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/HorizontalPodAutoscalerBehaviorV2.cs)

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.

```csharp
public HpaScalingRulesV2 ScaleUp { get; set; }
```
