# ResourceFieldSelectorV1

- Kind: `class`
- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Version: `13.3.0-preview.1.26254.5`
- Namespace: `Aspire.Hosting.Kubernetes.Resources`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/ResourceFieldSelectorV1.cs)

ResourceFieldSelectorV1 provides a means to reference a resource field's value, such as CPU or memory, from a container in a Kubernetes resource. It allows for detailed selection of the required resource and includes optional configuration to specify a container and/or a divisor for resource scaling.

## Definition

```csharp
namespace Aspire.Hosting.Kubernetes.Resources;

public sealed class ResourceFieldSelectorV1
{
    // ...
}
```

## Constructors

- [ResourceFieldSelectorV1](/reference/api/csharp/aspire.hosting.kubernetes/resourcefieldselectorv1/constructors.md#constructor)

## Properties

- [ContainerName](/reference/api/csharp/aspire.hosting.kubernetes/resourcefieldselectorv1/properties.md#containername) : `string` `get; set` -- Specifies the name of the container from which to select resource data. This property identifies the container within a Kubernetes environment where the resource usage will be retrieved.
- [Divisor](/reference/api/csharp/aspire.hosting.kubernetes/resourcefieldselectorv1/properties.md#divisor) : `string` `get; set` -- Gets or sets the quantity used as the divisor in the resource field selector. This property defines the scaling factor applied to the resource quantity specified in the selector.
- [Resource](/reference/api/csharp/aspire.hosting.kubernetes/resourcefieldselectorv1/properties.md#resource) : `string` `get; set` -- Specifies the resource to select from a particular container in a Kubernetes environment. The resource field is used to identify the particular resource attribute (e.g., CPU, memory) of a container to be referenced within the context of resource management or metrics.
