# StatefulSetPersistentVolumeClaimRetentionPolicyV1 Properties

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

Represents the retention policy for PersistentVolumeClaims (PVCs) associated with a StatefulSet in Kubernetes.

## WhenDeleted

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

Gets or sets the policy that determines the retention behavior of PersistentVolumeClaims (PVCs) when a StatefulSet is deleted. This property defines how PVCs associated with the StatefulSet should be handled upon deletion of the StatefulSet resource.

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

## WhenScaled

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

Gets or sets the policy for handling Persistent Volume Claims (PVCs) when a StatefulSet is scaled. This property determines how PVCs are retained or deleted based on scaling operations for the StatefulSet.

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