# ExternalMetricSourceV2 Properties

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

Represents an external metric source in Kubernetes for configuring autoscaling behavior based on metrics from external components or monitoring systems.

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

Represents the metric property utilized in the ExternalMetricSourceV2 class. This property is of type MetricIdentifierV2 and is used to identify and define a specific metric in the context of Kubernetes resource configurations.

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

## Remarks

The Metric property is typically used to specify the name and any optional selector for a particular metric, allowing for detailed filtering or identification when integrating with Kubernetes metrics APIs or external monitoring tools.

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

Defines the target configuration for a metric in a Kubernetes-based context.

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

## Remarks

The target specifies the desired state or value for a metric, which is used to define scaling behavior or monitor system performance. This includes the type of target, the desired value, and optionally the average value or utilization.
