Skip to content
Docs Try Aspire

IDistributedApplicationBuilder

Interface TypeScript
📦 Aspire.Hosting.Valkey v13.2.0-preview.1.26159.1
interface IDistributedApplicationBuilder {
readonly appHostDirectory: string;
readonly eventing: IDistributedApplicationEventing;
readonly executionContext: DistributedApplicationExecutionContext;
addConnectionString(
name: string,
environmentVariableName?: string): IResourceWithConnectionString;
addConnectionStringBuilder(name: string, connectionStringBuilder: (obj: ReferenceExpressionBuilder) => void): ConnectionStringResource;
addContainer(
name: string,
image: string): ContainerResource;
addContainerRegistry(
name: string,
endpoint: ParameterResource,
repository?: ParameterResource): ContainerRegistryResource;
addCSharpApp(
name: string,
path: string): ProjectResource;
addCSharpAppWithOptions(name: string, path: string, configure: (obj: ProjectResourceOptions) => void): CSharpAppResource;
addDockerfile(
name: string,
contextPath: string,
dockerfilePath?: string,
stage?: string): ContainerResource;
addDotnetTool(
name: string,
packageId: string): DotnetToolResource;
addExecutable(
name: string,
command: string,
workingDirectory: string,
args: string[]): ExecutableResource;
addExternalService(
name: string,
url: string): ExternalServiceResource;
addParameter(
name: string,
secret?: boolean): ParameterResource;
addParameterFromConfiguration(
name: string,
configurationKey: string,
secret?: boolean): ParameterResource;
addProject(
name: string,
projectPath: string,
launchProfileName: string): ProjectResource;
addProjectWithOptions(name: string, projectPath: string, configure: (obj: ProjectResourceOptions) => void): ProjectResource;
addValkey(
name: string,
port?: number,
password?: ParameterResource): ValkeyResource;
build(): DistributedApplication;
}

Properties

property appHostDirectory string get
Gets the AppHostDirectory property
property eventing IDistributedApplicationEventing get
Gets the Eventing property
property executionContext DistributedApplicationExecutionContext get
Gets the ExecutionContext property

Methods

method addConnectionString builder
Adds a connection string resource
addConnectionString(
name: string,
environmentVariableName?: string): IResourceWithConnectionString
name string
environmentVariableName string optional
IResourceWithConnectionString
method addConnectionStringBuilder builder
Adds a connection string with a builder callback
addConnectionStringBuilder(name: string, connectionStringBuilder: (obj: ReferenceExpressionBuilder) => void): ConnectionStringResource
name string
connectionStringBuilder (obj: ReferenceExpressionBuilder) => void
ConnectionStringResource
method addContainer builder
Adds a container resource
addContainer(
name: string,
image: string): ContainerResource
name string
image string
ContainerResource
method addContainerRegistry builder
Adds a container registry resource
addContainerRegistry(
name: string,
endpoint: ParameterResource,
repository?: ParameterResource): ContainerRegistryResource
name string
endpoint ParameterResource
repository ParameterResource optional
ContainerRegistryResource
method addCSharpApp builder
Adds a C# application resource
addCSharpApp(
name: string,
path: string): ProjectResource
name string
path string
ProjectResource
method addCSharpAppWithOptions builder
Adds a C# application resource with configuration options
addCSharpAppWithOptions(name: string, path: string, configure: (obj: ProjectResourceOptions) => void): CSharpAppResource
name string
path string
configure (obj: ProjectResourceOptions) => void
CSharpAppResource
method addDockerfile builder
Adds a container resource built from a Dockerfile
addDockerfile(
name: string,
contextPath: string,
dockerfilePath?: string,
stage?: string): ContainerResource
name string
contextPath string
dockerfilePath string optional
stage string optional
ContainerResource
method addDotnetTool builder
Adds a .NET tool resource
addDotnetTool(
name: string,
packageId: string): DotnetToolResource
name string
packageId string
DotnetToolResource
method addExecutable builder
Adds an executable resource
addExecutable(
name: string,
command: string,
workingDirectory: string,
args: string[]): ExecutableResource
name string
command string
workingDirectory string
args string[]
ExecutableResource
method addExternalService builder
Adds an external service resource
addExternalService(
name: string,
url: string): ExternalServiceResource
name string
url string
ExternalServiceResource
method addParameter builder
Adds a parameter resource
addParameter(
name: string,
secret?: boolean): ParameterResource
name string
secret boolean optional = False
ParameterResource
method addParameterFromConfiguration builder
Adds a parameter sourced from configuration
addParameterFromConfiguration(
name: string,
configurationKey: string,
secret?: boolean): ParameterResource
name string
configurationKey string
secret boolean optional = False
ParameterResource
method addProject builder
Adds a .NET project resource
addProject(
name: string,
projectPath: string,
launchProfileName: string): ProjectResource
name string
projectPath string
launchProfileName string
ProjectResource
method addProjectWithOptions builder
Adds a project resource with configuration options
addProjectWithOptions(name: string, projectPath: string, configure: (obj: ProjectResourceOptions) => void): ProjectResource
name string
projectPath string
configure (obj: ProjectResourceOptions) => void
ProjectResource
method addValkey builder
Adds a Valkey container resource
addValkey(
name: string,
port?: number,
password?: ParameterResource): ValkeyResource
name string
port number optional
password ParameterResource optional
ValkeyResource
method build
Builds the distributed application
build(): DistributedApplication
DistributedApplication