# AllowedHostPathV1Beta1

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

Represents an allowed host path for a PodSecurityPolicy in Kubernetes.

## Definition

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

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

## Remarks

This class defines constraints that determine which host paths are allowed to be used by containers backed by PodSecurityPolicies. It enables setting a specific path prefix and/or defining if the path is read-only.

## Constructors

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

## Properties

- [PathPrefix](/reference/api/csharp/aspire.hosting.kubernetes/allowedhostpathv1beta1/properties.md#pathprefix) : `string` `get; set` -- Gets or sets the path prefix for the allowed host path. This property specifies the path prefix that will be matched against a volume's path. Only paths with this prefix will be allowed.
- [ReadOnly](/reference/api/csharp/aspire.hosting.kubernetes/allowedhostpathv1beta1/properties.md#readonly) : `bool?` `get; set` -- Gets or sets a value indicating whether the host path is read-only. When set to true, the associated path can only be accessed in read-only mode.
