# ObjectMetricSourceV2 Properties

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

Represents a source for a metric that is associated with a specific Kubernetes object.

## DescribedObject

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

Represents the Kubernetes object being described in the metric source.

```csharp
public CrossVersionObjectReferenceV2 DescribedObject { get; set; }
```

## Remarks

The `DescribedObject` property is a reference to the specific object in the Kubernetes cluster to which the metric source applies. This enables metrics to be collected and applied to custom resources beyond built-in Kubernetes objects.

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

Represents the metric details associated with an ObjectMetricSourceV2 instance.

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

## Remarks

This property specifies the metric identifier, which includes the metric's name and an optional selector used for filtering or targeting specific metric instances. It provides the necessary data to link and describe metrics in relation to a Kubernetes resource.

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

Specifies the target value and criteria for a metric in a Kubernetes resource. This property defines the desired goal or threshold for the given metric to be used for monitoring or scaling purposes. It includes attributes such as type, value, average value, and utilization to determine the metric target.

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