# ParameterResource Constructors

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [ParameterResource](/reference/api/csharp/aspire.hosting/parameterresource.md)
- Kind: `Constructors`
- Members: `1`

Represents a parameter resource.

## ParameterResource(string, Func<ParameterDefault?, string>, bool)

- Name: `Constructor(string, Func<ParameterDefault?, string>, bool)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ParameterResource.cs#L24-L32)

Initializes a new instance of [ParameterResource](/reference/api/csharp/aspire.hosting/parameterresource.md).

```csharp
public class ParameterResource
{
    public ParameterResource(
        string name,
        Func<ParameterDefault?, string> callback,
        bool secret = false)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The name of the parameter resource.
- `callback` (`Func<ParameterDefault?, string>`)
  The callback function to retrieve the value of the parameter.
- `secret` (`bool`) `optional`
  A flag indicating whether the parameter is secret.
