# ContainerResourceMetricSourceV2 Properties

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

Represents a metric source that is defined by a resource usage of a specific container. This is used for scaling purposes in a Kubernetes environment, relying on container-level metrics.

## Container

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

Gets or sets the name of the container associated with the metric. It specifies the container within a pod to which the resource metric applies.

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

## Name

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

Gets or sets the name of the resource metric.

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

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

Specifies the target for the metric being monitored in a container. Represents an instance of [MetricTargetV2](/reference/api/csharp/aspire.hosting.kubernetes/metrictargetv2.md) which defines the thresholds and values for the metric.

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