# HorizontalPodAutoscalerV2 Properties

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

Represents a Kubernetes resource for Horizontal Pod Autoscaling (HPA) under the autoscaling/v2 API version.

## Spec

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

Gets or sets the specification of the Horizontal Pod Autoscaler (HPA) in version v2 of the Kubernetes Autoscaling API.

```csharp
public HorizontalPodAutoscalerSpecV2 Spec { get; set; }
```

## Remarks

This property defines the scaling behavior and configuration for a Kubernetes resource targeted by the HPA. It includes details such as scaling policies, target resource reference, metrics to monitor, and replica count constraints (minimum and maximum replicas).
