Table of Contents

Class SecretDefinitionAttribute

Namespace
Invex.Atom.Build.Params
Assembly
Invex.Atom.Build.dll

Defines a secret parameter for a build target, which will be masked in logs and can be resolved from secret stores.

[AttributeUsage(AttributeTargets.Property)]
public sealed class SecretDefinitionAttribute : ParamDefinitionAttributeBase
Inheritance
object
Attribute
SecretDefinitionAttribute
Inherited Members

Examples

public interface IMyTarget
{
    [SecretDefinition("api-key", "The API key for accessing the service.")]
    string ApiKey => GetParam(() => ApiKey);
}

Remarks

This attribute sets IsSecret to true. Use this for sensitive values like API keys or passwords.

Constructors

SecretDefinitionAttribute(string, string, ParamSource, string[]?)

Initializes a new instance of the SecretDefinitionAttribute class.

public SecretDefinitionAttribute(string argName, string description, ParamSource sources = ParamSource.All, string[]? chainedParams = null)

Parameters

argName string

The name of the secret on the command line (e.g., "api-key").

description string

A description of the secret for help text.

sources ParamSource

The sources from which the secret can be resolved.

chainedParams string[]

An array of other parameters that this secret depends on.