# AzureKeyVaultSecretResource

- Kind: `class`
- Package: [Aspire.Hosting.Azure.KeyVault](/reference/api/csharp/aspire.hosting.azure.keyvault.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.Azure`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.KeyVault/AzureKeyVaultSecretResource.cs)
- Inherits: `Resource`
- Implements: `IExpressionValue`, `IManifestExpressionProvider`, `IResource`, `IResourceWithParent`, `IResourceWithParent<AzureKeyVaultResource>`, `IValueProvider`, `IValueWithReferences`, `IAzureKeyVaultSecretReference`

Represents an Azure Key Vault Secret. Initializes a new instance of the [AzureKeyVaultSecretResource](/reference/api/csharp/aspire.hosting.azure.keyvault/azurekeyvaultsecretresource.md) class.

## Definition

```csharp
namespace Aspire.Hosting.Azure;

public class AzureKeyVaultSecretResource
    : Aspire.Hosting.ApplicationModel.Resource,
      Aspire.Hosting.ApplicationModel.IExpressionValue,
      Aspire.Hosting.ApplicationModel.IManifestExpressionProvider,
      Aspire.Hosting.ApplicationModel.IResource,
      Aspire.Hosting.ApplicationModel.IResourceWithParent,
      Aspire.Hosting.ApplicationModel.IResourceWithParent<Aspire.Hosting.Azure.AzureKeyVaultResource>,
      Aspire.Hosting.ApplicationModel.IValueProvider,
      Aspire.Hosting.ApplicationModel.IValueWithReferences,
      Aspire.Hosting.Azure.IAzureKeyVaultSecretReference
{
    // ...
}
```

## Remarks

Use `AzureProvisioningResourceExtensions.ConfigureInfrastructure` to configure specific `Azure.Provisioning` properties.

## Constructors

- [AzureKeyVaultSecretResource(string, string, AzureKeyVaultResource, object)](/reference/api/csharp/aspire.hosting.azure.keyvault/azurekeyvaultsecretresource/constructors.md#constructor-string-string-azurekeyvaultresource-object) -- Represents an Azure Key Vault Secret. Initializes a new instance of the [AzureKeyVaultSecretResource](/reference/api/csharp/aspire.hosting.azure.keyvault/azurekeyvaultsecretresource.md) class.

## Properties

- [Parent](/reference/api/csharp/aspire.hosting.azure.keyvault/azurekeyvaultsecretresource/properties.md#parent) : [AzureKeyVaultResource](/reference/api/csharp/aspire.hosting.azure.keyvault/azurekeyvaultresource.md) `get` -- Gets the parent Azure Key Vault resource.
- [SecretName](/reference/api/csharp/aspire.hosting.azure.keyvault/azurekeyvaultsecretresource/properties.md#secretname) : `string` `get` -- Gets or sets the secret name.
- [Value](/reference/api/csharp/aspire.hosting.azure.keyvault/azurekeyvaultsecretresource/properties.md#value) : `object` `get` -- Gets the value provider for the secret.
