# HpaScalingPolicyV2

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

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

## Definition

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

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

## Remarks

This class defines specific policies that determine how scaling operations are performed, including the type of policy, value, and the time period over which the policy is applied.

## Constructors

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

## Properties

- [PeriodSeconds](/reference/api/csharp/aspire.hosting.kubernetes/hpascalingpolicyv2/properties.md#periodseconds) : `int` `get; set` -- Gets or sets the duration, in seconds, for which the scaling policy is applicable. This value defines the time window during which a HPA scaling action is restricted.
- [Type](/reference/api/csharp/aspire.hosting.kubernetes/hpascalingpolicyv2/properties.md#type) : `string` `get; set` -- Represents the scaling policy type for the Horizontal Pod Autoscaler (HPA) in Kubernetes. This property determines the strategy to be used for scaling, such as increasing or decreasing replicas.
- [Value](/reference/api/csharp/aspire.hosting.kubernetes/hpascalingpolicyv2/properties.md#value) : `int` `get; set` -- Gets or sets the scaling value used in the Horizontal Pod Autoscaler (HPA) scaling policy. Specifies the magnitude of scaling changes to be applied by the policy.
