# ResourceAttributesV1 Properties

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

Represents the attributes of a resource in Kubernetes. This class facilitates the definition of resource attributes for Kubernetes objects, including identifiers like name, namespace, and resource type, as well as selectors for field and label-based filtering.

## FieldSelector

- Name: `FieldSelector`
- Modifiers: `nullable` `get; set`
- Returns: [FieldSelectorAttributesV1?](/reference/api/csharp/aspire.hosting.kubernetes/fieldselectorattributesv1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/ResourceAttributesV1.cs)

Represents the field selector attribute used in Kubernetes resources. This property is used to define field-based filtering criteria for the resource. The field selector matches resources based on their specific field attributes.

```csharp
public FieldSelectorAttributesV1? FieldSelector { get; set; }
```

## Group

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

Gets or sets the API group of the Kubernetes resource. The group is a way to categorize resources in Kubernetes, typically used along with the resource and version to identify a specific API resource. Examples of API groups might include "apps", "core", or custom API groups defined by an extension.

```csharp
public string? Group { get; set; }
```

## LabelSelector

- Name: `LabelSelector`
- Modifiers: `nullable` `get; set`
- Returns: [LabelSelectorAttributesV1?](/reference/api/csharp/aspire.hosting.kubernetes/labelselectorattributesv1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/ResourceAttributesV1.cs)

Represents the label selector attributes used to filter Kubernetes resources based on their labels. It allows specifying raw selector queries and detailed requirements for more granular control of resource selection.

```csharp
public LabelSelectorAttributesV1? LabelSelector { get; set; }
```

## Name

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

Gets or sets the name of the Kubernetes resource. Represents the identifier of a specific resource instance within a particular resource type.

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

## Namespace

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

Gets or sets the namespace of the Kubernetes resource. The namespace provides a mechanism for isolating groups or sets of resources within a Kubernetes cluster. If not specified, the default namespace is often used.

```csharp
public string? Namespace { get; set; }
```

## Resource

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

Represents the name of the resource to which the attributes are associated. This property specifies the target resource in a Kubernetes environment and is used for identifying and managing the specific resource within the namespace.

```csharp
public string? Resource { get; set; }
```

## Subresource

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

Gets or sets the subresource associated with the Kubernetes resource. A subresource represents a component or subpart of the primary resource, commonly used to interact with specific operations or views of the resource.

```csharp
public string? Subresource { get; set; }
```

## Verb

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

Represents the action or operation to be performed on a Kubernetes resource. The verb typically corresponds to a REST API operation (e.g., "get", "list", "create") that is associated with the specified resource, namespace, or group.

```csharp
public string? Verb { get; set; }
```

## Version

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

Represents the API version of the Kubernetes resource. This property specifies the version of the Kubernetes API that the resource belongs to.

```csharp
public string? Version { get; set; }
```
