---
name: "mongoc_transaction_opts_set_write_concern"
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_transaction_opts_set_write_concern"
---

# mongoc\_transaction\_opts\_set\_write\_concern(3)

## SYNOPSIS

```
void
mongoc_transaction_opts_set_write_concern (mongoc_transaction_opt_t *opts,
                                           const mongoc_write_concern_t *write_concern);
```

Configure the transaction's write concern. The argument is copied into the struct and can be freed after calling this function.

## PARAMETERS

- •

  **opts**: A *mongoc\_transaction\_opt\_t*.

- •

  **write\_concern**: A *mongoc\_write\_concern\_t*.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
