ContainerResourceBuilderExtensions.WithContainerCertificatePaths<TResource> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a ContainerCertificatePathsAnnotation to the resource that allows overriding the default paths in the container used for certificate trust. Custom certificate trust is only supported at run time.
public static Aspire.Hosting.ApplicationModel.IResourceBuilder<TResource> WithContainerCertificatePaths<TResource>(this Aspire.Hosting.ApplicationModel.IResourceBuilder<TResource> builder, string? customCertificatesDestination = default, System.Collections.Generic.List<string>? defaultCertificateBundlePaths = default, System.Collections.Generic.List<string>? defaultCertificateDirectoryPaths = default) where TResource : Aspire.Hosting.ApplicationModel.ContainerResource;
static member WithContainerCertificatePaths : Aspire.Hosting.ApplicationModel.IResourceBuilder<'Resource (requires 'Resource :> Aspire.Hosting.ApplicationModel.ContainerResource)> * string * System.Collections.Generic.List<string> * System.Collections.Generic.List<string> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'Resource (requires 'Resource :> Aspire.Hosting.ApplicationModel.ContainerResource)> (requires 'Resource :> Aspire.Hosting.ApplicationModel.ContainerResource)
<Extension()>
Public Function WithContainerCertificatePaths(Of TResource As ContainerResource) (builder As IResourceBuilder(Of TResource), Optional customCertificatesDestination As String = Nothing, Optional defaultCertificateBundlePaths As List(Of String) = Nothing, Optional defaultCertificateDirectoryPaths As List(Of String) = Nothing) As IResourceBuilder(Of TResource)
Type Parameters
- TResource
The type of the resource.
Parameters
- builder
- IResourceBuilder<TResource>
The resource builder.
- customCertificatesDestination
- String
The destination path in the container where custom certificates will be copied to. If not specified, defaults to /usr/local/share/ca-certificates/aspire-custom-certs/.
List of default certificate bundle paths in the container that will be replaced in Override or System modes. If not specified, defaults to /etc/ssl/certs/ca-certificates.crt for Linux containers.
List of default certificate directory paths in the container that may be appended to the custom certificates directory in Append mode. If not specified, defaults to /usr/local/share/ca-certificates/ for Linux containers.
Returns
The updated resource builder.