# IAzureKeyVaultSecretReference Properties

- Package: [Aspire.Hosting.Azure](/reference/api/csharp/aspire.hosting.azure.md)
- Type: [IAzureKeyVaultSecretReference](/reference/api/csharp/aspire.hosting.azure/iazurekeyvaultsecretreference.md)
- Kind: `Properties`
- Members: `3`

Represents a reference to a secret in an Azure Key Vault resource.

## Resource

- Name: `Resource`
- Modifiers: `abstract` `get`
- Returns: [IAzureKeyVaultResource](/reference/api/csharp/aspire.hosting.azure/iazurekeyvaultresource.md)

Gets the Azure Key Vault resource.

```csharp
public abstract IAzureKeyVaultResource Resource { get; }
```

## SecretName

- Name: `SecretName`
- Modifiers: `abstract` `get`
- Returns: `string`

Gets the name of the secret.

```csharp
public abstract string SecretName { get; }
```

## SecretOwner

- Name: `SecretOwner`
- Modifiers: `virtual` `nullable` `get; set`
- Returns: `IResource?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure/IAzureKeyVaultSecretReference.cs)

Gets or sets the resource that writes this secret to the Key Vault.

```csharp
public virtual IResource? SecretOwner { get; set; }
```

## Remarks

Implementers must provide both a getter and setter for this property. If not implemented, attempts to set [IAzureKeyVaultSecretReference.SecretOwner](/reference/api/csharp/aspire.hosting.azure/iazurekeyvaultsecretreference/properties.md#secretowner) will throw an exception.
