Watch Aspire live streamsDocsTry Aspire

ProjectResource

Handle
📦 Aspire.Hosting v13.6.0
interface ProjectResource
extends IComputeResource,
IContainerFilesDestinationResource,
IDotnetProgramResource,
IResource,
IResourceWithArgs,
IResourceWithEndpoints,
IResourceWithEnvironment,
IResourceWithProbes,
IResourceWithWaitSupport,
IResourceWithServiceDiscovery {
disableForwardedHeaders(): ProjectResource;
publishAsDockerFile(configure?: (obj: ContainerResource) => Promise<void>): ProjectResource;
withEndpointsInEnvironment(endpointNames: string[]): ProjectResource;
withReplicas(replicas: number): ProjectResource;
withVolume(
target: string,
name: string,
env: string,
isReadOnly?: boolean): ProjectResource;
}

Methods

Configures the project to disable forwarded headers when being published.
disableForwardedHeaders(): ProjectResource
ProjectResource
methodpublishAsDockerFilebuilder
Publishes a project as a Docker file with optional container configuration
publishAsDockerFile(configure?: (obj: ContainerResource) => Promise<void>): ProjectResource
configure(obj: ContainerResource) => Promise<void>optional
ProjectResource
Includes only the specified project endpoint names in environment-variable injection.
withEndpointsInEnvironment(endpointNames: string[]): ProjectResource
endpointNamesstring[]
ProjectResource
methodwithReplicasbuilder
Configures how many replicas of the project should be created for the project.
withReplicas(replicas: number): ProjectResource
replicasnumber
ProjectResource
methodwithVolumebuilder
Adds a volume to a project resource.
withVolume(
target: string,
name: string,
env: string,
isReadOnly?: boolean): ProjectResource
targetstring
namestring
envstring
isReadOnlybooleanoptional= False
ProjectResource