# PersistentVolumeClaimSpecV1

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

Represents the specification of a Kubernetes PersistentVolumeClaim resource.

## Definition

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

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

## Remarks

A PersistentVolumeClaim (PVC) is a request for storage by a user. It serves as an abstraction to request specific storage with desired attributes such as size and access modes. This class defines the set of properties that can be configured for a PVC.

## Constructors

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

## Properties

- [AccessModes](/reference/api/csharp/aspire.hosting.kubernetes/persistentvolumeclaimspecv1/properties.md#accessmodes) : `List<string>` `get` -- Defines the access modes for a Persistent Volume Claim.
- [DataSource](/reference/api/csharp/aspire.hosting.kubernetes/persistentvolumeclaimspecv1/properties.md#datasource) : [TypedLocalObjectReferenceV1](/reference/api/csharp/aspire.hosting.kubernetes/typedlocalobjectreferencev1.md) `get; set` -- Represents the data source for a Persistent Volume Claim (PVC) in Kubernetes.
- [DataSourceRef](/reference/api/csharp/aspire.hosting.kubernetes/persistentvolumeclaimspecv1/properties.md#datasourceref) : [TypedObjectReferenceV1](/reference/api/csharp/aspire.hosting.kubernetes/typedobjectreferencev1.md) `get; set` -- Specifies a reference to a data source object for the Persistent Volume Claim (PVC). This property allows referencing an object that can provision the volume dynamically, such as an external volume controller or resource in the Kubernetes cluster.
- [Resources](/reference/api/csharp/aspire.hosting.kubernetes/persistentvolumeclaimspecv1/properties.md#resources) : [VolumeResourceRequirementsV1](/reference/api/csharp/aspire.hosting.kubernetes/volumeresourcerequirementsv1.md) `get; set` -- Gets or sets the resource requirements for the volume. Defines the requested and limit capacities for the volume resources, including storage and other related attributes.
- [Selector](/reference/api/csharp/aspire.hosting.kubernetes/persistentvolumeclaimspecv1/properties.md#selector) : [LabelSelectorV1](/reference/api/csharp/aspire.hosting.kubernetes/labelselectorv1.md) `get; set` -- Gets or sets the label selector used to filter Kubernetes resources.
- [StorageClassName](/reference/api/csharp/aspire.hosting.kubernetes/persistentvolumeclaimspecv1/properties.md#storageclassname) : `string` `get; set` -- Gets or sets the name of the storage class required by the PersistentVolumeClaim.
- [VolumeAttributesClassName](/reference/api/csharp/aspire.hosting.kubernetes/persistentvolumeclaimspecv1/properties.md#volumeattributesclassname) : `string` `get; set` -- Represents the name of the class associated with the attributes of the volume in the PersistentVolumeClaim specification.
- [VolumeMode](/reference/api/csharp/aspire.hosting.kubernetes/persistentvolumeclaimspecv1/properties.md#volumemode) : `string` `get; set` -- Specifies the volume mode for a PersistentVolumeClaim. This determines how data in the volume is accessed by pods using the claim.
- [VolumeName](/reference/api/csharp/aspire.hosting.kubernetes/persistentvolumeclaimspecv1/properties.md#volumename) : `string` `get; set` -- Gets or sets the name of the specific volume to be bound to the PersistentVolumeClaim.
