# HorizontalPodAutoscalerSpecV2 Constructors

- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Type: [HorizontalPodAutoscalerSpecV2](/reference/api/csharp/aspire.hosting.kubernetes/horizontalpodautoscalerspecv2.md)
- Kind: `Constructors`
- Members: `1`

Represents the specification for a Horizontal Pod Autoscaler (HPA) in version v2 of the Kubernetes Autoscaling API. Provides configuration settings for scaling behavior, target resource, metrics, and replica limits.

## HorizontalPodAutoscalerSpecV2

- Name: `Constructor`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Kubernetes/Resources/HorizontalPodAutoscalerSpecV2.cs#L23-L55)

```csharp
public sealed class HorizontalPodAutoscalerSpecV2
{
    public HorizontalPodAutoscalerSpecV2()
    {
        // ...
    }
}
```
