Skip to content
Docs Try Aspire

IResourceWithEnvironment

Interface TypeScript
📦 Aspire.Hosting.Azure.EventHubs v13.2.0-preview.1.26159.1
interface IResourceWithEnvironment {
withCertificateTrustScope(scope: CertificateTrustScope): IResourceWithEnvironment;
withDeveloperCertificateTrust(trust: boolean): IResourceWithEnvironment;
withEnvironment(
name: string,
value: string): IResourceWithEnvironment;
withEnvironmentCallback(callback: (obj: EnvironmentCallbackContext) => void): IResourceWithEnvironment;
withEnvironmentCallbackAsync(callback: (arg: EnvironmentCallbackContext) => void): IResourceWithEnvironment;
withEnvironmentConnectionString(
envVarName: string,
resource: IResourceWithConnectionString): IResourceWithEnvironment;
withEnvironmentEndpoint(
name: string,
endpointReference: EndpointReference): IResourceWithEnvironment;
withEnvironmentExpression(
name: string,
value: ReferenceExpression): IResourceWithEnvironment;
withEnvironmentFromKeyVaultSecret(
name: string,
secretReference: IAzureKeyVaultSecretReference): IResourceWithEnvironment;
withEnvironmentFromOutput(
name: string,
bicepOutputReference: BicepOutputReference): IResourceWithEnvironment;
withEnvironmentParameter(
name: string,
parameter: ParameterResource): IResourceWithEnvironment;
withHttpsDeveloperCertificate(password?: ParameterResource): IResourceWithEnvironment;
withOtlpExporter(): IResourceWithEnvironment;
withOtlpExporterProtocol(protocol: OtlpProtocol): IResourceWithEnvironment;
withoutHttpsCertificate(): IResourceWithEnvironment;
withReference(
source: IResourceWithConnectionString,
connectionName?: string,
optional?: boolean): IResourceWithEnvironment;
withReferenceEndpoint(endpointReference: EndpointReference): IResourceWithEnvironment;
withReferenceExternalService(externalService: ExternalServiceResource): IResourceWithEnvironment;
withReferenceUri(
name: string,
uri: uri): IResourceWithEnvironment;
withServiceReference(source: IResourceWithServiceDiscovery): IResourceWithEnvironment;
withServiceReferenceNamed(
source: IResourceWithServiceDiscovery,
name: string): IResourceWithEnvironment;
}

Methods

method withCertificateTrustScope builder
Sets the certificate trust scope
withCertificateTrustScope(scope: CertificateTrustScope): IResourceWithEnvironment
scope CertificateTrustScope
IResourceWithEnvironment
method withDeveloperCertificateTrust builder
Configures developer certificate trust
withDeveloperCertificateTrust(trust: boolean): IResourceWithEnvironment
trust boolean
IResourceWithEnvironment
method withEnvironment builder
Sets an environment variable
withEnvironment(
name: string,
value: string): IResourceWithEnvironment
name string
value string
IResourceWithEnvironment
method withEnvironmentCallback builder
Sets environment variables via callback
withEnvironmentCallback(callback: (obj: EnvironmentCallbackContext) => void): IResourceWithEnvironment
callback (obj: EnvironmentCallbackContext) => void
IResourceWithEnvironment
method withEnvironmentCallbackAsync builder
Sets environment variables via async callback
withEnvironmentCallbackAsync(callback: (arg: EnvironmentCallbackContext) => void): IResourceWithEnvironment
callback (arg: EnvironmentCallbackContext) => void
IResourceWithEnvironment
method withEnvironmentConnectionString builder
Sets an environment variable from a connection string resource
withEnvironmentConnectionString(
envVarName: string,
resource: IResourceWithConnectionString): IResourceWithEnvironment
envVarName string
resource IResourceWithConnectionString
IResourceWithEnvironment
method withEnvironmentEndpoint builder
Sets an environment variable from an endpoint reference
withEnvironmentEndpoint(
name: string,
endpointReference: EndpointReference): IResourceWithEnvironment
name string
endpointReference EndpointReference
IResourceWithEnvironment
method withEnvironmentExpression builder
Adds an environment variable with a reference expression
withEnvironmentExpression(
name: string,
value: ReferenceExpression): IResourceWithEnvironment
name string
value ReferenceExpression
IResourceWithEnvironment
method withEnvironmentFromKeyVaultSecret builder
Sets an environment variable from an Azure Key Vault secret reference
withEnvironmentFromKeyVaultSecret(
name: string,
secretReference: IAzureKeyVaultSecretReference): IResourceWithEnvironment
name string
secretReference IAzureKeyVaultSecretReference
IResourceWithEnvironment
method withEnvironmentFromOutput builder
Sets an environment variable from a Bicep output reference
withEnvironmentFromOutput(
name: string,
bicepOutputReference: BicepOutputReference): IResourceWithEnvironment
name string
bicepOutputReference BicepOutputReference
IResourceWithEnvironment
method withEnvironmentParameter builder
Sets an environment variable from a parameter resource
withEnvironmentParameter(
name: string,
parameter: ParameterResource): IResourceWithEnvironment
name string
parameter ParameterResource
IResourceWithEnvironment
method withHttpsDeveloperCertificate builder
Configures HTTPS with a developer certificate
withHttpsDeveloperCertificate(password?: ParameterResource): IResourceWithEnvironment
password ParameterResource optional
IResourceWithEnvironment
method withOtlpExporter builder
Configures OTLP telemetry export
withOtlpExporter(): IResourceWithEnvironment
IResourceWithEnvironment
method withOtlpExporterProtocol builder
Configures OTLP telemetry export with specific protocol
withOtlpExporterProtocol(protocol: OtlpProtocol): IResourceWithEnvironment
protocol OtlpProtocol
IResourceWithEnvironment
method withoutHttpsCertificate builder
Removes HTTPS certificate configuration
withoutHttpsCertificate(): IResourceWithEnvironment
IResourceWithEnvironment
method withReference builder
Adds a reference to another resource
withReference(
source: IResourceWithConnectionString,
connectionName?: string,
optional?: boolean): IResourceWithEnvironment
source IResourceWithConnectionString
connectionName string optional
optional boolean optional = False
IResourceWithEnvironment
method withReferenceEndpoint builder
Adds a reference to an endpoint
withReferenceEndpoint(endpointReference: EndpointReference): IResourceWithEnvironment
endpointReference EndpointReference
IResourceWithEnvironment
method withReferenceExternalService builder
Adds a reference to an external service
withReferenceExternalService(externalService: ExternalServiceResource): IResourceWithEnvironment
externalService ExternalServiceResource
IResourceWithEnvironment
method withReferenceUri builder
Adds a reference to a URI
withReferenceUri(
name: string,
uri: uri): IResourceWithEnvironment
name string
uri uri
IResourceWithEnvironment
method withServiceReference builder
Adds a service discovery reference to another resource
withServiceReference(source: IResourceWithServiceDiscovery): IResourceWithEnvironment
source IResourceWithServiceDiscovery
IResourceWithEnvironment
method withServiceReferenceNamed builder
Adds a named service discovery reference
withServiceReferenceNamed(
source: IResourceWithServiceDiscovery,
name: string): IResourceWithEnvironment
source IResourceWithServiceDiscovery
name string
IResourceWithEnvironment