Skip to content
Docs Try Aspire

IResource

Interface TypeScript
📦 Aspire.Hosting.Azure.AIFoundry v13.2.0-preview.1.26159.1
interface IResource {
excludeFromManifest(): IResource;
excludeFromMcp(): IResource;
getResourceName(): string;
withAIFoundryRoleAssignments(
target: AzureAIFoundryResource,
roles: AzureAIFoundryRole[]): IResource;
withChildRelationship(child: IResource): IResource;
withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => ExecuteCommandResult, commandOptions?: CommandOptions): IResource;
withContainerRegistry(registry: IResource): IResource;
withDockerfileBaseImage(
buildImage?: string,
runtimeImage?: string): IResource;
withExplicitStart(): IResource;
withHealthCheck(key: string): IResource;
withIconName(
iconName: string,
iconVariant?: IconVariant): IResource;
withParentRelationship(parent: IResource): IResource;
withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => void): IResource;
withPipelineConfigurationAsync(callback: (arg: PipelineConfigurationContext) => void): IResource;
withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => void, dependsOn?: string[], requiredBy?: string[], tags?: string[], description?: string): IResource;
withRemoteImageName(remoteImageName: string): IResource;
withRemoteImageTag(remoteImageTag: string): IResource;
withRequiredCommand(
command: string,
helpLink?: string): IResource;
withUrl(
url: string,
displayText?: string): IResource;
withUrlExpression(
url: ReferenceExpression,
displayText?: string): IResource;
withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => void): IResource;
withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => void): IResource;
withUrlsCallbackAsync(callback: (arg: ResourceUrlsCallbackContext) => void): IResource;
}

Methods

method excludeFromManifest builder
Excludes the resource from the deployment manifest
excludeFromManifest(): IResource
IResource
method excludeFromMcp builder
Excludes the resource from MCP server exposure
excludeFromMcp(): IResource
IResource
method getResourceName
Gets the resource name
getResourceName(): string
string
method withAIFoundryRoleAssignments builder
Assigns Azure AI Foundry roles to a resource
withAIFoundryRoleAssignments(
target: AzureAIFoundryResource,
roles: AzureAIFoundryRole[]): IResource
target AzureAIFoundryResource
roles AzureAIFoundryRole[]
IResource
method withChildRelationship builder
Sets a child relationship
withChildRelationship(child: IResource): IResource
child IResource
IResource
method withCommand builder
Adds a resource command
withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => ExecuteCommandResult, commandOptions?: CommandOptions): IResource
name string
displayName string
executeCommand (arg: ExecuteCommandContext) => ExecuteCommandResult
commandOptions CommandOptions optional
IResource
method withContainerRegistry builder
Configures a resource to use a container registry
withContainerRegistry(registry: IResource): IResource
registry IResource
IResource
method withDockerfileBaseImage builder
Sets the base image for a Dockerfile build
withDockerfileBaseImage(
buildImage?: string,
runtimeImage?: string): IResource
buildImage string optional
runtimeImage string optional
IResource
method withExplicitStart builder
Prevents resource from starting automatically
withExplicitStart(): IResource
IResource
method withHealthCheck builder
Adds a health check by key
withHealthCheck(key: string): IResource
key string
IResource
method withIconName builder
Sets the icon for the resource
withIconName(
iconName: string,
iconVariant?: IconVariant): IResource
iconName string
iconVariant IconVariant optional = Filled
IResource
method withParentRelationship builder
Sets the parent relationship
withParentRelationship(parent: IResource): IResource
parent IResource
IResource
method withPipelineConfiguration builder
Configures pipeline step dependencies via a callback
withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => void): IResource
callback (obj: PipelineConfigurationContext) => void
IResource
method withPipelineConfigurationAsync builder
Configures pipeline step dependencies via an async callback
withPipelineConfigurationAsync(callback: (arg: PipelineConfigurationContext) => void): IResource
callback (arg: PipelineConfigurationContext) => void
IResource
method withPipelineStepFactory builder
Adds a pipeline step to the resource
withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => void, dependsOn?: string[], requiredBy?: string[], tags?: string[], description?: string): IResource
stepName string
callback (arg: PipelineStepContext) => void
dependsOn string[] optional
requiredBy string[] optional
tags string[] optional
description string optional
IResource
method withRemoteImageName builder
Sets the remote image name for publishing
withRemoteImageName(remoteImageName: string): IResource
remoteImageName string
IResource
method withRemoteImageTag builder
Sets the remote image tag for publishing
withRemoteImageTag(remoteImageTag: string): IResource
remoteImageTag string
IResource
method withRequiredCommand builder
Adds a required command dependency
withRequiredCommand(
command: string,
helpLink?: string): IResource
command string
helpLink string optional
IResource
method withUrl builder
Adds or modifies displayed URLs
withUrl(
url: string,
displayText?: string): IResource
url string
displayText string optional
IResource
method withUrlExpression builder
Adds a URL using a reference expression
withUrlExpression(
url: ReferenceExpression,
displayText?: string): IResource
url ReferenceExpression
displayText string optional
IResource
method withUrlForEndpoint builder
Customizes the URL for a specific endpoint via callback
withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => void): IResource
endpointName string
callback (obj: ResourceUrlAnnotation) => void
IResource
method withUrlsCallback builder
Customizes displayed URLs via callback
withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => void): IResource
callback (obj: ResourceUrlsCallbackContext) => void
IResource
method withUrlsCallbackAsync builder
Customizes displayed URLs via async callback
withUrlsCallbackAsync(callback: (arg: ResourceUrlsCallbackContext) => void): IResource
callback (arg: ResourceUrlsCallbackContext) => void
IResource