Skip to content
Docs Try Aspire

CertificateTrustConfigurationCallbackAnnotationContext Properties

Class Properties 8 members
Context provided to a CertificateTrustConfigurationCallbackAnnotation callback.
Arguments Section titled Arguments List<object>
Gets the command line arguments associated with the callback context. Values can be either a string or a path value provider such as CertificateTrustConfigurationCallbackAnnotationContext.CertificateBundlePath or CertificateTrustConfigurationCallbackAnnotationContext.CertificateDirectoriesPath.
public List<object> Arguments { get; init; }
builder.AddContainer("my-resource", "my-image:latest")
.WithCertificateTrustConfigurationCallback(ctx =>
{
ctx.Arguments.Add("--use-system-ca");
return Task.CompletedTask;
});
CancellationToken Section titled CancellationToken CancellationToken
Gets the CertificateTrustConfigurationCallbackAnnotationContext.CancellationToken that can be used to cancel the operation.
public CancellationToken CancellationToken { get; init; }
A value provider that will resolve to a path to a custom certificate bundle.
public ReferenceExpression CertificateBundlePath { get; init; }
A value provider that will resolve to paths containing individual certificates.
public ReferenceExpression CertificateDirectoriesPath { get; init; }
EnvironmentVariables Section titled EnvironmentVariables Dictionary<string, object>
Gets the environment variables required to configure certificate trust for the resource. The dictionary key is the environment variable name; the value can be either a string or a path value provider such as CertificateTrustConfigurationCallbackAnnotationContext.CertificateBundlePath or CertificateTrustConfigurationCallbackAnnotationContext.CertificateDirectoriesPath. By default the environment will always include an entry for `SSL_CERT_DIR` and may include `SSL_CERT_FILE` if CertificateTrustScope.Override or CertificateTrustScope.System is configured.
public Dictionary<string, object> EnvironmentVariables { get; init; }
builder.AddContainer("my-resource", "my-image:latest")
.WithCertificateTrustConfigurationCallback(ctx =>
{
ctx
.EnvironmentVariables["MY_CUSTOM_CERT_VAR"] = ctx
.CertificateBundlePath;
ctx.EnvironmentVariables["CERTS_DIR"] = ctx.CertificateDirectoriesPath;
return Task.CompletedTask;
});
Gets the DistributedApplicationExecutionContext for this session.
public DistributedApplicationExecutionContext ExecutionContext { get; init; }
Gets the resource to which the annotation is applied.
public IResource Resource { get; init; }
Gets the CertificateTrustScope for the resource.
public CertificateTrustScope Scope { get; init; }