# MetricTargetV2 Properties

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

Represents a specification of a target value for a Kubernetes metric in version 2. Defines the target type and value criteria for monitoring and scaling resources.

## AverageUtilization

- Name: `AverageUtilization`
- Modifiers: `nullable` `get; set`
- Returns: `int?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/MetricTargetV2.cs)

Gets or sets the target average utilization value for the metric. This property represents the percentage of resource consumption (or similar utilization metric) that is used to define optimal scaling for a resource. The value should be provided as an integer percentage, or null if not specified.

```csharp
public int? AverageUtilization { get; set; }
```

## AverageValue

- Name: `AverageValue`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/MetricTargetV2.cs)

Represents the average value of a metric target. This property specifies the average value associated with the target metric for monitoring or scaling purposes.

```csharp
public string AverageValue { get; set; }
```

## Type

- Name: `Type`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/MetricTargetV2.cs)

Represents the type of metric target. This property specifies the kind of metric being targeted, such as "Value", "AverageValue", or "Utilization", to determine how the metric is interpreted and calculated for scaling purposes.

```csharp
public string Type { get; set; }
```

## Value

- Name: `Value`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/MetricTargetV2.cs)

Specifies the target value for the metric. This value is used to determine the desired state of the resource being measured.

```csharp
public string Value { get; set; }
```
