# BuildImageSecretValue Constructors

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

Represents a resolved build secret with its value and type.

## BuildImageSecretValue(string?, BuildImageSecretType)

- Name: `Constructor(string?, BuildImageSecretType)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Publishing/BuildImageSecretValue.cs#L32)

Represents a resolved build secret with its value and type.

```csharp
public record BuildImageSecretValue
{
    public BuildImageSecretValue(
        string? Value,
        BuildImageSecretType Type)
    {
        // ...
    }
}
```

## Parameters

- `Value` (`string?`)
  The resolved secret value. For [BuildImageSecretType.Environment](/reference/api/csharp/aspire.hosting/buildimagesecrettype/fields.md) secrets, this is the secret content. For [BuildImageSecretType.File](/reference/api/csharp/aspire.hosting/buildimagesecrettype/fields.md) secrets, this is the file path.
- `Type` ([BuildImageSecretType](/reference/api/csharp/aspire.hosting/buildimagesecrettype.md))
  The type of the build secret, indicating whether it is environment-based or file-based.
