Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

ResourceWithArgs

Interfacemarker
📦 Aspire.Hosting v17.0.0

Represents a resource that is associated with commandline arguments.

type ResourceWithArgs interface{}

Methods

A marker interface declares no methods of its own in Go. Its functions are declared on the concrete types they apply to.

methodWithArgsbuilder
Adds arguments to be passed to a resource that supports arguments when it is launched.
WithArgs(args []string) ResourceWithArgs
args[]stringThe arguments to be passed to the resource when it is started.
ResourceWithArgs

The resource builder.

Returns a handle; failures surface later via Err().

methodWithArgsCallbackbuilder
Adds a callback to be executed with a list of command-line arguments when a resource is started.
WithArgsCallback(callback func(obj CommandLineArgsCallbackContext)) ResourceWithArgs
callbackfunc(obj CommandLineArgsCallbackContext)callbackA callback that allows for deferred execution for computing arguments. This runs after resources have been allocated by the orchestrator and allows access to other resources to resolve computed data, e.g. connection strings, ports.
ResourceWithArgs

The resource builder.

Returns a handle; failures surface later via Err().

methodWithArgsReplacebuilder
Replaces the arguments to be passed to a resource that supports arguments when it is launched.
WithArgsReplace(args []string) ResourceWithArgs
args[]stringThe arguments to be passed to the resource when it is started.
ResourceWithArgs

The resource builder.

Returns a handle; failures surface later via Err().

Configures environment variables that point to Aspire-managed certificate trust paths.
WithCertificateTrustEnvironment(
certificateBundleEnvironmentVariable string,
options ...*WithCertificateTrustEnvironmentOptions,
) ResourceWithArgs
certificateBundleEnvironmentVariablestringThe environment variable that receives the certificate bundle path.
options...*WithCertificateTrustEnvironmentOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithCertificateTrustEnvironmentOptions argument.

CertificateDirectoriesEnvironmentVariable*stringThe optional environment variable that receives the certificate directories path.
ResourceWithArgs

The resource builder.

Returns a handle; failures surface later via Err().

Applies to

This interface applies to the following types: