IResourceWithEnvironment

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

Methods

Sets the certificate trust scope
withCertificateTrustScope(scope: CertificateTrustScope): IResourceWithEnvironment
scopeCertificateTrustScopeThe scope to apply to custom certificate authorities associated with the resource.
IResourceWithEnvironment
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
trustbooleanIndicates whether the developer certificate should be treated as trusted.
IResourceWithEnvironment
methodwithEnvironmentbuilder
Sets an environment variable
withEnvironment(
name: string,
value: string | ReferenceExpression | EndpointReference | ParameterResource | ExternalServiceResource | IResourceWithConnectionString | IExpressionValue): IResourceWithEnvironment
namestring
valuestring | ReferenceExpression | EndpointReference | ParameterResource | ExternalServiceResource | IResourceWithConnectionString | IExpressionValue
IResourceWithEnvironment
Allows for the population of environment variables on a resource.
withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise<void>): IResourceWithEnvironment
callback(arg: EnvironmentCallbackContext) => Promise<void>A callback that allows for deferred execution for computing many environment variables. This runs after resources have been allocated by the orchestrator and allows access to other resources to resolve computed data, e.g. connection strings, ports.
IResourceWithEnvironment
Adds a callback that allows configuring the resource to use a specific HTTPS/TLS certificate key pair for server authentication.
withHttpsCertificateConfiguration(callback: (arg: HttpsCertificateConfigurationCallbackAnnotationContext) => Promise<void>): IResourceWithEnvironment
callback(arg: HttpsCertificateConfigurationCallbackAnnotationContext) => Promise<void>The callback to configure the resource to use a certificate key pair.
IResourceWithEnvironment
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
passwordParameterResourceoptionalA parameter specifying the password used to encrypt the certificate private key.
IResourceWithEnvironment
methodwithOtlpExporterbuilder
Configures OTLP telemetry export
withOtlpExporter(protocol?: OtlpProtocol): IResourceWithEnvironment
protocolOtlpProtocoloptional
IResourceWithEnvironment
Disable HTTPS/TLS server certificate configuration for the resource. No HTTPS/TLS termination configuration will be applied.
withoutHttpsCertificate(): IResourceWithEnvironment
IResourceWithEnvironment
methodwithReferencebuilder
Adds a reference to another resource
withReference(
source: IResource | EndpointReference | string | uri,
connectionName?: string,
optional?: boolean,
name?: string): IResourceWithEnvironment
sourceIResource | EndpointReference | string | uri
connectionNamestringoptional
optionalbooleanoptional= False
namestringoptional
IResourceWithEnvironment
Configures how information is injected into environment variables when the resource references other resources.
withReferenceEnvironment(options: ReferenceEnvironmentInjectionOptions): IResourceWithEnvironment
optionsReferenceEnvironmentInjectionOptionsOptions controlling which reference information is emitted.
IResourceWithEnvironment