Skip to content
Docs Try Aspire
Docs Try

IResourceWithEnvironment

Interface
📦 Aspire.Hosting v13.3.0
interface IResourceWithEnvironment {
withCertificateTrustScope(scope: CertificateTrustScope): IResourceWithEnvironment;
withDeveloperCertificateTrust(trust: boolean): IResourceWithEnvironment;
withEnvironment(
name: string,
value: IExpressionValue): IResourceWithEnvironment;
withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise<void>): IResourceWithEnvironment;
withHttpsDeveloperCertificate(password?: ParameterResource): IResourceWithEnvironment;
withOtlpExporter(protocol?: OtlpProtocol): IResourceWithEnvironment;
withoutHttpsCertificate(): IResourceWithEnvironment;
withReference(
source: EndpointReference|string|uri,
connectionName?: string,
optional?: boolean,
name?: string): IResourceWithEnvironment;
withReferenceEnvironment(options: ReferenceEnvironmentInjectionOptions): IResourceWithEnvironment;
}

Methods

Sets the certificate trust scope
withCertificateTrustScope(scope: CertificateTrustScope): IResourceWithEnvironment
scope CertificateTrustScope
IResourceWithEnvironment
Configures developer certificate trust
withDeveloperCertificateTrust(trust: boolean): IResourceWithEnvironment
trust boolean
IResourceWithEnvironment
method withEnvironment builder
Sets an environment variable
withEnvironment(
name: string,
value: IExpressionValue): IResourceWithEnvironment
name string
value IExpressionValue
IResourceWithEnvironment
Sets environment variables via callback
withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise<void>): IResourceWithEnvironment
callback (arg: EnvironmentCallbackContext) => Promise<void>
IResourceWithEnvironment
Configures HTTPS with a developer certificate
withHttpsDeveloperCertificate(password?: ParameterResource): IResourceWithEnvironment
password ParameterResource optional
IResourceWithEnvironment
method withOtlpExporter builder
Configures OTLP telemetry export
withOtlpExporter(protocol?: OtlpProtocol): IResourceWithEnvironment
protocol OtlpProtocol optional
IResourceWithEnvironment
Removes HTTPS certificate configuration
withoutHttpsCertificate(): IResourceWithEnvironment
IResourceWithEnvironment
method withReference builder
Adds a reference to another resource
withReference(
source: EndpointReference|string|uri,
connectionName?: string,
optional?: boolean,
name?: string): IResourceWithEnvironment
source EndpointReference|string|uri
connectionName string optional
optional boolean optional = False
name string optional
IResourceWithEnvironment
Configures which reference values are injected into environment variables
withReferenceEnvironment(options: ReferenceEnvironmentInjectionOptions): IResourceWithEnvironment
options ReferenceEnvironmentInjectionOptions
IResourceWithEnvironment