# createCertificateFile

- Module: [Aspire.Hosting](/reference/api/typescript/aspire.hosting.md)
- Version: `13.5.0`
- Kind: `method`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/e076d8e427cb3afb528dbd605acd74c3aea69f94)

Creates a PEM container certificate file entry with the OpenSSL subject-hash symlink.

## Definition

```typescript
interface ContainerFileSystemCallbackContext {
  // ... omitted for brevity
  createCertificateFile(
    name: string,
    contents?: string,
    sourcePath?: string,
    owner?: number,
    group?: number,
    mode?: number,
    continueOnError?: boolean): ContainerFileSystemItem
}
```

## Parameters

- `name` (`string`)
- `contents` (`string`) `optional`
- `sourcePath` (`string`) `optional`
- `owner` (`number`) `optional`
- `group` (`number`) `optional`
- `mode` (`number`) `optional`
- `continueOnError` (`boolean`) `optional`

## Returns

[ContainerFileSystemItem](/reference/api/typescript/aspire.hosting/containerfilesystemitem.md)

## Applies to

- [ContainerFileSystemCallbackContext](/reference/api/typescript/aspire.hosting/containerfilesystemcallbackcontext.md)
