# SecretProjectionV1 Properties

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

Represents a Secret source within a projected volume.

<a id="items"></a>

## Items

- Name: `Items`
- Modifiers: `get`
- Returns: [List<KeyToPathV1>](/reference/api/csharp/aspire.hosting.kubernetes/keytopathv1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/69db530a4816698cf1d5fa4557933e0ac4f127c6/src/Aspire.Hosting.Kubernetes/Resources/SecretProjectionV1.cs#L18)

Gets the key-to-path mappings to project from the Secret.

```csharp
public List<KeyToPathV1> Items { get; }
```

<a id="name"></a>

## Name

- Name: `Name`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/69db530a4816698cf1d5fa4557933e0ac4f127c6/src/Aspire.Hosting.Kubernetes/Resources/SecretProjectionV1.cs)

Gets or sets the name of the Secret to project.

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

<a id="optional"></a>

## Optional

- Name: `Optional`
- Modifiers: `nullable` `get; set`
- Returns: `bool?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/69db530a4816698cf1d5fa4557933e0ac4f127c6/src/Aspire.Hosting.Kubernetes/Resources/SecretProjectionV1.cs)

Gets or sets whether the Secret or selected keys are optional.

```csharp
public bool? Optional { get; set; }
```
