Skip to content
Docs Try Aspire

IDistributedApplicationBuilder

Interface TypeScript
📦 Aspire.Hosting.Azure.WebPubSub v13.2.0-preview.1.26159.1
interface IDistributedApplicationBuilder {
readonly appHostDirectory: string;
readonly eventing: IDistributedApplicationEventing;
readonly executionContext: DistributedApplicationExecutionContext;
addAzureEnvironment(): AzureEnvironmentResource;
addAzureInfrastructure(name: string, configureInfrastructure: (obj: AzureResourceInfrastructure) => void): AzureProvisioningResource;
addAzureProvisioning(): IDistributedApplicationBuilder;
addAzureUserAssignedIdentity(name: string): AzureUserAssignedIdentityResource;
addAzureWebPubSub(name: string): AzureWebPubSubResource;
addBicepTemplate(
name: string,
bicepFile: string): AzureBicepResource;
addBicepTemplateString(
name: string,
bicepContent: string): AzureBicepResource;
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;
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 addAzureEnvironment builder
Adds the shared Azure environment resource to the application model
addAzureEnvironment(): AzureEnvironmentResource
AzureEnvironmentResource
method addAzureInfrastructure builder
Adds an Azure provisioning resource to the application model
addAzureInfrastructure(name: string, configureInfrastructure: (obj: AzureResourceInfrastructure) => void): AzureProvisioningResource
name string
configureInfrastructure (obj: AzureResourceInfrastructure) => void
AzureProvisioningResource
method addAzureProvisioning
Adds Azure provisioning services to the distributed application builder
addAzureProvisioning(): IDistributedApplicationBuilder
IDistributedApplicationBuilder
method addAzureUserAssignedIdentity builder
Adds an Azure user-assigned identity resource
addAzureUserAssignedIdentity(name: string): AzureUserAssignedIdentityResource
name string
AzureUserAssignedIdentityResource
method addAzureWebPubSub builder
Adds an Azure Web PubSub resource to the distributed application model.
addAzureWebPubSub(name: string): AzureWebPubSubResource
name string
AzureWebPubSubResource
method addBicepTemplate builder
Adds an Azure Bicep template resource from a file
addBicepTemplate(
name: string,
bicepFile: string): AzureBicepResource
name string
bicepFile string
AzureBicepResource
method addBicepTemplateString builder
Adds an Azure Bicep template resource from inline Bicep content
addBicepTemplateString(
name: string,
bicepContent: string): AzureBicepResource
name string
bicepContent string
AzureBicepResource
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 build
Builds the distributed application
build(): DistributedApplication
DistributedApplication