# HpaScalingRulesV2

- 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/HPAScalingRulesV2.cs)

Represents the scaling rules for Kubernetes Horizontal Pod Autoscaler (HPA) in version 2 API.

## Definition

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

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

## Remarks

The HPAScalingRulesV2 class defines the parameters and rules for scaling operations in Kubernetes. It includes configurable scaling policies, a stabilization window, and a strategy for selecting policies. This class enables you to customize the behavior of HPA scaling decisions.

## Constructors

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

## Properties

- [Policies](/reference/api/csharp/aspire.hosting.kubernetes/hpascalingrulesv2/properties.md#policies) : [List<HpaScalingPolicyV2>](/reference/api/csharp/aspire.hosting.kubernetes/hpascalingpolicyv2.md) `get` -- Represents a collection of scaling policies associated with the Horizontal Pod Autoscaler (HPA) in Kubernetes API v2.
- [SelectPolicy](/reference/api/csharp/aspire.hosting.kubernetes/hpascalingrulesv2/properties.md#selectpolicy) : `string` `get; set` -- Specifies the policy selection strategy for scaling operations within the Horizontal Pod Autoscaler (HPA) configuration.
- [StabilizationWindowSeconds](/reference/api/csharp/aspire.hosting.kubernetes/hpascalingrulesv2/properties.md#stabilizationwindowseconds) : `int?` `get; set` -- Gets or sets the stabilization window in seconds for scaling decisions in the Horizontal Pod Autoscaler (HPA).
