# IAzureKeyVaultResource Methods

- Package: [Aspire.Hosting.Azure](/reference/api/csharp/aspire.hosting.azure.md)
- Type: [IAzureKeyVaultResource](/reference/api/csharp/aspire.hosting.azure/iazurekeyvaultresource.md)
- Kind: `Methods`
- Members: `1`

Represents a resource that represents an Azure Key Vault.

## GetSecret(string)

- Name: `GetSecret(string)`
- Modifiers: `abstract`
- Returns: [IAzureKeyVaultSecretReference](/reference/api/csharp/aspire.hosting.azure/iazurekeyvaultsecretreference.md)

Gets a secret reference for the specified secret name.

```csharp
public interface IAzureKeyVaultResource
{
    public abstract IAzureKeyVaultSecretReference GetSecret(
        string secretName)
    {
        // ...
    }
}
```

## Parameters

- `secretName` (`string`)
  The name of the secret.

## Returns

[IAzureKeyVaultSecretReference](/reference/api/csharp/aspire.hosting.azure/iazurekeyvaultsecretreference.md) -- A reference to the secret.
