# WithContainerCertificatePaths

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: [`ContainerResource`](/reference/api/go/aspire.hosting/containerresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

Adds container certificate path overrides used for certificate trust at run time.

## Definition

```go
func (ContainerResource) WithContainerCertificatePaths(options ...*WithContainerCertificatePathsOptions) ContainerResource
```

## Parameters

- `options` (`...*WithContainerCertificatePathsOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*WithContainerCertificatePathsOptions` argument.

- `CustomCertificatesDestination` (`*string`) -- The destination path in the container where custom certificates will be copied.
- `DefaultCertificateBundlePaths` (`[]string`) -- Default certificate bundle paths in the container that will be replaced.
- `DefaultCertificateDirectoryPaths` (`[]string`) -- Default certificate directory paths in the container that may be appended.

## Returns

[`ContainerResource`](/reference/api/go/aspire.hosting/containerresource.md) -- The updated resource builder.

Returns a handle; failures surface later via `Err()`.

## Applies to

- [`ContainerResource`](/reference/api/go/aspire.hosting/containerresource.md)
