# ParameterResource.TryGetCurrentValue

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Defined on: [ParameterResource](/reference/api/go/aspire.hosting/parameterresource.md)
- Version: `17.0.0`
- Kind: `method`

Gets the current value for this parameter without waiting for unresolved input.

## Remarks

This method returns `null` for unresolved parameters, parameters with initialization errors, and optional
parameters that resolved without a value.

## Definition

```go
type ParameterResource interface {
    // ... omitted for brevity
    TryGetCurrentValue() (*string, error)
}
```

## Signature

```go
TryGetCurrentValue() (*string, error)
```

## Returns

`(*string, error)` -- The current parameter value, or `null` if the parameter does not currently have a non-empty value.

Returns `(*string, error)`.

## Defined on

- [ParameterResource](/reference/api/go/aspire.hosting/parameterresource.md) -- `handle`
