---
name: "mongoc_auto_encryption_opts_new"
section: "3"
platform: "linux"
package: "libmongoc-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mongoc_auto_encryption_opts_new"
---

# mongoc\_auto\_encryption\_opts\_new(3)

## SYNOPSIS

```
mongoc_auto_encryption_opts_t *
mongoc_auto_encryption_opts_new (void);
```

Create a new *mongoc\_auto\_encryption\_opts\_t*.

Caller must set the required options:

- •

  *mongoc\_auto\_encryption\_opts\_set\_keyvault\_namespace()*

- •

  *mongoc\_auto\_encryption\_opts\_set\_kms\_providers()*

Caller may set optionally set the following:

- •

  *mongoc\_auto\_encryption\_opts\_set\_keyvault\_client()*

- •

  *mongoc\_auto\_encryption\_opts\_set\_schema\_map()*

- •

  *mongoc\_auto\_encryption\_opts\_set\_bypass\_auto\_encryption()*

- •

  *mongoc\_auto\_encryption\_opts\_set\_extra()*

This options struct is used to enable auto encryption with *mongoc\_client\_enable\_auto\_encryption()*.

## RETURNS

A new *mongoc\_auto\_encryption\_opts\_t*, which must be destroyed with *mongoc\_auto\_encryption\_opts\_destroy()*.

**SEE ALSO:**

```
mongoc_auto_encryption_opts_destroy()
```

```
mongoc_client_enable_auto_encryption()
```

```
In-Use Encryption
```

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
