# PodsMetricSourceV2 Properties

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

Represents a configuration for targeting metrics at the pod level in a Kubernetes environment. Provides specification for a metric associated with pod resources and the target value or criteria for monitoring and scaling purposes.

## Metric

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

Represents the metric associated with a Kubernetes PodsMetricSourceV2 resource.

```csharp
public MetricIdentifierV2 Metric { get; set; }
```

## Remarks

This property references a [MetricIdentifierV2](/reference/api/csharp/aspire.hosting.kubernetes/metricidentifierv2.md) object, which includes the name of the metric and an optional selector for additional filtering criteria. It is used to define the metric that the Kubernetes resource should monitor or act upon.

## Target

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

Defines the target configuration for a Kubernetes metric in version 2. Specifies the intended target values or utilization for the metric, used for monitoring and scaling purposes.

```csharp
public MetricTargetV2 Target { get; set; }
```
