# ParameterResource

- Kind: `class`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ParameterResource.cs)
- Inherits: [Resource](/reference/api/csharp/aspire.hosting/resource.md)
- Implements: [IExpressionValue](/reference/api/csharp/aspire.hosting/iexpressionvalue.md), [IManifestExpressionProvider](/reference/api/csharp/aspire.hosting/imanifestexpressionprovider.md), [IValueProvider](/reference/api/csharp/aspire.hosting/ivalueprovider.md)

Represents a parameter resource.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public class ParameterResource
    : Aspire.Hosting.ApplicationModel.Resource,
      Aspire.Hosting.ApplicationModel.IExpressionValue,
      Aspire.Hosting.ApplicationModel.IManifestExpressionProvider,
      Aspire.Hosting.ApplicationModel.IValueProvider
{
    // ...
}
```

## Constructors

- [ParameterResource(string, Func<ParameterDefault?, string>, bool)](/reference/api/csharp/aspire.hosting/parameterresource/constructors.md#constructor-string-func-parameterdefault-string-bool) -- Initializes a new instance of [ParameterResource](/reference/api/csharp/aspire.hosting/parameterresource.md).

## Properties

- [Default](/reference/api/csharp/aspire.hosting/parameterresource/properties.md#default) : [ParameterDefault?](/reference/api/csharp/aspire.hosting/parameterdefault.md) `get; set` -- Represents how the default value of the parameter should be retrieved.
- [Description](/reference/api/csharp/aspire.hosting/parameterresource/properties.md#description) : `string?` `get; set` -- Gets a description of the parameter resource.
- [EnableDescriptionMarkdown](/reference/api/csharp/aspire.hosting/parameterresource/properties.md#enabledescriptionmarkdown) : `bool` `get; set` -- Gets or sets a value indicating whether the description should be rendered as Markdown.
- [IsConnectionString](/reference/api/csharp/aspire.hosting/parameterresource/properties.md#isconnectionstring) : `bool` `get; set` -- Gets or sets a value indicating whether the parameter is a connection string.
- [Secret](/reference/api/csharp/aspire.hosting/parameterresource/properties.md#secret) : `bool` `get` -- Gets a value indicating whether the parameter is secret.
- [Value](/reference/api/csharp/aspire.hosting/parameterresource/properties.md#value) : `string` `get` `obsolete` -- Gets the value of the parameter.
- [ValueExpression](/reference/api/csharp/aspire.hosting/parameterresource/properties.md#valueexpression) : `string` `get` -- Gets the expression used in the manifest to reference the value of the parameter.

## Methods

- [GetValueAsync(CancellationToken)](/reference/api/csharp/aspire.hosting/parameterresource/methods.md#getvalueasync-cancellationtoken) : `ValueTask<string?>` -- Gets the value of the parameter asynchronously, waiting if necessary for the value to be set.
- [GetValueAsync(ValueProviderContext, CancellationToken)](/reference/api/csharp/aspire.hosting/parameterresource/methods.md#getvalueasync-valueprovidercontext-cancellationtoken) : `ValueTask<string?>` -- Gets the value of the parameter asynchronously, waiting if necessary for the value to be set.
