Aspire.Hosting
Official
📦 Aspire.Hosting v13.4.0 206 Functions
119 Types
119 types and 181 members
Types
type
AddContainerOptions 2 fields handle
AfterPublishEvent 2 members handle
AfterResourcesCreatedEvent 2 members handle
BeforePublishEvent 2 members handle
BeforeResourceStartedEvent 2 members handle
BeforeStartEvent 2 members type
CertificateTrustExecutionConfigurationContext 4 fields type
CertificateTrustExecutionConfigurationExportData 3 fields handle
CommandLineArgsCallbackContext 4 members handle
CommandLineArgsEditor 1 members type
CommandOptions 10 fields type
CommandResultData 3 fields handle
ConnectionStringAvailableEvent 2 members handle
ContainerImagePushOptions 4 members handle
ContainerImagePushOptionsCallbackContext 3 members handle
ContainerImageReference 2 members handle
ContainerMountAnnotation 4 members handle
ContainerPortReference 2 members handle
ContainerRegistryResource handle
ContainerResource 20 members type
CreateBuilderOptions 8 fields handle
CSharpAppResource handle
DistributedApplication 1 members handle
DistributedApplicationEventSubscription handle
DistributedApplicationExecutionContext 6 members handle
DistributedApplicationExecutionContextOptions handle
DistributedApplicationModel 2 members handle
DistributedApplicationResourceEventSubscription handle
DockerfileBuilder 3 members handle
DockerfileBuilderCallbackContext 4 members handle
DockerfileFactoryContext 1 members handle
DockerfileStage 14 members handle
DotnetToolResource 6 members handle
EndpointReference 18 members handle
EndpointReferenceExpression 3 members handle
EndpointUpdateContext 21 members handle
EnvironmentCallbackContext 4 members handle
EnvironmentEditor 1 members handle
EventingSubscriberRegistrationContext 6 members handle
ExecutableResource 3 members handle
ExecuteCommandContext 4 members type
ExecuteCommandResult 5 fields handle
ExternalServiceResource 1 members type
GenerateParameterDefault 9 fields type
HttpCommandExportOptions 9 fields type
HttpsCertificateExecutionConfigurationContext 3 fields type
HttpsCertificateExecutionConfigurationExportData 7 fields type
HttpsCertificateInfo 3 fields interface
IAspireStore 2 members interface
IComputeEnvironmentResource interface
IDistributedApplicationBuilder 28 members interface
IDistributedApplicationEvent interface
IDistributedApplicationEventing 1 members interface
IDistributedApplicationPipeline 3 members interface
IDistributedApplicationResourceEvent interface
IExecutionConfigurationBuilder 5 members interface
IExecutionConfigurationResult 2 members interface
IExpressionValue handle
InitializeResourceEvent 5 members handle
InputsDialogValidationContext 3 members type
InteractionInput 13 fields handle
InteractionInputCollection 1 members interface
IReportingStep 6 members interface
IReportingTask 4 members interface
IResource 31 members interface
IResourceWithArgs 2 members interface
IResourceWithConnectionString 3 members interface
IResourceWithContainerFiles 2 members interface
IResourceWithEndpoints 15 members interface
IResourceWithEnvironment 9 members interface
IResourceWithParent interface
IResourceWithWaitSupport 3 members interface
IUserSecretsManager 6 members handle
LogFacade 4 members type
ParameterCustomInputOptions 10 fields handle
ParameterResource 2 members handle
PipelineConfigurationContext 3 members handle
PipelineContext 7 members handle
PipelineEditor 2 members handle
PipelineStep 8 members handle
PipelineStepContext 8 members handle
PipelineStepFactoryContext 2 members handle
PipelineSummary 2 members type
ProcessCommandExportOptions 11 fields type
ProcessCommandResultExportOptions 4 fields type
ProcessCommandSpecExportData 7 fields handle
ProjectResource 3 members handle
ProjectResourceOptions 6 members type
ReferenceEnvironmentInjectionOptions 4 fields handle
ReferenceExpression 1 members handle
ReferenceExpressionBuilder 5 members handle
ResourceCommandService 1 members handle
ResourceEndpointsAllocatedEvent 2 members type
ResourceEventDto 6 fields handle
ResourceLoggerService 2 members handle
ResourceNotificationService 6 members handle
ResourceReadyEvent 2 members handle
ResourceStoppedEvent 2 members type
ResourceUrlAnnotation 4 fields handle
ResourceUrlsCallbackContext 5 members handle
ResourceUrlsEditor 3 members handle
UpdateCommandStateContext 1 members type
UpdateCommandStateResourceSnapshot 5 fields Functions
method
addConnectionString builder Adds a connection string resource
addConnectionString(name: string, environmentVariableNameOrExpression?: ReferenceExpression): IResourceWithConnectionString method
addContainer builder Adds a container resource to the application.
addContainer(name: string, image: AddContainerOptions): ContainerResource method
addContainerFiles Adds COPY --from statements for published container files
addContainerFiles(resource: IResource, rootDestinationPath: string, logger?: ILogger): DockerfileStage method
addContainerFilesStages Adds Dockerfile stages for published container files
addContainerFilesStages(resource: IResource, logger?: ILogger): DockerfileBuilder method
addContainerRegistry builder Adds a container registry resource
addContainerRegistry(name: string, endpoint: ParameterResource, repository?: ParameterResource): ContainerRegistryResource method
addCSharpApp builder Adds a C# application resource
addCSharpApp(name: string, path: string, options?: ProjectResourceOptions): CSharpAppResource method
addDockerfile builder Adds a Dockerfile to the application model that can be treated like a container resource.
addDockerfile(name: string, contextPath: string, dockerfilePath?: string, stage?: string): ContainerResource method
addDockerfileBuilder builder Adds a container resource built from a programmatically generated Dockerfile
addDockerfileBuilder(name: string, contextPath: string, callback: (arg: DockerfileBuilderCallbackContext) => Promise<void>, stage?: string): ContainerResource method
addDockerfileFactory builder Adds a Dockerfile to the application model that can be treated like a container resource, with the Dockerfile content generated by an asynchronous factory function.
addDockerfileFactory(name: string, contextPath: string, dockerfileFactory: (arg: DockerfileFactoryContext) => Promise<string>, stage?: string): ContainerResource method
addDotnetTool builder Adds a .NET tool resource to the application model.
addDotnetTool(name: string, packageId: string): DotnetToolResource method
addEventingSubscriber Adds an ATS-friendly eventing subscriber callback to the distributed-application builder.
addEventingSubscriber(subscribe: (arg: EventingSubscriberRegistrationContext) => Promise<void>): void method
addExecutable builder Adds an executable resource to the application model.
addExecutable(name: string, command: string, workingDirectory: string, args: string[]): ExecutableResource method
addExternalService builder Adds an external service resource
addExternalService(name: string, url: ParameterResource): ExternalServiceResource method
addMarkdown Adds a key-value pair to the pipeline summary with a Markdown-formatted value.
addMarkdown(key: string, markdownString: string): void method
addParameter builder Adds a parameter resource
addParameter(name: string, value?: string, publishValueAsDefault?: boolean, secret?: boolean): ParameterResource method
addParameterFromConfiguration builder Adds a parameter resource to the application, with a value coming from configuration.
addParameterFromConfiguration(name: string, configurationKey: string, secret?: boolean): ParameterResource method
addParameterWithGeneratedValue builder Adds a parameter with a generated default value
addParameterWithGeneratedValue(name: string, value: GenerateParameterDefault, secret?: boolean, persist?: boolean): ParameterResource method
addProject builder Adds a .NET project resource
addProject(name: string, projectPath: string, launchProfileOrOptions?: ProjectResourceOptions): ProjectResource method
addStep Adds an application-level pipeline step in a TypeScript-friendly shape.
addStep(stepName: string, callback: (arg: PipelineStepContext) => Promise<void>, dependsOn?: string[], requiredBy?: string[]): void method
arg Adds a global ARG statement to the Dockerfile
arg(name: string, defaultValue?: string): DockerfileBuilder method
arg Adds an ARG statement to a Dockerfile stage
arg(name: string, defaultValue?: string): DockerfileStage method
asHttp2Service builder Configures a resource to mark all endpoints' transport as HTTP/2. This is useful for HTTP/2 services that need prior knowledge.
asHttp2Service(): IResourceWithEndpoints method
build Builds the execution configuration for the specified builder.
build(executionContext: DistributedApplicationExecutionContext, resourceLogger?: ILogger, cancellationToken?: cancellationToken): IExecutionConfigurationResult method
clearContainerFilesSources builder Removes any container files source annotation from the resource being built.
clearContainerFilesSources(): IResourceWithContainerFiles method
cmd Adds a CMD statement to a Dockerfile stage
cmd(command: string[]): DockerfileStage method
comment Adds a comment to a Dockerfile stage
comment(comment: string): DockerfileStage method
completeLog Completes the log stream for a resource.
completeLog(resource: IResource): void method
completeLogByName Completes the log stream by resource name.
completeLogByName(resourceName: string): void method
completeStep Completes the reporting step with plain-text completion text.
completeStep(completionText: string, completionState?: string, cancellationToken?: cancellationToken): void method
completeStepMarkdown Completes the reporting step with Markdown-formatted completion text.
completeStepMarkdown(markdownString: string, completionState?: string, cancellationToken?: cancellationToken): void method
completeTask Completes the reporting task with plain-text completion text.
completeTask(completionMessage?: string, completionState?: string, cancellationToken?: cancellationToken): void method
completeTaskMarkdown Completes the reporting task with Markdown-formatted completion text.
completeTaskMarkdown(markdownString: string, completionState?: string, cancellationToken?: cancellationToken): void method
configure Registers a pipeline configuration callback in a TypeScript-friendly shape.
configure(callback: (arg: PipelineConfigurationContext) => Promise<void>): void method
copy Adds a COPY statement to a Dockerfile stage
copy(source: string, destination: string, chown?: string): DockerfileStage method
copyFrom Adds a COPY --from statement to a Dockerfile stage
copyFrom(from: string, source: string, destination: string, chown?: string): DockerfileStage method
createBuilder Creates a new distributed application builder
createBuilder(): IDistributedApplicationBuilder method
createExecutionConfiguration Creates an execution configuration builder for the specified resource.
createExecutionConfiguration(): IExecutionConfigurationBuilder method
createLogger Creates a logger for the specified category name.
createLogger(categoryName: string): ILogger method
createMarkdownTask Creates a reporting task with Markdown-formatted status text.
createMarkdownTask(markdownString: string, cancellationToken?: cancellationToken): IReportingTask method
createTask Creates a reporting task with plain-text status text.
createTask(statusText: string, cancellationToken?: cancellationToken): IReportingTask method
disableBuildOnlyContainerValidation Disables the publish and deploy validation that requires build-only containers to be consumed by another resource.
disableBuildOnlyContainerValidation(): IDistributedApplicationPipeline method
disableForwardedHeaders builder Configures the project to disable forwarded headers when being published.
disableForwardedHeaders(): ProjectResource method
emptyLine Adds an empty line to a Dockerfile stage
emptyLine(): DockerfileStage method
entrypoint Adds an ENTRYPOINT statement to a Dockerfile stage
entrypoint(command: string[]): DockerfileStage method
env Adds an ENV statement to a Dockerfile stage
env(name: string, value: string): DockerfileStage method
excludeFromManifest builder Excludes a resource from being published to the manifest.
excludeFromManifest(): IResource method
excludeFromMcp builder Exclude the resource from MCP operations using the Aspire MCP server. The resource is excluded from results that return resources, console logs and telemetry.
excludeFromMcp(): IResource method
executeCommandAsync Executes a command for the specified resource.
executeCommandAsync(resource: IResource, commandName: string, arguments?: Dict<string,string>, cancellationToken?: cancellationToken): ExecuteCommandResult method
exists Checks whether a configuration section exists.
exists(key: string): boolean method
expose Adds an EXPOSE statement to a Dockerfile stage
expose(port: number): DockerfileStage method
findResourceByName Finds a resource by name.
findResourceByName(name: string): IResource method
from Adds a FROM statement to start a Dockerfile stage
from(image: string, stageName?: string): DockerfileStage method
getAspireStore Gets the Aspire store from the service provider.
getAspireStore(): IAspireStore method
getCertificateTrustData Gets certificate trust execution-configuration data when present.
getCertificateTrustData(): CertificateTrustExecutionConfigurationExportData method
getChildren Gets the child sections of a configuration handle.
getChildren(): IConfigurationSection[] method
getConfiguration Gets the application configuration.
getConfiguration(): IConfiguration method
getConfigValue Gets a configuration value by key.
getConfigValue(key: string): string method
getConnectionProperty Retrieves the value of a specified connection property from the resource's connection properties.
getConnectionProperty(key: string): ReferenceExpression method
getConnectionString Gets a connection string by name.
getConnectionString(name: string): string method
getDistributedApplicationModel Gets the distributed application model from the service provider.
getDistributedApplicationModel(): DistributedApplicationModel method
getEndpoint Gets an endpoint reference
getEndpoint(name: string): EndpointReference method
getEventing Gets the distributed application eventing service from the service provider.
getEventing(): IDistributedApplicationEventing method
getFileNameWithContent Gets a deterministic file path that is a copy of the `sourceFilename`. The resulting file name will depend on the content of the file.
getFileNameWithContent(filenameTemplate: string, sourceFilename: string): string method
getHttpsCertificateData Gets HTTPS certificate execution-configuration data when present.
getHttpsCertificateData(): HttpsCertificateExecutionConfigurationExportData method
getLoggerFactory Gets the logger factory from the service provider.
getLoggerFactory(): ILoggerFactory method
getOrSetSecret Gets a secret value if it exists in configuration, or sets it to the provided value if it does not.
getOrSetSecret(resourceBuilder: IResource, name: string, value: string): void method
getResourceCommandService Gets the resource command service from the service provider.
getResourceCommandService(): ResourceCommandService method
getResourceLoggerService Gets the resource logger service from the service provider.
getResourceLoggerService(): ResourceLoggerService method
getResourceName Gets the name of the resource from a builder.
getResourceName(): string method
getResourceNotificationService Gets the resource notification service from the service provider.
getResourceNotificationService(): ResourceNotificationService method
getResources Gets all resources in the distributed application model.
getResources(): IResource[] method
getSection Gets a configuration section by key.
getSection(key: string): IConfigurationSection method
getUserSecretsManager Gets the user secrets manager from the service provider.
getUserSecretsManager(): IUserSecretsManager method
isDevelopment Checks if the environment is Development.
isDevelopment(): boolean method
isEnvironment Checks if the environment matches the specified name.
isEnvironment(environmentName: string): boolean method
isProduction Checks if the environment is Production.
isProduction(): boolean method
isStaging Checks if the environment is Staging.
isStaging(): boolean method
log Logs a message with a specified log level.
log(level: string, message: string): void method
logDebug Logs a debug message.
logDebug(message: string): void method
logError Logs an error message.
logError(message: string): void method
logInformation Logs an information message.
logInformation(message: string): void method
logStep Logs a plain-text message for the reporting step.
logStep(level: string, message: string): void method
logStepMarkdown Logs a Markdown-formatted message for the reporting step.
logStepMarkdown(level: string, markdownString: string): void method
logWarning Logs a warning message.
logWarning(message: string): void method
onAfterPublish Subscribes to the AfterPublish event from an eventing subscriber registration context.
onAfterPublish(callback: (arg: AfterPublishEvent) => Promise<void>): DistributedApplicationEventSubscription method
onAfterResourcesCreated Subscribes to the AfterResourcesCreated event from an eventing subscriber registration context.
onAfterResourcesCreated(callback: (arg: AfterResourcesCreatedEvent) => Promise<void>): DistributedApplicationEventSubscription method
onBeforePublish Subscribes to the BeforePublish event from an eventing subscriber registration context.
onBeforePublish(callback: (arg: BeforePublishEvent) => Promise<void>): DistributedApplicationEventSubscription method
onBeforeResourceStarted builder Subscribes to the BeforeResourceStarted event.
onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise<void>): IResource method
onBeforeStart Subscribes to the BeforeStart event from an eventing subscriber registration context.
onBeforeStart(callback: (arg: BeforeStartEvent) => Promise<void>): DistributedApplicationEventSubscription method
onConnectionStringAvailable builder Subscribes to the ConnectionStringAvailable event.
onConnectionStringAvailable(callback: (arg: ConnectionStringAvailableEvent) => Promise<void>): IResourceWithConnectionString method
onInitializeResource builder Subscribes to the InitializeResource event.
onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise<void>): IResource method
onResourceEndpointsAllocated builder Subscribes to the ResourceEndpointsAllocated event.
onResourceEndpointsAllocated(callback: (arg: ResourceEndpointsAllocatedEvent) => Promise<void>): IResourceWithEndpoints method
onResourceReady builder Subscribes to the ResourceReady event.
onResourceReady(callback: (arg: ResourceReadyEvent) => Promise<void>): IResource method
onResourceStopped builder Subscribes to the ResourceStopped event.
onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise<void>): IResource method
publishAsConnectionString builder Changes the resource to be published as a connection string reference in the manifest.
publishAsConnectionString(): ContainerResource method
publishAsContainer builder Changes the resource to be published as a container in the manifest.
publishAsContainer(): ContainerResource method
publishAsDockerFile builder Publishes an executable as a Docker file
publishAsDockerFile(configure: (obj: ContainerResource) => Promise<void>): ExecutableResource method
publishAsDockerFile builder Publishes a project as a Docker file with optional container configuration
publishAsDockerFile(configure?: (obj: ContainerResource) => Promise<void>): ProjectResource method
publishResourceUpdate Publishes an update for a resource's state.
publishResourceUpdate(resource: IResource, state?: string, stateStyle?: string): void method
publishWithContainerFiles builder Configures the resource to copy container files from the specified source resource during publishing.
publishWithContainerFiles(source: IResourceWithContainerFiles, destinationPath: string): IContainerFilesDestinationResource method
run Adds a RUN statement to a Dockerfile stage
run(command: string): DockerfileStage method
runWithMounts Adds a RUN statement with mounts to a Dockerfile stage
runWithMounts(command: string, mounts: string[]): DockerfileStage method
saveStateJson Saves state to user secrets from a JSON string.
saveStateJson(json: string, cancellationToken?: cancellationToken): void method
subscribeAfterPublish Subscribes to the AfterPublish event, which fires after the application is published.
subscribeAfterPublish(callback: (arg: AfterPublishEvent) => Promise<void>): DistributedApplicationEventSubscription method
subscribeAfterResourcesCreated Subscribes to the AfterResourcesCreated event, which fires after all resources are created.
subscribeAfterResourcesCreated(callback: (arg: AfterResourcesCreatedEvent) => Promise<void>): DistributedApplicationEventSubscription method
subscribeBeforePublish Subscribes to the BeforePublish event, which fires before the application is published.
subscribeBeforePublish(callback: (arg: BeforePublishEvent) => Promise<void>): DistributedApplicationEventSubscription method
subscribeBeforeStart Subscribes to the BeforeStart event, which fires before the application starts.
subscribeBeforeStart(callback: (arg: BeforeStartEvent) => Promise<void>): DistributedApplicationEventSubscription method
tryAddEventingSubscriber Attempts to add an ATS-friendly eventing subscriber callback to the distributed-application builder.
tryAddEventingSubscriber(subscribe: (arg: EventingSubscriberRegistrationContext) => Promise<void>): void method
tryGetResourceState Tries to get the current state of a resource.
tryGetResourceState(resourceName: string): ResourceEventDto method
updateTask Updates the reporting task with plain-text status text.
updateTask(statusText: string, cancellationToken?: cancellationToken): void method
updateTaskMarkdown Updates the reporting task with Markdown-formatted status text.
updateTaskMarkdown(markdownString: string, cancellationToken?: cancellationToken): void method
user Adds a USER statement to a Dockerfile stage
user(user: string): DockerfileStage method
waitFor builder Waits for another resource to be ready
waitFor(dependency: IResource, waitBehavior?: WaitBehavior): IResourceWithWaitSupport method
waitForCompletion builder Waits for the dependency resource to enter the Exited or Finished state before starting the resource.
waitForCompletion(dependency: IResource, exitCode?: number): IResourceWithWaitSupport method
waitForDependencies Waits for all dependencies of a resource to be ready.
waitForDependencies(resource: IResource): void method
waitForResourceHealthy Waits for a resource to become healthy.
waitForResourceHealthy(resourceName: string): ResourceEventDto method
waitForResourceState Waits for a resource to reach a specified state.
waitForResourceState(resourceName: string, targetState?: string): void method
waitForResourceStates Waits for a resource to reach one of the specified states.
waitForResourceStates(resourceName: string, targetStates: string[]): string method
waitForStart builder Waits for another resource to start
waitForStart(dependency: IResource, waitBehavior?: WaitBehavior): IResourceWithWaitSupport method
withArgs builder Adds arguments to be passed to a resource that supports arguments when it is launched.
withArgs(args: string[]): IResourceWithArgs method
withArgsCallback builder Adds a callback to be executed with a list of command-line arguments when a resource is started.
withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise<void>): IResourceWithArgs method
withArgumentsConfig Adds a command line arguments configuration gatherer to the builder.
withArgumentsConfig(): IExecutionConfigurationBuilder method
withBindMount builder Adds a bind mount to a container resource.
withBindMount(source: string, target: string, isReadOnly?: boolean): ContainerResource method
withBuildArg builder Adds a build argument when the container is built from a Dockerfile.
withBuildArg(name: string, value: ParameterResource): ContainerResource method
withBuildSecret builder Adds a secret build argument when the container is built from a Dockerfile.
withBuildSecret(name: string, value: ParameterResource): ContainerResource method
withCertificateTrustConfig Adds a certificate trust configuration gatherer to the builder.
withCertificateTrustConfig(configContextFactory: (arg: CertificateTrustScope) => Promise<CertificateTrustExecutionConfigurationContext>): IExecutionConfigurationBuilder method
withCertificateTrustScope builder Sets the certificate trust scope
withCertificateTrustScope(scope: CertificateTrustScope): IResourceWithEnvironment method
withChildRelationship builder Sets a child relationship
withChildRelationship(child: IResource): IResource method
withCommand builder Adds a resource command
withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise<ExecuteCommandResult>, commandOptions?: CommandOptions): IResource method
withComputeEnvironment builder Configures the compute environment for the compute resource.
withComputeEnvironment(computeEnvironmentResource: IComputeEnvironmentResource): IComputeResource method
withConnectionProperty builder Adds a connection property annotation to the resource being built.
withConnectionProperty(name: string, value: ReferenceExpression): IResourceWithConnectionString method
withContainerCertificatePaths builder Adds container certificate path overrides used for certificate trust at run time.
withContainerCertificatePaths(customCertificatesDestination?: string, defaultCertificateBundlePaths?: string[], defaultCertificateDirectoryPaths?: string[]): ContainerResource method
withContainerFilesSource builder Adds a container files source annotation to the resource being built, specifying the path to the container files source.
withContainerFilesSource(sourcePath: string): IResourceWithContainerFiles method
withContainerName builder Overrides the default container name for this resource. By default Aspire generates a unique container name based on the resource name and a random postfix (or a postfix based on a hash of the AppHost project path for persistent container resources). This method allows you to override that behavior with a custom name, but could lead to naming conflicts if the specified name is not unique.
withContainerName(name: string): ContainerResource method
withContainerNetworkAlias builder Adds a network alias to container resource.
withContainerNetworkAlias(alias: string): ContainerResource method
withContainerRegistry builder Configures the resource to use the specified container registry for container image operations.
withContainerRegistry(registry: IResource): IResource method
withContainerRuntimeArgs builder Adds a callback to be executed with a list of arguments to add to the container runtime run command when a container resource is started.
withContainerRuntimeArgs(args: string[]): ContainerResource method
withCustomInput builder Sets a custom input for the parameter resource from a polyglot app host.
withCustomInput(options: ParameterCustomInputOptions): ParameterResource method
withDescription builder Sets the description of the parameter resource.
withDescription(description: string, enableMarkdown?: boolean): ParameterResource method
withDeveloperCertificateTrust builder Indicates whether developer certificates should be treated as trusted certificate authorities for the resource at run time. Currently this indicates trust for the ASP.NET Core developer certificate. The developer certificate will only be trusted when running in local development scenarios; in publish mode resources will use their default certificate trust.
withDeveloperCertificateTrust(trust: boolean): IResourceWithEnvironment method
withDockerfile builder Causes Aspire to build the specified container image from a Dockerfile.
withDockerfile(contextPath: string, dockerfilePath?: string, stage?: string): ContainerResource method
withDockerfileBaseImage builder Configures custom base images for generated Dockerfiles.
withDockerfileBaseImage(buildImage?: string, runtimeImage?: string): IResource method
withDockerfileBuilder builder Configures the resource to use a programmatically generated Dockerfile
withDockerfileBuilder(contextPath: string, callback: (arg: DockerfileBuilderCallbackContext) => Promise<void>, stage?: string): ContainerResource method
withDockerfileFactory builder Builds the specified container image from a Dockerfile generated by an asynchronous factory function.
withDockerfileFactory(contextPath: string, dockerfileFactory: (arg: DockerfileFactoryContext) => Promise<string>, stage?: string): ContainerResource method
withEndpoint builder Adds a network endpoint
withEndpoint(port?: number, targetPort?: number, scheme?: string, name?: string, env?: string, isProxied?: boolean, isExternal?: boolean, protocol?: ProtocolType): IResourceWithEndpoints method
withEndpointCallback builder Updates a named endpoint via callback
withEndpointCallback(endpointName: string, callback: (obj: EndpointUpdateContext) => Promise<void>, createIfNotExists?: boolean): IResourceWithEndpoints method
withEndpointProxySupport builder Set whether a resource can use proxied endpoints or whether they should be disabled for all endpoints belonging to the resource. If set to `false`, endpoints belonging to the resource will ignore the configured proxy settings and run proxy-less.
withEndpointProxySupport(proxyEnabled: boolean): IResourceWithEndpoints method
withEntrypoint builder Sets the Entrypoint for the container.
withEntrypoint(entrypoint: string): ContainerResource method
withEnvironment builder Sets an environment variable
withEnvironment(name: string, value: IExpressionValue): IResourceWithEnvironment method
withEnvironmentCallback builder Allows for the population of environment variables on a resource.
withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise<void>): IResourceWithEnvironment method
withEnvironmentVariablesConfig Adds an environment variables configuration gatherer to the builder.
withEnvironmentVariablesConfig(): IExecutionConfigurationBuilder method
withExecutableCommand builder Sets the command for the executable resource.
withExecutableCommand(command: string): ExecutableResource method
withExplicitStart builder Prevents resource from starting automatically
withExplicitStart(): IResource method
withExternalHttpEndpoints builder Marks existing http or https endpoints on a resource as external.
withExternalHttpEndpoints(): IResourceWithEndpoints method
withHealthCheck builder Adds a health check by key
withHealthCheck(key: string): IResource method
withHidden builder Hides the resource from default resource lists
withHidden(): IResource method
withHiddenOnCompletion builder Hides the resource from default resource lists after successful completion
withHiddenOnCompletion(exitCode?: number, exitCodes?: number[]): IResource method
withHttpCommand builder Adds an HTTP resource command
withHttpCommand(path: string, displayName: string, options?: HttpCommandExportOptions): IResourceWithEndpoints method
withHttpEndpoint builder Adds an HTTP endpoint
withHttpEndpoint(port?: number, targetPort?: number, name?: string, env?: string, isProxied?: boolean): IResourceWithEndpoints method
withHttpEndpointCallback builder Updates an HTTP endpoint via callback
withHttpEndpointCallback(callback: (obj: EndpointUpdateContext) => Promise<void>, name?: string, createIfNotExists?: boolean): IResourceWithEndpoints method
withHttpHealthCheck builder Adds an HTTP health check to the external service for polyglot app hosts.
withHttpHealthCheck(path?: string, statusCode?: number, endpointName?: string): ExternalServiceResource method
withHttpHealthCheck builder Adds a health check to the resource which is mapped to a specific endpoint.
withHttpHealthCheck(path?: string, statusCode?: number, endpointName?: string): IResourceWithEndpoints method
withHttpProbe builder Adds an HTTP health probe to the resource
withHttpProbe(probeType: ProbeType, path?: string, initialDelaySeconds?: number, periodSeconds?: number, timeoutSeconds?: number, failureThreshold?: number, successThreshold?: number, endpointName?: string): IResourceWithEndpoints method
withHttpsCertificateConfig Adds an HTTPS certificate configuration gatherer using certificate metadata instead of a raw X509 certificate.
withHttpsCertificateConfig(configContextFactory: (arg: HttpsCertificateInfo) => Promise<HttpsCertificateExecutionConfigurationContext>): IExecutionConfigurationBuilder method
withHttpsDeveloperCertificate builder Indicates that a resource should use the developer certificate key pair for HTTPS endpoints at run time. Currently this indicates use of the ASP.NET Core developer certificate. The developer certificate will only be used when running in local development scenarios; in publish mode resources will use their default certificate configuration.
withHttpsDeveloperCertificate(password?: ParameterResource): IResourceWithEnvironment method
withHttpsEndpoint builder Adds an HTTPS endpoint
withHttpsEndpoint(port?: number, targetPort?: number, name?: string, env?: string, isProxied?: boolean): IResourceWithEndpoints method
withHttpsEndpointCallback builder Updates an HTTPS endpoint via callback
withHttpsEndpointCallback(callback: (obj: EndpointUpdateContext) => Promise<void>, name?: string, createIfNotExists?: boolean): IResourceWithEndpoints method
withIconName builder Specifies the icon to use when displaying the resource in the dashboard.
withIconName(iconName: string, iconVariant?: IconVariant): IResource method
withImage builder Allows overriding the image on a container.
withImage(image: string, tag?: string): ContainerResource method
withImagePullPolicy builder Sets the pull policy for the container resource.
withImagePullPolicy(pullPolicy: ImagePullPolicy): ContainerResource method
withImagePushOptions builder Adds an asynchronous callback to configure container image push options for the resource.
withImagePushOptions(callback: (arg: ContainerImagePushOptionsCallbackContext) => Promise<void>): IComputeResource method
withImageRegistry builder Allows overriding the image registry on a container.
withImageRegistry(registry: string): ContainerResource method
withImageSHA256 builder Allows setting the image to a specific sha256 on a container.
withImageSHA256(sha256: string): ContainerResource method
withImageTag builder Allows overriding the image tag on a container.
withImageTag(tag: string): ContainerResource method
withLifetime builder Sets the lifetime behavior of the container resource.
withLifetime(lifetime: ContainerLifetime): ContainerResource method
withLifetimeOf builder Configures a resource to match the lifetime of another resource.
withLifetimeOf(sourceBuilder: IResource): IResource method
withMcpServer builder Marks the resource as hosting a Model Context Protocol (MCP) server on the specified endpoint.
withMcpServer(path?: string, endpointName?: string): IResourceWithEndpoints method
withOtlpExporter builder Configures OTLP telemetry export
withOtlpExporter(protocol?: OtlpProtocol): IResourceWithEnvironment method
withoutHttpsCertificate builder Disable HTTPS/TLS server certificate configuration for the resource. No HTTPS/TLS termination configuration will be applied.
withoutHttpsCertificate(): IResourceWithEnvironment method
withParentProcessLifetime builder Configures a resource to use a persistent lifetime that ends when a parent process exits.
withParentProcessLifetime(parentProcessId: number): IResource method
withParentRelationship builder Sets the parent relationship
withParentRelationship(parent: IResource): IResource method
withPersistentLifetime builder Configures a resource to use a persistent lifetime.
withPersistentLifetime(): IResource method
withPipelineConfiguration builder Registers a callback to be executed during the pipeline configuration phase, allowing modification of step dependencies and relationships.
withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise<void>): IResource method
withPipelineStepFactory builder Adds a pipeline step to the resource that will be executed during deployment.
withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise<void>, dependsOn?: string[], requiredBy?: string[], tags?: string[], description?: string): IResource method
withProcessCommand builder Adds a command to the resource that starts a local process when invoked.
withProcessCommand(commandName: string, displayName: string, options: ProcessCommandExportOptions): IResource method
withProcessCommandFactory builder Adds a command to the resource that starts a local process created by a callback when invoked.
withProcessCommandFactory(commandName: string, displayName: string, createProcessSpec: (arg: ExecuteCommandContext) => Promise<ProcessCommandSpecExportData>, options?: ProcessCommandResultExportOptions): IResource method
withReference builder Adds a reference to another resource
withReference(source: EndpointReference|string|uri, connectionName?: string, optional?: boolean, name?: string): IResourceWithEnvironment method
withReferenceEnvironment builder Configures how information is injected into environment variables when the resource references other resources.
withReferenceEnvironment(options: ReferenceEnvironmentInjectionOptions): IResourceWithEnvironment method
withRelationship builder Adds a relationship to another resource using its builder.
withRelationship(resourceBuilder: IResource, type: string): IResource method
withRemoteImageName builder Sets the remote image name (without registry endpoint or tag) for container push operations.
withRemoteImageName(remoteImageName: string): IComputeResource method
withRemoteImageTag builder Sets the remote image tag for container push operations.
withRemoteImageTag(remoteImageTag: string): IComputeResource method
withReplicas builder Configures how many replicas of the project should be created for the project.
withReplicas(replicas: number): ProjectResource method
withRequiredCommand builder Declares that a resource requires a specific command/executable to be available on the local machine PATH before it can start.
withRequiredCommand(command: string, helpLink?: string): IResource method
withSessionLifetime builder Configures a resource to use a session lifetime.
withSessionLifetime(): IResource method
withToolIgnoreExistingFeeds builder Configures the tool to use only the specified package sources, ignoring existing NuGet configuration.
withToolIgnoreExistingFeeds(): DotnetToolResource method
withToolIgnoreFailedSources builder Configures the resource to treat package source failures as warnings.
withToolIgnoreFailedSources(): DotnetToolResource method
withToolPackage builder Sets the package identifier for the tool configuration associated with the resource builder.
withToolPackage(packageId: string): DotnetToolResource method
withToolPrerelease builder Allows prerelease versions of the tool to be used
withToolPrerelease(): DotnetToolResource method
withToolSource builder Adds a NuGet package source for tool acquisition.
withToolSource(source: string): DotnetToolResource method
withToolVersion builder Sets the package version for a tool to use.
withToolVersion(version: string): DotnetToolResource method
withUrl builder Adds or modifies displayed URLs
withUrl(url: ReferenceExpression, displayText?: string): IResource method
withUrlForEndpoint builder Registers a callback to update the URL displayed for the endpoint with the specified name.
withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise<void>): IResource method
withUrls builder Registers a callback to customize the URLs displayed for the resource.
withUrls(callback: (obj: ResourceUrlsCallbackContext) => Promise<void>): IResource method
withVolume builder Adds a volume to a container resource.
withVolume(target: string, name?: string, isReadOnly?: boolean): ContainerResource method
withWorkingDirectory builder Sets the working directory for the executable resource.
withWorkingDirectory(workingDirectory: string): ExecutableResource method
workDir Adds a WORKDIR statement to a Dockerfile stage
workDir(path: string): DockerfileStage Enums
enum
CertificateTrustScope 4 values enum
CommandResultFormat 3 values enum
ContainerLifetime 2 values enum
ContainerMountType 2 values enum
DistributedApplicationOperation 2 values enum
EndpointProperty 8 values enum
HttpCommandResultMode 4 values enum
IconVariant 2 values enum
ImagePullPolicy 4 values enum
InputType 5 values enum
OtlpProtocol 3 values enum
ProbeType 3 values enum
ResourceCommandState 3 values enum
ResourceCommandVisibility 3 values enum
UrlDisplayLocation 2 values enum
WaitBehavior 2 values